Android project structure and Complicated apps

Android project structure and Complicated apps

As you start to build more complicated apps the way in which you structure the app become more and more important.

Many introductions to android app development , ignore the structure of the project code and go ahead to a specific things on the functionality of the application .

Many newer developers starting their project in this similar way ,but having the bulk of your code in activities or fragments is problematic for many reasons .

first code doesn't follow the principal of separation of concerns which recommends that each class stay focused on a small of separate responsibilities .

for example :

one main responsibility of activity classes is responsible for life cycle events from operating system

Adding non life cycle business logic, since you typically must run activity tests on device or emulator .

whereas the best to run your unit tests outside of device or emulator and solely on a JVM.


Finally , your code also becomes difficult to maintain since its all your code into your small number of large activities or fragments .

after finishing discussions about why first thing before go a head in your project first of all your must building your Skeleton project with one of Architectures Pattern , As in next articles we will discuses MVVM Architecture Pattern in details .



要查看或添加评论,请登录

Khaled K.的更多文章

社区洞察

其他会员也浏览了