| | |
Even harder than coding... designing code. UML diagrams
Please support our Computer Science advertiser: Learn about neural networks and artificial intelligence.
![]() |
•
•
Join Date: Mar 2007
Posts: 27
Reputation:
Solved Threads: 0
Hi guys I need to design my project in a UML diagram with a MVC design pattern.
The project I am trying to design is a system for KIds that they can store and use thier files within thier MyWorkSpace.
They have a musicbox to store music, picture album for pictures etc.
They also can search through thier files and add keywords to thier files.
They have a scrap book where they can creat folders (similar to musicbox and picture album.) And name those folders and put any file type into thier folders.
This is the UML diagram I got so far but it looks so messy, anyone got a better solution?
The project I am trying to design is a system for KIds that they can store and use thier files within thier MyWorkSpace.
They have a musicbox to store music, picture album for pictures etc.
They also can search through thier files and add keywords to thier files.
They have a scrap book where they can creat folders (similar to musicbox and picture album.) And name those folders and put any file type into thier folders.
This is the UML diagram I got so far but it looks so messy, anyone got a better solution?
Even harder than coding... designing code. UML diagrams
>> Even more "interesting" you must say..
1. You've posted in the wrong forum.
2. Problem is you've not followed the basic principles of MVC Pattern
E.g. only following dependencies are allowed:
- C->V
- C->M
- V->M
You have V->C and M->C as well. That's why it looks messy.
Here are a few things you can do:
1. Use Struts.
2. Eliminate dependencies from V->C by using callbacks.
2. Move the class ScrapBook from C to M (it doesn't belong to C).
3. Make sure that all classes in M don't DO anything, i.e. they have no functionality and are meant for ONLY holding data. So no functions (except for get/set). E.g. FileManager belongs to C not M.
In general look at all the dependencies that should not be there allowed and see how to break them. If you need more specific help get back with the improved version.
>> Even more "interesting" you must say..

1. You've posted in the wrong forum.
2. Problem is you've not followed the basic principles of MVC Pattern
E.g. only following dependencies are allowed:
- C->V
- C->M
- V->M
You have V->C and M->C as well. That's why it looks messy.
Here are a few things you can do:
1. Use Struts.
2. Eliminate dependencies from V->C by using callbacks.
2. Move the class ScrapBook from C to M (it doesn't belong to C).
3. Make sure that all classes in M don't DO anything, i.e. they have no functionality and are meant for ONLY holding data. So no functions (except for get/set). E.g. FileManager belongs to C not M.
In general look at all the dependencies that should not be there allowed and see how to break them. If you need more specific help get back with the improved version.
•
•
Join Date: Mar 2007
Posts: 27
Reputation:
Solved Threads: 0
Lol yeah very "interesting"
:rolleyes:
Thanks alot I'll take this information into account.
Heres a more improved version but I'll continue to edit based on what you said, I dont quite get callbacks and struts but I will continue to research.
1. Why do I put Scrapbook in M, Scrapbook creates folders for kids called "Projects"?
These new diagrams will be easier to understand the first diagram is showing the connection I got so far and the second are trying to put it within the UMV.
Thanks alot again for replying man, I was losing hope.
:rolleyes: Thanks alot I'll take this information into account.
Heres a more improved version but I'll continue to edit based on what you said, I dont quite get callbacks and struts but I will continue to research.
1. Why do I put Scrapbook in M, Scrapbook creates folders for kids called "Projects"?
These new diagrams will be easier to understand the first diagram is showing the connection I got so far and the second are trying to put it within the UMV.
Thanks alot again for replying man, I was losing hope.
Last edited by eeeman; Mar 20th, 2007 at 2:03 am.
Software design is a complex field of its own, requiring training and experience to master just as does programming.
And no, just using Struts won't help. In fact Struts is now recognised as a very poor choice due to its tight coupling between framework and application code.
Get some good books like Head First Design Patterns http://www.oreilly.com/catalog/hfdesignpat/ AND Head First Object-Oriented Analysis and Design http://www.oreilly.com/catalog/hfobjects/ and start studying.
Without the second you'll make a mess of what you find in the first, and become a pattern nut (I've seen the results of that, people using a specific pattern everywhere whether it's appropriate or not just because they fell in love with it).
And no, just using Struts won't help. In fact Struts is now recognised as a very poor choice due to its tight coupling between framework and application code.
Get some good books like Head First Design Patterns http://www.oreilly.com/catalog/hfdesignpat/ AND Head First Object-Oriented Analysis and Design http://www.oreilly.com/catalog/hfobjects/ and start studying.
Without the second you'll make a mess of what you find in the first, and become a pattern nut (I've seen the results of that, people using a specific pattern everywhere whether it's appropriate or not just because they fell in love with it).
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Whatever you say eeeman you must agree that "Software design is a complex field of its own, requiring training and experience to master just as does programming."
Anyway, few issues that new design doesn't address:
2. Eliminate dependencies from V->C by using callbacks.
>> This isn't done. Do you know how to do it?
2. Move the class ScrapBook from C to M (it doesn't belong to C).
>> I said this coz I thot ScrapBook is some class whose object just hold the data of ScrapBook and NOT do anything (like create a project). If it has some business logic it belongs to C as you had done. See the point below also.
3. Make sure that all classes in M don't DO anything, i.e. they have no functionality and are meant for ONLY holding data. So no functions (except for get/set). E.g. FileManager belongs to C not M.
>> This is the biggest issue with new design. It somehow seems to me that you've tried to eliminate the wrong dependencies between M-V-C, but just by moving classes from one box to another. Correct way would be the design appropriately.
May be an example would help:
- CreateNewAccount has business logic (createAccount()) so it should go to C not M.
- Same goes for Login class.
- Now the information in CreateNewAccount, namely Username and Password, seems to be used by another class viz Login.
-> So you should create a class say AccountInfo that contains only Username/Password as member variables and get/set methods for them. This class should belong to M as it's only "data" and no logic.
Your classes from C (Login and CreateNewAccount) should use this data to execute their Business Logic (viz createNewAccount() and Login() ).
If you can upload your mdl file I could make easier and faster modifications.
Anyway, few issues that new design doesn't address:
2. Eliminate dependencies from V->C by using callbacks.
>> This isn't done. Do you know how to do it?
2. Move the class ScrapBook from C to M (it doesn't belong to C).
>> I said this coz I thot ScrapBook is some class whose object just hold the data of ScrapBook and NOT do anything (like create a project). If it has some business logic it belongs to C as you had done. See the point below also.
3. Make sure that all classes in M don't DO anything, i.e. they have no functionality and are meant for ONLY holding data. So no functions (except for get/set). E.g. FileManager belongs to C not M.
>> This is the biggest issue with new design. It somehow seems to me that you've tried to eliminate the wrong dependencies between M-V-C, but just by moving classes from one box to another. Correct way would be the design appropriately.
May be an example would help:
- CreateNewAccount has business logic (createAccount()) so it should go to C not M.
- Same goes for Login class.
- Now the information in CreateNewAccount, namely Username and Password, seems to be used by another class viz Login.
-> So you should create a class say AccountInfo that contains only Username/Password as member variables and get/set methods for them. This class should belong to M as it's only "data" and no logic.
Your classes from C (Login and CreateNewAccount) should use this data to execute their Business Logic (viz createNewAccount() and Login() ).
If you can upload your mdl file I could make easier and faster modifications.
![]() |
Other Threads in the Computer Science Forum
- Previous Thread: I want to get started learning a programming language
- Next Thread: Best algorithm for hashing files and avoiding collisions?
| Thread Tools | Search this Thread |
ai algorithm algorithms amazon assignment assignmenthelp assignments automata battery bigbrother binary bittorrent bizarre bletchleypark blogging bomb business cern codebreaker compiler computer computers computerscience computertrackingsoftware connect conversion csc dataanalysis dataintepretation development dfa dissertation dissertations dissertationtopic ebook employment energy floatingpoint foreclosure foreclosuresoftware fuel gadgets geeks givemetehcodez government graphics hardware history homeowners homeworkassignment homeworkhelp humor ibm idea ideas internet iphone ipod jobs laser laws linkbait lsmeans mainframes marketing mobileapplication msaccess nano netbeans networking news os p2p piracy piratebay principles programming rasterizer research sam-being-cute sas science security sex simulation software spying stephenfry study supercomputer supercomputing sweden technology textfield turing turingtest two'scompliment uk virus ww2






