[Reprinted] Review of J2EE development without EJB

Source: Internet
Author: User
[Original] Dion almaer
[LINK] http://www.theserverside.com/articles/article.tss? L = j2eewithoutejb_bookreview
[Comment] Rod Johnson's new work has just been published and has not been introduced in China, so it cannot be seen yet, even sorry. Now there is only one wish, that is, to introduce photocopies in China. If you want to translate, you must find a high-level translator. Rod's previous article was translated by a group of people who are not familiar with it...

[Original]

Introduction

I was excited to seeJ2EE development without EJBCome on SS my desk at work. This is the new book by Rod Johnson and Juergen hoeller, both known well partly for being the lead developers of the Spring framework.

Rod's first book wasJ2EE design and development, Also in the "expert one-on-one" series from wrox (now owned by Wiley ). the first book took a bold step. rod discussed his real world experience with J2EE, and offered up some advice, some patterns, and some good thoughts on architecture and development in our world. this book takes that to the next level.

It is very important to mention what this book is not.

  • It isn' t about bashing ejbs, and anyone who uses them
  • It isn' t about patting the Spring framework on the back, and suggesting that you have to use it, or that it is the only good solution to your problems

This is very important. it wocould be very easy to make the book a rant on EJB, and to make the rest of it be spring 101. thankfully, this is far from the tack of this book. the book actually offers different information for different purposes. I wocould say the book has three sections that cocould have been their book even

  1. Architecture: There is a thorough high level view of architecture in the Enterprise Java arena. We learn from history, from real projects, and look to the current trends.
  2. The lightweight Container Movement: here we look into what the movement is about, what it is helping us solve, how AOP fits in, and finally about the Spring framework itself.
  3. The sample application: At the end we get to discuss a case study (unfortunately the PetStore:/) and are stored ed through various decisions that were made.

Let's walk through these sections and see what they have to offer:

Part One: Architecture

  • Why "J2EE without EJB"
  • Goals
  • Ubuntures
  • J2EE ubuntures in practice
  • The simplicity dividend
  • EJB, five years on

Part Two: lightweight containers and spring

  • Lightweight contains and inversion of control
  • Introducing the Spring framework
  • Declarative middleware using AOP concepts
  • Transaction Management
  • Persistence
  • Remoting
  • Replacing other EJB services
  • Web Tier Design
  • Unit testing and Testability
  • Performance and scalability

Part Three: Sample app

Part One: Architecture

I feel that I have to stress again that this book is not about, nor a huge plug for spring. if you never use the Spring framework in your life you wocould still get as much out of the book.

One of the reasons I like spring is the pragmatic, practical approach. it gives you the developer tools to get your work done. the book is written in a similar way. you can tell all the way through that authors have really thought about what they are talking about, and come with much experience.

The first few chapters are the type that you will read with a smile on your face. you will nod too yourself, and most of it will make perfect sense to you. you have been there. you have seen the problems that are discussed.

Every effort has been made to not specifically get into spring at this point. it is very politically correct, in fact almost too much so. you will see "hibernate, or JDO" a lot in the text. maybe we shoshould create a new acronymH/JDOWhich means the same thing. I think they did a great job in not favoring a participant Project (although of course spring is gone into detail ).

If someone in management jumps to the conclusion of "use EJB" you can have them read these first chapters. it isn' t a pure rant on EJB, but discusses the issues at hand, and how EJB isn' t necessarily the best choice for every solution. however, they do talk about how EJBCanBe a good solution, in a few scenarios.

A good read, my only complaint is that it gets a little long in some places.

Part Two: lightweight containers and spring

There isLotOf meat to the chapters in the middle of the book. we are systematically received through the tiers, and subsystems that we often require. again, they spend time discussing the system in question in the abstract before rushing into the spring-way.

For example, if you open up the Web Tier chapter, you will be shown the parts and pieces of that tier, and the varous types of solutions to the problem. you will get the authors opinions of struts, webwork, tapestry, and JavaServer faces, before you get to spring MVC. it gives you a good overview of the playing field. this style is mimicked throughout the other chapters in this section as well.

I really enjoy how practical these chapters are. read the chapter on AOP and you will not only understand a little about AOP in general, but you will understand where spring stands, and how to use it in your applications. A lot of knowledge is passed on here.

I also wocould be willing to wager thatRemotingChapter will offer some new insight. we have more choices in our tool belt that just the classic remoting of RMI/EJB, And the heavyweight WSDL based services. there is a good discussion on the lightweight remoting of Hessian and burlap (from Caucho ). A very interesting read indeed!

Near the end of this section we get into a few different chapters. we get a take on unit testing and test driven development. the Spring framework itself eats this dog food, and we are shown how it all works. we also get a glimpse at some tools for code coverage and such.

Managing books pass the buck when it comes to tasks which we all need to do. my most common peeve is that there isn't anything out there on handling complicated enterprise build systems. performance and scalability is another item that is often overlooked, or skimmed. this book discusses both the specified tural choices, as well as implementation ones. it also promotes an evi--based Approach to perfo Rmance, and shows us a few tools. This all leads us to the sample application...

Part Three: Sample Application

This area is both interesting, yet probably the weakest part of the book, in my opinion. there is a lot of good information here on the PetStore application, and the spring version. I really like how they made some of their decisions not based on "what is the theoretically best thing to do here", but rather "What makes sense for us ".

For example, since they adapted the ibatis version, they didn't bother re-signing ting the areas that were working fine. this meant that they ended up with ibatis SQL maps for persistence, rather than a hibernate.

I am probably more sick of the PetStore than most so wowould have liked another case study too. However, the book is already plenty long, and they had to stop somewhere!

Conclusion

If you are working with Enterprise Java you shoshould read this book. it is as simple as that. this isn't just about spring, it is about the problems we currently face daily in our projects. the book is written by one of us, for us. it is really refreshing to be able to say that, as often I find that authors are already ists in their own worlds... People who sit on committees and plan the future.

Although the book goes into good detail on spring itself, don't look for it to beSpring: Every API that you can ever use. There is definitely room for other books suchSpring live!

If you haven't played with spring much yet, this book will probably have you downloading it and giving it another look.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.