Hi as a assignment i have been given about 30 classes and have been asked to look for design patterns in them.
Can anyone tell me if there are any programs out there that might help me to do this?
Printable View
Hi as a assignment i have been given about 30 classes and have been asked to look for design patterns in them.
Can anyone tell me if there are any programs out there that might help me to do this?
I doubt it.
But you should post the ones you aren't sure on.
I have drawn up a copy of the class diagram(attached) to try to help me find some patterns, but none seem obvious, apperently there are only five in there.
Can anyone else see any ?
If anyone can help me with this i would be really helpful, i've been looking all day.
So far i have only managed to find the most obvious pattern the facade pattern.
CAn anyone see anymore?
RMI is a classic remote proxy design pattern but you can't really see it from just uml.
How is proxy used in RMI?
Are there any others in there? I'm really struggling with this.
Can people also confirm that facade pattern and mvc pattern are in it and tell me where so i know i'm getting this correct, as i'm not 100% sure. i'm very new to this.
thanks for all your help so far though
RMI = Remote Method Invocation
the stub in RMI provides a local representative for an object residing on a remote host. Which is basically the intent of a proxy... To provide a placeholder that represents another object.
Facade pattern intent...Provide a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the subsystem easier to use. So this could be the VideoDataAccessor interface (how does your uml show an interface???)
As far as MVC goes...there is the model (the video database or remote object)...there is a view (the video panel, etc.)...the controller then manipulates the model based on user input through the view.
Design patterns are hard to learn. I suggest reading as much as possible and going through lots of example code.
Hope this helps a little...
Thanks for that Joe Beam, that was really helpful. That does help alot but i don't really understand your explanation of the Proxy pattern, i will be sure to do some more reading on it.
Unfortunatley i'm not a keen reader as i am dyslexic, i prefer help to come from direct sources, like the help you have just given me.
Thank you
This means that i only have to find 2 more patterns, if anyone can help me spot them i would be very greatful.
My initial research has indicated the there are 100's of design patterns and asking us to try to find 5 of these is the given code is a little unfair.
I can't believe i forgot to add these 2 class diagrams.
Can anynoe tell me if there are any design patterns in these that i have missed?
i don't seem to be able to see any in these.
I still haven't found any more patterns.
is looking at uml diagrams the best way to find design patterns?
When I was in school, I always had to look for them just by going through source code. And it was more of an open discussion as opposed to an assignment.
You could make a case for the flyweight pattern with the way VideoRecordings are broken up with the Duration and Track classes...It's a stretch but if your scraping for something. :)
http://www.fluffycat.com/Java-Design...rns/Flyweight/
The open source project named YAZD is a good example for pattern.