Android application architecture - what is the suggested model?

MalcomTucker picture MalcomTucker · Jul 23, 2010 · Viewed 35.4k times · Source

In the same way a web or desktop app might have three or n tiers - UI, Business, Data for example - what is the suggested structure for an Android application? How do you group classes together, what layers do you have etc?

I'm just starting Android dev (an internet-based app that must respond to incoming notifications) and have no real feel for the structure I'm aiming at. Suggestions appreciated.

Answer

louiscoquio picture louiscoquio · Apr 3, 2012

IMHO, Android "wants to" follow a MVC pattern, but view & controller are generally really coupled in activities.

It makes unit test harder and it's hard to obey to the Single Responsibility Principle.

I found a really nice Android architecture presented here, there could be an idea. Everything is loosely coupled, so much easier to test and edit.

Obviously, I'm sure there are a lot of others possibilities (like the MVP pattern (Model View Presenter) - and here are answers talking about MVP in Android), but you should still take a look on it.