Sun Core J2EE Patterns Experience Report

John Crupi is a Distinguished Engineer and Chief Java Architect for Sun Service Java Center at Sun Microsystems. He has 15 years of experience in distributed object design and development. John is a co-author of Core J2EE Patterns. The popularity of the J2EE standard in developing distributed applications led to the need to disseminate the lessons of successful design efforts. This is John’s story of this project.

In 1998, we developed one of our first J2EE applications. J2EE, or Java 2 Platform Enterprise Edition, is a platform-independent, Java-centric environment from Sun for developing, building, and deploying Web-based enterprise applications online. We sensed that there was rapidly growing interest in J2EE. Customers were jumping on the technology faster than we had anticipated. Since this technology was new and Sun was the source, we suspected that our global Professional Services organization would be very busy in the upcoming years doing J2EE architecture, design, and implementation. As it turns out, we were right, and luckily we were prepared.

Our idea in 1998 was to document the J2EE patterns we discovered in our early customer engagements. We believed that since we are a global organization, we needed a way to communicate and exchange our successes. We felt that design patterns would be the best way to capture and share our design experience. We also felt that once the patterns were documented, we could share them with our customers to efficiently convey our design decisions [Evangelist].

Consulting organizations are usually hired to solve a specific problem: in our case, to architect and design J2EE applications. In our early engagements, we wanted to capture the patterns we were using to solve our customers’ design problems. There were two immediate challenges. First, we had a good understanding of the Design Patterns book and there were several good books on software architecture, but these patterns were not tied to a specific platform. Even though we were not sure whether we could accomplish our goal, we were ready to try [Just Do It]. The second problem we faced was lack of time to document the patterns given our workload. Since patterns capture solutions that have solved prob lems over and over we knew that we needed to generalize the specific designs captured from our engagements. We solved this problem by convincing our customers of the value they would realize from the patterns we created [Tailor Made].

After a year of designing successful J2EE applications, we had identified some potential patterns [Small Successes]. I told my boss [Connector] about my ideas for J2EE patterns and said that I wanted to show them to our group. At one of our semi-annual offsite team gatherings of 200 Java architects from around the world [Location, Location, Location], my boss told me to present my ideas to the team after dinner [Piggyback, Guru Review]. I grabbed Danny Malks, a pattern-savvy J2EE expert [Guru on Your Side] who was interested in the patterns [Ask for Help]. We created a presentation that described four designs we thought reflected some of the patterns we had seen [Hometown Story].

We presented our ideas to the group to get their feedback not only on the four candidate patterns but also on the idea of capturing other J2EE patterns [Test the Waters]. The pattern concept was well received; many said it was a good idea [Innovator, Early Adopter]. We got approval from our manager [Local Sponsor] to continue the patterns work and write a book [Dedicated Champion].

I recruited Danny to work on the presentation-tier patterns [Ask for Help]. Danny had experience with design patterns and Servlet/Java Server Pages (JSP) and also appreciated the challenge in doing this work. We recruited some of our architects [Guru on Your Side] who weren’t currently working on projects to help us write the patterns. Even though Danny and I were well versed in the Enterprise Java Beans (EJB) and the Servlet/JSP side of J2EE, we felt we needed an additional resource who was patterns savvy and smart in EJB. Serendipitously, I got a call from Deepak Alur. He said he had some questions about our patterns and wanted to share his ideas. After about an hour of conversation, it was clear that Deepak was our guy [Guru on Your Side].

The next step was to begin documenting the patterns [Step by Step]. Initially we had identified about 120 patterns, but many turned out to be variations on the same theme, so we added “strategies” to our pattern template to capture these implementation variations. We weren’t sure how to best present the abstractions in the patterns. We discovered that some people can think at an abstract level, while others think best at a more concrete level. We spent about two years documenting the patterns and held five workshops with internal colleagues along the way [Guru Review].

Throughout most of the review processes [Time for Reflection], about half the reviewers were supportive [Innovator, Early Adopter, Early Majority], about a third saw no value, and the rest were indifferent. In the Sun Java Center, most of our architects are senior to very senior, so, they may not be representative of the developer community at large, but they gave us a good critical perspective [Champion Skeptic].

We released the patterns on our Web site [In Your Space, e-Forum] before the book was published. The only negative feedback we received from both the community and book reviewers was that there were no source code examples on the Web site. A common comment was, “Without source code, these patterns are useless.” It’s interesting that some developers need source code examples to see the value in the patterns, while others don’t. This experience reinforced our earlier observation that some people can see abstractions and understand how to realize them, while others need to see concrete applications to find the deeper, more general structures.

We listened to our critics [Fear Less] and when the book was finally released in June 2001, it had many source code examples. The second edition was released in 2003. There has been real interest in the J2EE patterns, primarily through the acceptance of our work outside Sun [External Validation].

The book remained in the Amazon.com top 100 technical books for quite a while, and a presentation of the patterns at the international JavaOne convention drew over 4,000 attendees. The Sun Professional Services organization has been winning lucrative services engagements based on in dustry adoption of the patterns. Respect for this particular piece of Sun Intellectual Property has grown, and the authors have been invited to many customer sites where organizations have standardized on the patterns.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset