IntelliJ Java IDE
The moose likes OO, Patterns, UML and Refactoring and the fly likes help with complicated uml diagram Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Reply Bookmark "help with complicated uml diagram" Watch "help with complicated uml diagram" New topic
Author

help with complicated uml diagram

shaf maff
Ranch Hand

Joined: Sep 07, 2008
Posts: 180
Hi Guys

I have an application with three layers, the DAO layer, processor layer and front controller layer. Each layer has around 7 classes. Each class explicity declares which DAO or processor it will require in the class attributes section. My question is, will I still need to provide associations between the layers ? The design is already complicated and I fear having to add around another 20+ associations will just make it more confusing.
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2159
My question is, will I still need to provide associations between the layers ?


No. This thing sounds so complicated and confusing that only you will be able to understand it. Best to not even waste your time on a Class diagram.

Strange thing is, how did you design all of these complicated layers and classes before creating a Class diagram? Sounds backwards, in my opinion.

What do you plan to do with the Class diagram?

shaf maff
Ranch Hand

Joined: Sep 07, 2008
Posts: 180
Yeh you're right, Im doing it backwords. Its for one of my projects.
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2159
Next time try something different. Instead of rushing to start writing code and compiling, create Package and Class diagrams first. Then, review these to see if they can be simplified and make changes. Then, create a few Sequence diagrams that outline the most interesting algorithms.

Once you have these diagrams in place, then start writing code and compiling. This will enable you to create cleaner code that is easier to understand.

"Complicated" software is not a good thing. You should strive to create "simple" code, as simple as possible is best!
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
What are you trying to communicate, and to whom? How would you best depict the knowledge you want to transfer?

Remember that most often, a complete diagram is a wasted diagram. The art of modeling is to highlight the important parts by neglecting everything else.


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
James Clark wrote:
Once you have these diagrams in place, then start writing code and compiling. This will enable you to create cleaner code that is easier to understand.


My experience is different. While I agree that being able to visualize a rough structure at the beginning can be helpful, there are simply forces at work that only show once you start coding. Drawing a UML diagram is mere speculation, even if well educated speculation.

In my experience, creating cleaner code that is easier to understand mostly comes from being able to sense code smells while writing the code, and ruthlessly refactoring the code to an as good state as we are capable of.

I've heard good things about the book "Clean Code".

"Complicated" software is not a good thing. You should strive to create "simple" code, as simple as possible is best!


I wholeheartedly agree!
 
 
subject: help with complicated uml diagram
 
Threads others viewed
DAO's in Component and Sequence Diagram
Is domain model object passing between layers overhead?
is my reasoning correct?
User defined Class Loader - restrict loading classes based on package structure
Pass a resultset object from a servlet to jsp
IntelliJ Java IDE