Results 1 to 5 of 5
Thread: Java design patterns
- 03-03-2009, 06:24 AM #1
Member
- Join Date
- Dec 2008
- Posts
- 30
- Rep Power
- 0
-
Hm, I know that I see Observer, Strategy, and Factory (including Abstract Factory) patterns all the time. Also the Java IO classes are based on the Decorator pattern. But I'm relatively new at using design patterns.
- 03-03-2009, 06:52 AM #3
Member
- Join Date
- Dec 2008
- Posts
- 30
- Rep Power
- 0
Any particular site you can recommend for the same ? Thanks in advance.
- 03-03-2009, 07:36 AM #4
Senior Member
- Join Date
- Jan 2009
- Posts
- 671
- Rep Power
- 5
The O'Reilly head start design patterns book is pretty good. As far as sites go, wiki has quite a bit regarding design patterns, and it's pretty good. One of my coworkers actually wrote quite a few of the design pattern wikis.
As far as what is important, it depends on your peers. The main purpose of design patterns is to write robust code that others can understand and modify - while preventing yourself form reinventing the wheel over and over.
My guess is that Iterator is the most relevant pattern, and it's one of the 'gang of four' patterns.
- 03-03-2009, 05:10 PM #5
For any type of application using a user interface, Model-View-Controller (MVC) is a basic pattern. I suggest studying that first, even if you are not doing a GUI right now. The concepts there will create a framework for understanding other patterns.
The other thing I suggest is looking at is UML (Unified Modeling Language). Unfortunately, much of the material on the Web is to esoteric, but a good understanding of Object Oriented modeling will help you understand how to create meaningful classes. The biggest problem I see is programmers who cram the logic of several classes into one big one. It seems easier at first, but as soon as that class grows, it's out of control. Many small classes, each of which implements a single object's methods and properties, end up being far easier.
UML for Java Programmers by Robert Martin is an excellent book. His best advice: Get rid of the PC-based UML tool, use a piece of paper and a pencil, and throw the paper away once you understand what you are doing. In other words, his advice is very pragmatic.
Similar Threads
-
Java Mashup API - Design Patterns Questionnaire
By goldeneyeone in forum Reviews / AdvertisingReplies: 0Last Post: 02-10-2009, 10:03 PM -
Design patterns
By Freddie in forum New To JavaReplies: 2Last Post: 05-12-2007, 06:21 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks