IDM which represents for Integrator
, Data Provider
and Model
is core concepts of Interactor/Domain
layer which makes your app:
- Independently with
Database
andexternal agency
viaData Providers
. - Build an
unidirectional data flow
. - Manage async tasks by
Integrator queues
.
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
View
toIntegrator
toDataProvider
. 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 theIntegrator
, 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.
pod 'IDMCore'
github "congncif/IDMCore"
-
IDMFoundation with default implementation
IDMCore
withAlamofire
andObjectMapper
will 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
ModuleX
concept. - IDMCore Template generates a data flow using
IDMCore
concept.
- iOS 8.0+
- Xcode 8.3+
- Swift 3.1+
IDMFoundation🐴 together with ViewStateCore🐥 and ModuleX🐶 will make your application to absolute control. 💪💪💪
Nguyen Chi Cong, [email protected]
IDMCore is available under the MIT license. See the LICENSE file for more info.