IDM which represents for
Data Provider and
Model is core concepts of
Interactor/Domain layer which makes your app:
- Independently with
- Build an
unidirectional data flow.
- Manage async tasks by
This pattern will help you to build a better architecture and provide a set of utilities to handle complex business logic of your app.
Make a clean structure: Apply the principles of design, IDMCore makes your application become easily to change, flexibly to scale. It also enhances unit test capability, optimizes reuse of the parts of source code. It is especially compatible with most of today's popular application architectures from MVC, MVP to VIPER.
With MVC, the framework helps to eliminate the problems of massive view controllers which MVC often encounters, standardizes display loading and error warnings that many programmers feel uncomfortable.
With MVP and VIPER, the framework helps to eliminate repeatable delegate methods between presenter and view whose sole purpose is forward a signal, such as startLoading, successHandling or errorHandling.
Unidirectional data flow: The data flow will always go in one direction from the
DataProvider. It makes this easy to control errors when they are occurs, readable and understandable. In addition, each data provider is responsible for retrieving the data required by the
Integrator, so you can completely replace it with another one with similar functionality, or aggregate data from multiple different data providers. Your application will be independent of the data sources that will help you mock up test data easily.
Manage tasks: Handling interdependent tasks, asynchronously tasks easily through
IntegrationCall. Scheduling data providers lets you control tasks without the need to add a large library just to manage tasks.
IDMFoundation with default implementation
ObjectMapperwill help you create an IDM flow easily.
ModuleX with modularization mindset will help you create a clean architecture of mobile app.
You can use below templates to quickly create an
IDM data flow or
ModuleX module (They are available in above repos).
ModuleX Template generates a standalone module using
IDMCore Template generates a data flow using
- iOS 8.0+
- Xcode 8.3+
- Swift 3.1+
Thank you for reading!
Nguyen Chi Cong, email@example.com
IDMCore is available under the MIT license. See the LICENSE file for more info.