• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Designs

 
vishal sodani
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the difference between Design Patterns and UML?
 
Greg Whelan
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Design Patterns are structures that experienced Object-Oriented developers have experimentally observed to have frequently occurred in programming. They have desirable qualities such as reusability, performance and concise explanations.
To get a taste of the simplest Design Pattern here's the easily understandable Singleton pattern (note this code doesn't do anything useful other than demonstrate the pattern):

The purpose of the Singleton Pattern is to only allow a single instance of a particular class (that's not entirely accurrate, but correct for now ). You'll see that the class above achieves that goal.
Design patterns are constructs of this flavor that you will find immensely valuable in designing and developing object-oriented systems.
UML is a series of diagramming techniques, visual notations, that are tailored towards expressing the design and execution of an object-oriented system. It consists of 7+ diagram types that each convey a different aspect of a design. Perhaps the most common of these diagrams is the Class Diagram, where classes are drawn in a rectangular box (inside is the name of the class, the methods and the variables). Related classes can be connected with various arrow-types to indicate relationships such as inheritance.
UML is very valuable as a means of communicating designs among developers (and as part of design documentation).
With 2 years of Java developement experience I have found the authoritative "Design Patterns" to be an good book to learn DP (it sometimes makes the topic appear more complex than it actually is, and isn't fully Java-compliant ). I unfortunately would recommend avoiding Cooper's "Java Design Patterns" (a great idea for a book, an extremely poor execution).
For learning UML I found "UML Distilled" to be an excellent book (and very readable). As with programming languages mastery of UML only comes about through usage (and misusage).
 
vishal sodani
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Greg, for such a good reply.I am new to OOPS.I have just cleared certification exam.Now I am doing some advanced topics.For UML I am reading "UML User Guide" by Booch,Jacobsem,Rumbaugh.Is this the right book,Yu suggested a book.Who is the author,and publisher?What are your suggestions for me -as I go about learning Java.
vishal
[This message has been edited by vishal sodani (edited September 15, 2000).]
 
Steve Fahlbusch
Bartender
Posts: 602
7
Mac OS X Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vishal,
as to the books, UML distilled - Martin Fowler (BTW-he talks at most SD2000 confs, if you get a chance, attend - he is a very good speaker)
Desing Patterns - Gamma (et all)
 
Amala Amperayani
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The UML User Guide is a very good book to start with. There are other books worth reading. Here are 2 good books.
Applying UML and Patterns ---
Craig Larman
Fundamentals of Object-Oriented Design in UML ---
Meilir Page-Jones (P)
There is a free OO Modelling tool available on www.togerthersoft.com. Can you give me more details about the certification exam?

[This message has been edited by Amala Amperayani (edited September 27, 2000).]
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please note that, although widely given as an understandable example of patterns, the Singleton pattern (as explained above) is rarely the best choice when developing real Java software. It can be very tempting to see things in terms of singletons when analysing a problem. Processes and procedures in the real world are full of implicit Singletons (one person in the company who does all the ordering, one database used to store all the data, etc.), but these can be very dangerous assumptions when built in to a software solution.
Before you leap to implement the Singleton pattern as a first try of patterns, consider trying one of the other patterns first. Decorator is simple and powerful, for example, and suits well the Java concept of interfaces.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic