Skip to main content

Community Corner Podcast: Java Champion Adam Bien on JavaEE and Rethinking Best Practices

Posted by editor on July 16, 2009 at 8:24 AM EDT

The very last podcast interview I did at this year's JavaOne was one of the best: my talk with Adam Bien on JavaEE and rethinking best practices. I am primarily a server-side, data center guy, in my software engineering experience. I've been around a while, and have an historical perspective on this. Hence, it was incredibly interesting for me as Adam told me about some surprising (to me) new developments in the enterprise software engineering realm.

Adam's presentation occupied 33 minutes (making it among the longest of our Community Corner 2009 podcasts), but it was definitely time well spent for me. Be sure to download Adam's slides (PDF) so you can follow along as you listen to the podcast.

Adam starts out by addressing the assumptions people have regarding EJBs, for example, that they are heavyweight. This is actually is not true, if you really understand EJBs. They actually have a minimal implementation that is very compact and fast. The full capabilities are extensive, but EJBs can be implemented in concise manner that is indeed highly efficient.

Are EJB applications portable? Extensible? Many think not. But Adam shows that in fact these ideas are illusory, especially when it comes to EJB 3.

What about performance? Adam found a difference of only 3% between a well-designed EJB and an equivalent POJO in his testing. EJBs are actually lightweight in their minimal implementation. But, what they give you is free added capabilities that you don't have to develop and implement on your own - which you'd have to do if you were working on your own trying to extend a legacy POJO into the enterprise realm.

I found Adam's discussion of the conception that "EJBs are too complex" really interesting. I had suggested that the perception of complexity was one reason why developers avoid EJBs. Adam quickly distinguished "essential complexity" and "accidental complexity." Essential complexity is, for example, when you're working with distributed systems. You have to think about things like caching, synchronization. You can't have a genuinely working distributed system that doesn't fully solve these issues. So - do you want to develop your own infrastructure to solve these problems? Well, EJBs do it for you, for free.

What's the simplest possible EJB? One that implements a single POJO. So, why is this valuable? Because implementing the POJO within an EJB instantly gains you all the enterprise-level capabililties that EJBs provide, without any additional work on your part. You just build a jar and deploy it, and suddenly your POJO is available at the enterprise level.

Adam has found that often the perceived complexity of JavaEE and EJBs is really the result of design decisions made by software architects. If the design is overly complex, then the developed EJBs will necessarily be complex. EJBs are indeed powerful. But that potential can sometimes induce a desire to use features of EJBs that aren't really necessary in the specific application at hand -- resulting in unneeded complexity.

I really enjoyed the discussion we got into near the end of the podcast regarding the relationship between stateful components and today's new rich internet clients (RIAs). So-called "fat clients" were in vogue perhaps 10 years ago. Then, suddenly, thin clients (with stateless server-side interactions) were absolutely required. Now, with RIA, we're shifting back to the concept that used to be called "fat clients." Well, EJBs happen to be ideal for addressing this need. Adam tells us how, in the latter minutes of our conversation.

I loved it when, in response to one of my statements about the history of stateful and stateless objects, Adam said:

"In my eyes, everything repeats in 10 years. If you wait long enough, in the next cycle, exactly what you did 10 years before, you get over."

That seems so true to me, thinking about the evolution of client-server applications, the advent of web applications, and today's new RIA focus. We just give it a new name, and everyone thinks it's something that's never been seen before. We agreed that software engineering progresses in a spiral pattern.

Adam has a wonderful knowledge of the history of JavaEE and EJBs. If you're an enterprise Java developer, or if you work in other areas buts you're interested in the high-availability server side realm, I think you'll find listening to my conversation with Adam to be a very worthwhile way to spend 33 minutes of your time. I myself found it fascinating! Check out Adam's site if you'd like more information about his work and his very interesting Enterprise Java ideas.

You can find all this year's java.net Community Corner podcasts as they are published on the JavaOne Community Corner Podcast page.


In Java Today, there are two new java.net Community Corner podcasts. In Real World Java EE Patterns: Rethinking Best Practices, Java Champion Adam Bien talks with java.net editor Kevin Farnham about JavaEE and enterprise computing best practices: "The complexity and bloat often associated with Java EE are largely due to the inherent complexity of distributed computing; otherwise, the platform is surprisingly simple. Enterprise JavaBeans (EJB) 3.1 actually consists of annotated classes and interfaces that are even leaner than classic POJOs; it would be hard to find anything more to simplify. Nonetheless, (mis)use of Java EE can lead to bloated and overstated architectures. I would like to discuss the essential ingredients of a lean service-oriented architecture (SOA), then explain how to implement one in Java EE without compromising maintainability..."

In Pavel Suk and Jakub Podlesak on Prague and Java Communities, Jim Wright interviews Pavel Suk (Directory of the Prague Engineering Center) and Jakub Podlesak (head of the Prague JUG): "Prague is not only one of the most mystical cities in the world, it also hosts Sun Engineering Center. Do engineers there work on transmutation of metals into gold, elixir of life or something else? Why are the communities in Czech Republic active? Is beer cheaper than water? Myths and truths about communities revealed during this session."

Janice Heiss recently published All Things Java: Continuing the Conversation With Java Champion Alan Williamson : "java.sun.com (JSC): You are the original creator, chief architect, and coder for the J2EE CFML engine BlueDragon that runs MySpace. Give us a glimpse of how you created it and how it works..."


In today's Weblogs, Roberto Chinnici posted Help with the Java EE 6 training courses and certifications: "We are in the process of updating the training and certification materials for Java EE 6. We've done the first part of the job in collecting and analyzing the tasks that a Java EE developer may be expected to perform as..."

Ed Burns announces Recording of May JSF2 Complete Tour Webinar Available: "Recording of May JSF2 Complete Tour Webinar Available. Well, even though this webinar was performed for about 60 people and recorded live on 14 May 2009, and the slides were published that same day, it's taken much longer to get the recording published"

And Terrence Barr posted New & noteworthy: "Just wanted to make sure you check the Java Mobile & Embedded Community home page once in a while - we've just posted a bunch of new content: Java Mobility Podcast 82: M3DD/LA LWUIT Designer Update: Redesign Your Resources Prototype..."


In the Forums, elaltaico is working on a keyReleased problem: "Hello. I have lots of buttons and I use keyReleased to define what they will perform when user clicks them. They work fine. But, unfortunately when I click one button first it goes to next button then it does what I want. I meant first it goes to next button then it does what I defined for keyReleased. For instance, when I pressed button1, first of all it goes to button2 then it will go to form2A() which is defined inside keyReleased method of button1. Could you please tell me how to avoid it is going to next button ? Also, it does not happen when I use keyPressed()... "

eniojr asks about a Java Module: "Hi all, I have a question about Glassfish I hope you can help me with: How can I execute a class with a main method in the application server? I've created a class with the main method, I've created the jar file and added as a java module in the deployment description file. I was expecting that once I started the application server, the main method would be automatically executed. But instead, I only can make it to execute by launching the Java Web Start..."

And cheatex has a Problem with using jax-ws maven plugin 1.10 on JDK 1.5: "Hi, i have used jax-ws maven plugin version 1.10(this version used by default) in java 1.6 successfully, but when i attempt to build projects under 1.5 i get following error: $ mvn install -e Warning: JAVA_HOME environment variable is not set. ..."


The current Spotlight is "Podcast: Global Software Engineering Class Teaches FOSS Development Techniques": "Educator Dragutin Petkovic talks with java.net's Gary Thompson in this java.net Community Corner 2009 podcast recorded at JavaOne, presenting a synopsis of a Global Software Engineering class. The class is designed based on Dragutin's years of experience of teaching jointly at San Francisco State University (SFSU), the University of Applied Sciences, Fulda University, Germany, and recently with Florida Atlantic University (FAU). The class uses numerous Free and Open Source Software tools and teaches FOSS development techniques."


The new java.net Poll asks "What's the most significant new feature in NetBeans 6.7?". Thursday is the last full day of voting.


Our Feature Articles include a new article by Jeff Friesen, Introducting Custom Cursors to JavaFX. In this article, Jeff shows developers how to leverage undocumented JavaFX capabilities to support custom cursors in versions 1.2 and 1.1.1. Meanwhile, Francesco Azzola's Integrating JavaFX with JavaEE Using Spring and Hessian Protocol shows how a JavaFX client can call remote JavaEE services using the Spring framework and the Hessian protocol.


The latest Java Mobility Podcast is Java Mobility Podcast 82: M3DD/LA: a conversation with the organizers of Mobile, Media, and eMbedded Developer Days/Latin America in Goiania, Brazil. OpenJDK Podcast is The latest JavaOne Community Corner Podcast is


-->

Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



The very last podcast interview I did at this year's JavaOne was one of the best: my talk with Adam Bien on JavaEE and rethinking best practices...

Comments

Thank you for interviewing me! I really enjoyed our conversation. adam bien