Reputation: 47
I am making an app in java. I decided to go with an MVC architecture.
My app has a login page. The database is accessed with JDBC. The app has a graphical user interface (gui) that I will do with netbeans gui builder and swing.
The user uses the GUI, the GUI sends the form to the controller, the controller contacts the database, the database responds, the controller relay to the gui etc.
So far my uml diagram looks like this :
My friend told me, that there is inconsistency in my diagram because the database is external to the architecture. Plus my controller is too vague. And it is better to put the button_handler in the view. If I do that, what shall I put in my model ? And how to be more precise about the controller to make it easier to implement in JAVA ?
Upvotes: 2
Views: 428
Reputation: 73490
The diagram is indeed inconsistent, confusing and incorret:
is inconsistent because it uses packages to group several classes, but tries to show a kind of relation that UML does not support between packages.
is confusing, because it shows in one diagram elements that correspond to very different views: on one side classes, which are typical of a class diagram, and on the other side processing nodes (DB) that you'd normally expect in a deployment diagram.
it is wrong, because your <<login>>
package is made out of information that are not relevant for UML.
But I think your friend is right for the wrong reasons. You could very well show a DB in your model (provided you did it correctly), even if it is an independent interchangeable component and even if you don't develop it yourself. Your system, your boundaries!
Now, to get your diagram right, you need to decide what you want to show:
Upvotes: 1