Rod Johnson is by far my favorite speaker of the conference. After giving a phenomenal lecture Thursday on why J2EE projects fail, Johnson returned this morning for a keynote address on trends in J2EE.
One of the things I found interesting being a newcomer to the event was the sense of renewed confidence in the platform. Rod in particular talked about being skeptical when he presented at the first TSS symposium that J2EE would survive the threat mounted by .NET. The biggest difference between then and now is that J2EE projects are succeeding more than in the past, thanks largely to the slow but eventual development of best practices around how (and how not) to use EJBs. Keep in mind, when people (including Rod) bash EJB, they're mostly talking about Entity Beans or Session Beans that use too much RMI and don't follow the prescribed Session Facade pattern. In other words, EJB done correctly is a good thing, but EJB done poorly is catastrophic.
In any case, he also talked about the perception of Java as a "chaotic" platform with so many competing frameworks as a falsely negative attitude. In fact, the diversity is a strength and fuels innovation thanks largely to the open source community. That being said, he dove into some specific buckets of thought around why J2EE is now more poised for enduring success and supremacy over .NET than ever before.
J2EE and OOPMuch of the old J2EE (i.e. EJB 2.x) architecture isn't truly OO. "Fake objects" like Data Transfer Objects (DTO) were simply state, no behavior - so not really objects at all. Plus, more obviously, EJBs themselves were glaringly non-OO: you can't even subclass them. Today, this is changing. The J2EE platform is moving back toward solid OO principles, with no better evidence for this than the EJB 3.0 spec's reliance on concrete POJO classes.
His bottom line argument here was that the domain model should dictate the object model, the platform should not. However, with EJB 2.x, developers had to deal with a cumbersome object model simply because of platform constraints, not because the complexity was suggested or even necessary to the object model. This notion, that the platform should not dictate object model design, is a major reason for the growing emphasis on Dependency Injection (facilitated by AOP) in the J2EE platform.
Agile J2EEThis is an area where I see the most potential friction between what we hear in industry best practices and the way things work at NI. NI has always seemed very wedded to a waterfall SDLC approach, but the conventional wisdom (at least at this event) seems to be that agile development works a little better for J2EE. A good compromise for NI would be to follow agile development practices by creating more fully scoped proof-of-concept applications that validate architectural assumptions and illuminate key risks.
In any case, Rod talked about agile J2EE development as an idea that started off as an academic theory that has started to gain acceptance in industry. He cited some examples of large clients of his that now view agile methodologies as less risky than waterfall approaches. A large part of the explanation for this may be found in the acknowledgement that waterfall approaches seek to freeze requirements and code design, whereas in reality, business needs change often and code needs to be continually refactored to reach optimal quality.
Still, the waterfall seems to be part of how NI IT develops software. So at some point, we need to address this, if only to start evangelizing the role of proof-of-concept development in the project lifecycle. There may be Sarbanes/Oxley implications for this as well given controls around Project Tracking. Anyway, I don't want to beat a dead horse... It's something we need to look into.
During this part of the session, Rod also introduced the concept of Test Driven Development, a variation on XP style development where unit, integration, and functional tests are used for more iterative development.
Framework-Oriented DevelopmentNot surprisingly, a guy famous for having invented a popular framework for J2EE development is really really fond of frameworks for J2EE development. He did have some good things to say about this. He credited Struts for being one of the first tools to come along and take a relatively academic discussion of the "front controller" pattern and create a product around the pattern, making it much easier to discuss and leverage. More and more frameworks have sprung up, many of them open-source, and this has led to what he refers to as "the death of the in-house framework."
Apparently, 1-2 years ago, third-party frameworks did not receive the same prestige and acceptance they do today. It was more common for companies to have created their own proprietary in-house frameworks. He said that the move away from in-house frameworks toward third-party frameworks was probably the most significant trend in the J2EE industry he had observed over the past 18 months.
Developers need to add value, and to do that, they need to be focusing on the problems at hand. This seems simple enough, but without the leverage provided by frameworks, developers have to write (and maintain) many, many more lines of code. Most of that code has nothing to do with business logic and just configures services on the application server. This is the trap I believe we have fallen into at NI with things like the connection pool in NiJavaLib. We should be letting the application server handle connection pooling, and we should just leverage the built-in support for connection pooling through data sources.
What is open-source about? This area of discussion was a little off topic from the state of the platform itself, but he had some interesting thoughts. He encouraged a more TCO-oriented evaluation of open-source software. Just because the license is free doesn't mean the technology is going to be cheaper or better to adopt. Focus should include quality of performance, quality and price of services provided, and the requisite training and path to adoption (in other words, the organizational impact). So in his words, he encourages us to "evaluate on merit first, then worry about the license."
He had a lot to say about where specifications belonged and where innovation should be left unchecked. Essentially, his argument was that core services that make up the underlying platform should be standardized and little else. Specifically, it doesn't make sense to standardize around an application programming model (like Struts vs. Spring MVC). We have to standardize around things like the servlet interface, distributed transaction management, etc to make sure that the J2EE spec is portable across vendor implementations.
He argued that the EJB Entity Bean specification around persistence was premature and derailed the platform for years. His comment was, "If Entity Beans hadn't been part of the J2EE specification, would that have survived on their own?" The answer to this is of course a resounding NO. So I found this argument to be relatively compelling. Overall, I like the mix of options out there that allow developers and organizations to choose for themselves.
AOPWe did an audience poll right after breakfast that showed that barely 1/3 of developers had touched AOP or even planned to in the near future. His comment on this was that he was surprised that AOP hadn't taken off faster. Nevertheless, he cited experience with his clients where incremental adoption of AOP (mostly for infrastructure services like security) almost always led to increased adoption based on the positive results from initial AOP efforts.
According to Rod, the recent merger (which I didn't even know about) between AspectJ and AspectWerkz creates a de facto standard for AOP with AspectJ 5.0. It was unclear to me exactly why, but he made a comment that he saw AspectJ becoming far more prevalent than JBoss AOP, of which he was candid in his criticism.
AOP is not ready for standardization, largely because according to Rod, there is no need and no value from standardizing. The market will bear out the best uses for AOP, and standardizing now may just stifle innovation.
Implications for the App Server The emergence of third party frameworks and specifically the role of the open-source community converge on the application server vendors in a way that may change their role in the platform. If developers can pick and choose and assemble "best of breed" interoperable J2EE frameworks and technologies, then they don't need the umbrella support of proprietary technology in a particular vendor's application server. Instead of becoming the service provider, the application server can become a simple service integrator.
Technologies to watchFor the purposes of professional development, he encouraged all of us to establish (or sharpen) our understanding of certain technologies. These inculde:
- IoC (inversion of control) and DI (dependency injection)
- Unit testing and TDD (test driven development)
- O/R Mapping (TopLink, Hibernate, JDO, etc)
- Web application frameworks (Struts, JSF, Spring, Tapestry, etc)
- Rich Internet Applications (GMail)
He concluded his talk by warning developers that by not building expertise in frameworks that bring leverage to J2EE development, we risk obsolescence. Get beyond J2EE, learn other technologies and become a domain expert - learn your business's domain model. Solve business problems. Good advice, no?