If you use standard layout templates like xml, strings in strings.xml, activity for handlers and place the main logic / algorithms / data warehouse in a separate class (model class), you will be good at writing the best code in your way.
To test your architecture,
1) Ask yourself if you can do a unit test in the main logic / algorithm / data store (model class) separately from the user interface. Can you reuse the model class in another project with a different interface without difficulty?
2) Then ask yourself if you can port the application to another language simply by providing an additional strings.xml file.
So, the presentation (View) is mainly presented in main.xml. Event code and processing code (Controller) mainly belongs to MyActivity.java Algorithm / data warehouse mainly refers to Model.java.
A really big separation between the main algorithm / data warehouse and the user interface. The underlying algorithm / data store should be unaware of the details of the user interface. On UNIX, this is the INTERFACE (VC) -ENGINE (M) pattern. Separating the view from the controller simply takes one step further.
Hope this helps, JAL
source share