Data Processing Components Architecture in Mobile Applications

November 10, 2015

My name is Vitalii Malakhovskyi, I work as iOS Engineer at Stanfy. I was invited to talk about data processing components architecture in mobile applications at Lviv Mobile Development Day on Oct 31.

At Stanfy I work on a large project for a client which involves supporting multiple data sources and offline mode. This kind of task means building an effective and flexible architecture for data processing components which will accommodate any business needs. It is a new experience for me, because prior to this I had worked only on small apps. So in the presentation below I have tried to compare data building approaches for small and big projects, because it’s important to understand what type of application you need to build before you start technical planning.

For small applications – like proof of concept or data visualizing – you obviously need an ActiveRecord pattern. It can be quickly implemented, and it’s very easy to use and these advantages give you the freedom to just create without having to think about architecture.

But for large projects wherein you have several data sources, a lot of business logic and non-trivial processes, you would need a DataMapper pattern. This approach exists to completely separate your business logic from the data layer, which does not violate the Single Responsibility Principle and allows each component to be easily tested.

Also, when you’re working on the application architecture with a team, it brings the following real benefits to the whole working process:

  • professional development
  • simpler code review
  • economy of time

I invite you to explore the slides below, which I hope will help you to better understand  each approach.


Here are some links so you can read more about architecture approaches from tough guys like Martin Fowler and Robert Martin: