48. Android Code Architecture Summary

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.