Is/Are there any standard package structuring/hierarchy practices for Android?
-
01-10-2019 - |
Question
When developing J2EE web applications I would typically organise my package structure in the following way
com.jameselsey.<applicationName>.
- Controller - Controllers/Actions go here
- Service - transactional service classes, called by Controllers
- Domain - My domain classes/objects that the application uses
- DAO - abstract DAO layer
- DAOImpl - implementing DAO layer, to make JPA/JDO/Hibernate switchable etc
- Utils - utility classes, anything generic I might want to use such as my own DateUtils etc
This allows me to keep my classes organised in locations specific to their roles/tasks.
Is there an equivalent for Android? I haven't been able to find any guidelines as yet, I'm looking for an adopted standard of package heirarchy/structuring
Thanks
Solution
If you are using a DI framework yes they tend to name them that way..but both DI and MVC are somewhat new to Android and not a lot of devs are using those naming patterns.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow