Pergunta

I need some advice on how to go about developing the model for a Client/Server system using UML. In a short explanation the system consists of a Mobile client which runs on mobile phones. As is common with most mobile applications, the mobile application connects to a server in order to carry out some processing, logging for backups, and connectivity to third-party applications.

Where I need an advice is that envisaging the whole system, almost all the classes in the mobile application are replicated in the server application with the exceptions of a few classes. Likewise in the Server application which contains most of the same classes in the mobile application except some others and some extra functionality.

Giving an example, the Mobile application has a User class that consists of the actors personal details and login details. Likewise the Server application has a User class with the same members existing in the Mobile applications User class except that it has some functionality/methods that are not in the mobile application.

The Server application also has a class that connects to a third-party application to carry out its billing functionality/method. This class obviously is replicated in the Mobile application too however without the Mobile applications billing class having the functionality/method to connect to the third-party.

Ok to the issue on hand, I feel if I am going to follow the principles of UML modeling, I should not replicate these classes but rather should make use of Reuse in the modeling. As I am making use of packages to separate the Mobile application from the Server application, I guess it would involve:

  1. Having the basic classes that do the same thing (methods & members) in both the mobile & server applications
  2. For classes with extra members & functionality in any of the mobile or Server applications, I should use inheritance dependencies to build extra classes to take care of them.
  3. Using << includes >> dependency to add classes generated from #2 to the Mobile and Server packages OR using << includes >> dependency to add classes generated from #1 to the mobile and Server packages as the case may be necessary.

Please is my line of thought correct on how to implement the modeling as I feel replicating the same classes would be against the ideals of UML modeling. Yet the fact that their is a separation between the mobile and Server application sort of wants me to think along the line of modeling totally seperately for the mobile application and then modeling seperately for the Server application.

Again, please is my line of thought correct.

Foi útil?

Solução

It seems to me you just have one model with three packages:

  • a commonComponents package containing the classes which are used in the mobile and server application
  • a mobile package containing the classes used in the mobile application
  • a server package containing the classes used in the server application

the mobile and server packages import (<> relationship) the elements contained in the commonComponents package. For instance the User commonComponents:User class is imported in the server package where it is extended by the serve:User class. Note that as packages are namespace you can have classes with the same name.

I hope this might help you

http://lowcoupling.com/post/47802411601/uml-diagrams-and-models-with-papyrus

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top