MVC (Model-View-Controller) is one of the most common used structure for App development, extremely good for those apps that have a short life cycle.
In MVC, Controller layer is the place for implementing an App’s mainly functions; the Model layer is for data related functions; while View layer is for the designs and UI related things. MVC is App’s recommend architecture and it is good for an App’s startup development.
However, as the developing going on, MVC would create plenty of controllers, which will obviously mess up the whole project, and leads the overall structure from Model-View-Controller to Massive-View-Controller.
EMC (Excalibur-Modules-Common) would be a better choice for Apps have too many functions. To decouple modules and functions is a good method to reduce Apps getting fat. Apps can use some third-part SDKs for common functions. Many SDKs provide mature common functions for use, for example, for network commutation, in iOS we can use RestKit and in Android we can use OKHttp. There are also packages available for providing full functions as well as layout things, especially for login module. Additionally, third-part source control tools are highly recommended for teamwork, we can use CocoaPods for iOS and Gradle for Android.
Another benefit for EMC is it can provide better compatibility for Apps than other architecture. For example, Apple provided WebKit as a Web support framework, unfortunately, this is only supported iOS 8 and higher. By using EMC we can let Apps use Webkit for iOS 8 and higher, and running under WebView for iOS 7 and below.
- Hot Patch
Hot Patch would be the future choice for app development. Some third-part frameworks are now support Hot Patch, such as JSPatch for iOS, and ClassLoader for Android. By detecting user activities we can change those ‘hot’ modules into web based development modules. Which means to create some ‘shadow’ web-based modules for some ‘hot’ native modules. So that if anything goes wrong, developers can hot fix web modules and push them to the product environment first, and then change to a native module for a stable update in the next build.