java - Am I using packages incorrectly? -


I am creating an Android chat app I'm using the package to store the same squares together, But I'm not sure it's okay now. I'm doing this:

  com.myApp.adapters // - All my list adapters (Friendlt Adapters, Message ListEditor) com.myApp.fragments // - All my pieces (Friends Fragment, Communication Fragment) com .myApp.database // - All my database classes (database support, message data source, etc ...) com.myApp.models // - All my models (friends, messages, conversations) com.myApp.communications / / - All my comics classes (GCM classes, Facebook classes, etc ...)  

What is the matter?

Or it should be more:

  com.myApp.Conversations // - Everything for the conversation (Message List Adapter, Conversation Fragment, MessageData) com.myApp .Friends // - Everything for friends (Friends listederator, Friends Fragment, FriendsDataSource)  

// ... and so on.

I suspect that this is a function or a feature of itself, rather than sharing classes with each other, if it makes sense, what?

EDIT: In fact, both of the above are wrong, I have the sub-systems right from the beginning, so much more:

  com.myApp.UserInterface com. MyApp.Database com.myApp.Communications  

In which case the class is a mixture of both the above, but each package is a clearly defined subsystem. In which case, where will things fit like a model?

In general, both methods are correct, it is entirely up to you that what style of package The first structure, the technical aspects are easy to understand and easy to use, because if you look into your code after the month, you can easily understand that all of your adapter adapters are in the package. And so on the second, it seems completely Your conversational things are in the chat package and friends are in the package of friends

But according to me, I suggest you use the first one. Because it is easy to understand and easy to implement.


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -