java - Android package organization -


i new android development, have questions android project/code design.

  1. do people split api calls separate class/classes? or call them within object itself?
  2. are packages sub-directories? understand, they're used benefit of programmer organizational tool.

i know these questions subjective, i'm interested in how other developers organize code. thanks!

ad packages organization - develop applications android 2 years , have organized source andrea cinesi wrote. week started thinking if more appropriate package application module, example:

com.example.android .car   caractivity   carlistfragment   cardetailfragment   carlistadapter   ... .route   routeactivity   routelistfragment   routedetailfragment   routelistadapter   ... .utils .services etc. 

i'm not yet thinkin twice shoul in "module" (e.g. data entity). why i'm thinking changing? because in middle or large projects activities / fragments / etc. in 1 package - , confusing me - see larger projects acquired other developers.

and 1 more advantage can divided module packages - java package-private visibility of methods.

i not yet decided whether use or variant, think smaller projects not care , middle or big project may preferable option packages modules.


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -