Slashdot Mirror


J2EE Design Patterns

whirlycott writes "In case you're not up to date on what design patterns are, let's do a quick crash course before we jump into a book review on the subject. Design patterns were thrust into the software development mainstream by the book Design Patterns in 1995 (aka the GoF book). A pattern involves three components: first, a description of a generalized recurring problem; second, an abstract solution that is generally accepted; and third, a name for the sake of convenience. Patterns save time and effort by supplying developers with a shared language when discussing common problems. O'Reilly's new J2EE Design Patterns book is a timely, easy-to-read catalog of architectural patterns specific to the J2EE platform." Read on for the rest of whirlycott's review. J2EE Design Patterns author William Crawford and Jonathan Kaplan pages 368 publisher O'Reilly rating 8/10 reviewer Philip Jacob ISBN 0596004273 summary Detailed collection of patterns suitable for beginners or architects alike

If you are working on frameworks, integration projects or system components, it is my belief that you'll almost certainly pick up some ideas from this book. J2EE Design Patterns is organized according to the different layers that you might find in a multi-tier architecture: presentation, business, database, messaging, and others. Consequently, if you're a JSP developer on a project team, youll be able to get some ideas for how to organize your work as well as how to interface it with, for example, controllers, if you're following an MVC framework. Or, if you're integrating various distributed non-Java systems, you'll want to read the chapters on Business Tier Interfaces and Enterprise Concurrency.

Judging by my friends' bookshelves, another popular Java patterns book is Core J2EE Patterns. If you already own this book, you will find that this new offering from O'Reilly doesn't contain as many patterns per se, but seems to go into a greater level of detail describing each pattern and supplementing it with more code samples. A nice feature of the O'Reilly book is that each pattern gets ample coverage in enough detail for you to understand the actual problem, the causes and -- equally importantly -- how to put a solution into place. Each pattern is described using some UML notation and code samples (Chapter 2 contains a UML primer).

One of the problems that I've encountered reading books on the subject is that some steer so deeply into abstraction that they become hard to understand. Others are so stylistically repetitive that trying to read them becomes mind numbing. Fortunately, neither problem surfaced during the time that I spent reading this book. The authors avoided the visual repetition of the traditional Problem / UML / Goal / Actors format that other books follow by moving this type of description into an appendix. That lets the body of the book flow more easily and also supplies the reader with a handy quick reference in the back pages.

Do I have any complaints? Well, this book certainly doesn't suffer from any fatal flaws. But it seems that an acknowledgement of the popularity of certain components could have been included. For example, while specific MVC frameworks, like the ubiquitous Struts, were mentioned, Object-Relational mappers were not; I read some of the chapters and winced at the code samples that manipulated SQL strings and felt grateful that I'm using the wonderful Hibernate O/R mapping engine. Of course, for various reasons, some readers won't be able to use tools like these, and a book about patterns has to maintain a certain level of abstraction in order to maintain any lasting credibility. But the section on Object-Relational Mapping doesnt even mention that a class of tools exists without the use of EJB CMP (Container Managed Persistence). Thats a real shame, because manually moving data from the object world to the relational world and vice versa is time-consuming and error-prone (and frequently unnecessary) work.

It's a good book, with 285 pages of text and 53 pages of appendices. I've owned it for four days, and I've already managed to steal some of these ideas for the projects I'm working on.

Philip Jacob works for Eyeglasses.com. You can purchase J2EE Design Patterns from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

21 of 130 comments (clear)

  1. hello room by Anonymous Coward · · Score: -1, Offtopic

    hello room

    1. Re:hello room by Anonymous Coward · · Score: -1, Offtopic

      whats going on in this reply

    2. Re:hello room by Anonymous Coward · · Score: -1, Offtopic

      hello room mate

    3. Re:hello room by Anonymous Coward · · Score: -1, Offtopic

      tie me kangaroo down, mate!


      yes im gay

    4. Re:hello room by Anonymous Coward · · Score: -1, Offtopic

      hello room mate with me

    5. Re:hello room by Anonymous Coward · · Score: -1, Offtopic

      will you mate with me? sporty, clean and handsome in a rugged way. geek, of course.

    6. Re:hello room by Anonymous Coward · · Score: -1, Offtopic

      hello room mate with me suddenly

    7. Re:hello room by Anonymous Coward · · Score: -1, Offtopic

      hello, room ? mate with me suddenly !!

    8. Re:hello room by Anonymous Coward · · Score: -1, Offtopic

      HELO room. "Sorry, I lost you at HELO."

  2. fp! by Anonymous Coward · · Score: -1, Offtopic

    first post!

  3. Re:holy crap by Anonymous Coward · · Score: -1, Offtopic

    Cram it you nit!

  4. YOU FAIL IT by Anonymous Coward · · Score: -1, Offtopic

    # Important Stuff: Please try to keep posts on topic.
    # Try to reply to other people's comments instead of starting new threads.
    # Read other people's messages before posting your own to avoid simply duplicating what has already been said.
    # Use a clear subject that describes what your message is about.
    # Offtopic, Inflammatory, Inappropriate, Illegal, or Offensive comments might be moderated. (You can read everything, even moderated posts, by adjusting your threshold on the User Preferences Page)

    Problems regarding accounts or comment posting should be sent to CowboyNeal.

  5. J2EE? by Anonymous Coward · · Score: -1, Offtopic

    J2EE, huh? Sounds suspiciously like J2E2, the cousin of R2D2 that ratted to the Empire about his where abouts...

  6. Bush Re-Selection Advertising: +1, Patriotic by Anonymous Coward · · Score: -1, Offtopic

    "Democrats criticized the President for attacking the terrorists."

    Be patriotic, impeach the Liars.

    Thank you and a Happy Thanksgiving,
    Kilgore Trout

    1. Re:Bush Re-Selection Advertising: +1, Patriotic by Anonymous Coward · · Score: -1, Offtopic
      I agree.

      Anyone who criticizes the President, who has led the way so bravely so far, is only serving the terrorists. At a time like this even the elections-process must be subject to certain limitations. Too much freedom will only help the enemy who brought down the WTC. Would you like the terrorists voting in our next leader? No? Would you like people who sympathize with the terrorists to vote in our next leader? NO!

  7. This country is going to hell in a handbasket by Anonymous Coward · · Score: -1, Offtopic
    This country will go to hell in a handbasket if GWB/Diebold/Christian Fanatics-conglomerate "wins" the next elections.

    Mark my words. Blood will flow.

  8. Four more years? No way in hell! by Anonymous Coward · · Score: -1, Offtopic
    Are you going to give him four more years to establish not the United but a theocratic neo-con States of America, instead?

    After all, it's been "one nation under God" since 1950s when the reference to God was sneaked in to the pledge our kids are made to recite. Why not follow the course to the end and just call it "mission accomplished"?

    Vote out GWB in 2004. I don't care if you're Republican, Democrat or something else. That is your PATRIOTIC duty.

    1. Re:Four more years? No way in hell! by Anonymous Coward · · Score: -1, Offtopic
      I don't believe in God.

      Federal government is supposed to represent me.

      If they speak as if they speak for God, they're not speaking for me and thus fail representing me which is their fundamental function.

      That's my beef with religion in the government.

      As far as the "benefits of religion" go, yeah sure. A puritan religious society was adept at sweeping the problems under the rug by social coercion. Now they're in the open which is a good thing. That way we can actually address the problems.

    2. Re:Four more years? No way in hell! by Anonymous Coward · · Score: -1, Offtopic

      " I don't believe in God. Federal government is supposed to represent me."

      No, the government is supposed to represent EVERBODY. Your view is pretty damn selfish, and typical of leftist elites. Fact is, YOU are in the minority, ma'am. Most people believe in God of some form, whether they call him God, Allah, or a host of other names. I believe the real issue is not that you don't believe in God, but that you hate what he represents because He represents the last idealogical barrier between you and the indulgement of your every wicked and selfish desire.

  9. Thank you for endorsing censorship: by Anonymous Coward · · Score: -1, Offtopic

    You obviously suffer from the same malady as the
    fearful "leader" as evidenced by this logic:

    "See, free nations are peaceful nations. Free nations don't attack each other. Free nations don't develop weapons of mass destruction.

    --- George W. Bush--- Milwaukee, Wis., Oct. 3, 2003

    Unfortunately, many alleged "patriots", such as you, are both illiterate and innumerate, as evidenced by your uncritical consumption of propaganda from the U.S. media and BushCo.

    As always,
    Kilgore Trout

    1. Re:Thank you for endorsing censorship: by Anonymous Coward · · Score: -1, Offtopic


      Okay! Thank you very much, Anonymous Coward with the fictitious name!