Results 1 to 5 of 5
  1. #1
    ajeeb is offline Member
    Join Date
    Dec 2008
    Posts
    30
    Rep Power
    0

    Default Java design patterns

    Hi,
    What are the most important java design patterns that one should know ? I mean the design patterns that are implemented in the industry ?

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default

    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.

  3. #3
    ajeeb is offline Member
    Join Date
    Dec 2008
    Posts
    30
    Rep Power
    0

    Default

    Any particular site you can recommend for the same ? Thanks in advance.

  4. #4
    toadaly is offline Senior Member
    Join Date
    Jan 2009
    Posts
    671
    Rep Power
    6

    Default

    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.

  5. #5
    Steve11235's Avatar
    Steve11235 is offline Senior Member
    Join Date
    Dec 2008
    Posts
    1,046
    Rep Power
    8

    Default

    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

  1. Java Mashup API - Design Patterns Questionnaire
    By goldeneyeone in forum Reviews / Advertising
    Replies: 0
    Last Post: 02-10-2009, 11:03 PM
  2. Design patterns
    By Freddie in forum New To Java
    Replies: 2
    Last Post: 05-12-2007, 07:21 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •