Previously classified by functional module, now with more functional modules, the code hierarchy is no longer clear, so modified the engineering structure:
Before:
Modified Now:
1, more rigorous adherence to the MVC architecture
The bean catalog holds the data model
The UI stores the activity and the associated view
Adapter for various lists of ListView, GridView, Expandablelistview, etc.
The network request class is encapsulated under the API
Support is for supporting special effects or annotations, peripherals
Widgets are customized for some of the controls
Utils for some common tool classes
2. Adopt more formal development tools--android Studio
Official version 1.3+gradle
Android Studio is easy to use compared to eclipse:
① Embedded Terminal
② richer and more convenient plugin
③gradle, small white users are very confused, the official support documents less, need to explore their own
④ powerful refactor function, for a chestnut, previously changed the name of a class in eclipse, then the reference to the class of all places one by one modified, and the re-construction can be done
⑤ does not know if Eclipse has a code rollback feature, and studio can restore the entire code to a point in time through Localhistory
⑥ Real-time preview when you create or modify an XML file
。。。
Better than the Eclipse place
① If something goes wrong, it will not appear in the file list, but there is a list, click, not intuitive
② dog Blood of logcat, do not know how to stop the log automatically roll to the bottom, do not know how to set up only to see this application, do not know how to let each set of filter is not emptied
。。。
48. Android Code Architecture Summary