• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

help with complicated uml diagram

 
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 180
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeh you're right, Im doing it backwords. Its for one of my projects.
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ilja Preuss
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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!
 
reply
    Bookmark Topic Watch Topic
  • New Topic