Maharastra 10 Recipe

Read Original Source: Click Here

One of the most important tasks that we take into Opium is to collaborate with our customers for the implementation of agile development methods and the introduction of good software development practices (software architecture, testing, etc.). And today I would like to focus on the pure MVP architecture that we have implemented in the B-vom app.

Working with legacy code

In the specific case of B-Wom we had well differentiated 2 large parts of the system, the first one being part of the backend, where a lot of code was written in PHP with pairing and the second part was – 2 mobile applications: Android One for is written in Java and another for iOS written in Swift (both platforms have native languages).

वीडियो देखने के लिए रीद ओफिसिअल सोर्स पे क्लीक करे

In the backend part, our main task was to mentor rather than do the development itself, as the bulk of the refactoring was done internally by B-vom and we were more involved in the packaging and continuous integration implementation part.

What we did and how (modus operandi):

First, we identified the parts of the code that corresponded to a certain functionality and we analyzed how much coupling we found with other parts of the code.
Once we identified the dependencies of the functionality, we applied dependency investment techniques to decoup the code and break it down into smaller functions.

When we detected the code, what we did was create private methods centralizing the call to that code.
If these methods were shared by different classes to which we were adding functionality, then what we did is create separate classes with a different meaning (by typing classes) in a unique way shared with other parts of the application. And to highlight common functionality.

Android architecture

The architecture used in the Android part was similar in basic fundamentals to the iOS base, but instead of using MVC, they used slightly modified MVPs to improve decouping of functionalities. Following the foundations of the architecture proposed by Google for the creation of MVP, the presenter communicated with a “controller” that functioned in almost the same way as a “service”, which we explained in the iOS architecture, using static methods and ApiManager using a which is a retrofit wrapper and which manages backend calls that remain in scope.

Read Original Source: Click Here

Among the functionalities where we started development from scratch, as in the case of the functionality of the new coach, we took advantage of the opportunity to add the new architectural proposal of the start, under the supervision of our architect Christian Cesari. We implemented the pure MVP (MVPP) architecture. This idea is offering an example of architecture that is transversal across platforms (because we use the same idea in Android and iOS) and it allows us to separate the responsibilities of different components of applications in a fairly easy and clear way. gives .

Your manager

Our Api Manager is a wrapper that relies on different frameworks across 2 platforms that use Rx to make backend calls and communicate via API rest. It is usually a static class in which the backend call is defined in a configuration. In the case of Android we use the wrapper over Retropit and in the case of iOS over Moya, it is a framework that makes using Almofire with RX a lot easier. For your manager, we have not done unit testing.

Read Original Source: Click Here