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).