I have about 30 classes resides in 7 packages in my android application: I want to make a class diagram and CRC ( class responsibility collaboration) cards for it. But I get confused because the class diagram will be a large and complicated diagram. According to this Answer form a previous question. I had to make a class diagram for the main classes like Fragment and services etc. If anyone can give me advice about that. Also, I need to implement the layers of architecture ( Presentation layer, business layer , and data access layer ) according this: But I don't know where to start since i am using a php service. Any tips ?
1 1 1 silver badge asked May 5, 2016 at 12:21 28 1 1 silver badge 7 7 bronze badgesThe answer to this question discusses an Android plugin to generate UML classes stackoverflow.com/questions/17123384/…
Commented May 5, 2016 at 12:56@Nick Actually I saw this question , and used the plantUML for android studio with the graphviz application. but it does generate only a json form not a picture and it is unclear picture for the packages. Thanks
Commented May 5, 2016 at 12:59Bummer. Most of my experience has been with using architecture modeling with Lattix or Structure101. Most of my UML has been done by hand prior to writing the code. This project looks promising, but I can't vouch for it because I haven't tested it: sourceforge.net/projects/jug
Commented May 5, 2016 at 13:291) what's the purpose of your class diagram ? 2) Can you consider using several diagrams, each focused on a narrowed aspect ? 3) What do you mean with "using a PHP service": tha tyou don't have a data access layer and a DB because it's on the server ?
Commented May 6, 2016 at 12:24@Christophe 1- I will graduate next month and i need the class diagram for my documentation of my project . 2- Well i don't know if it is possible but i read and searched for android class diagram i see a classes diagrams implements activities or fragments and i don't know if that is the correct class diagram ( if you can help me with that ). 3- i mean that my android application have a service is keep asking the wamp server if there is a new data or not. also i used the PHP to program my website(control panel for data on website).
Commented May 6, 2016 at 12:48UML is a language for expressing your thoughts and concepts, so there is no fixed rule what to describe, what to leave out, and how to arrange everything.
If you want to describe your implementation in detail, you will in some way need to include all these 30 classes (which is not so terribly much). But there are ways to make readable class diagrams even from large class models, using the following ideas. Most tools allow you, from one abstract class model, to derive several diagrams that will always be kept in sync with the class model, so they'll always be consistent. What I like to have is
The overview diagram is a good place to show your layers. In your layer picture, I'm a bit puzzled about the business and domain layer, as those two terms generally mean much the same. Also, I wonder why you let the user communicate via web services. Human users of Android apps normally communicate with the presentation layer, which is subdivided into Android actions and views. As users aren't represented in a class model at all, you don't have to answer the philosophical question whether they interact with your views and/or activities. In general, the activities will depend on the views, but not the other way round, so you have layers activity - view - domain - data access.
PHP is most probably not on Android, but on a server application, so you'll have a similar layer structure for your server app, with some connector class in the Android app dependent on the server web service. I suspect that, in your picture, you didn't separate Android and server software clearly, as the PHP web service cannot call classes of the Android app.
Another approach is leaving some technicall fuss away and drawing a logical class diagram just of the application domain. In a well-designed application, this will be much the same as the classes of the domain layer. This will give the reader an insight into the essence of your software, without confusing him by too much technical detail.