Spring Forward 2006 - The Keynote
After a 1 and a 1/2 hour cab ride, I arrived at Spring Foward 2006 just in time for the opening keynote. It looks like I'll be doing a 2nd talk this afternoon as Clark Richey was unable to make the show. I was given a choice of talks, and I chose "Comparing Web Frameworks" because that's a fun talk to do.
Thomas Risberg introduced the show (and the new Philadelphia Spring User group site), and now Colin Sampaleanu is talking about Spring. Spring 2.0 is fully backwards-compatible. There's a huge user base that demands full backwards compatibility so their old code still works. Spring 2.0 will run on your existing infrastructure: Java 1.3, 1.4 or 5. It'll run on all major application servers, as well as a simple servlet container.
The first major new features in Spring 2.0 are the simpler (extensible) XML configuration, as well as new AOP mechanisms.
XML Configuration in Spring 2.0
- Ability to define new XML tags to produce one or more Spring bean definitions
- Tags out of the box for common configuration tasks
- Problem-specific configuration (easier to write and to maintain)
- XML schema validation (better out of the box tool support, code completion for free)
- Exploits the full power of XML (namespaces, tooling, etc.)
- Backwards compatible (full support for <beans> DTD, complete interoperability b/w classic and extended configuration)
JNDI Lookup example (Spring 1.2.x):
<bean id="dataSource" class="...JndiObjectFactoryBean"> <property name="jndiName" value="jdbc/StockData"/> <property name="resourceRef" value="true"/> </bean>
In Spring 2.0:
<jee:jndi-lookup id="dataSource" jndiName="jdbc/StockData" resourceRef="true"/>
AOP in Spring 2.0
- Simplified XML configuration using <aop:*> tags
- Closer AspectJ integration (pointcut expression language, AspectJ-style aspects in Spring AOP, @AspectJ-style aspects in Spring AOP that are fully interoperable with ajc compiled aspects)
- Build on strengths, eliminate weaknesses
- Preserve ease of adoption (still zero impact on development process/deployment, easier to adopt)
- Benefit from the power of AspectJ
- Spring and AspectJ are still separate projects, but work close together since both projects' leads work for Interface21
AOP is about pointcuts:
- Pointcuts give us the tool to think about program structure in a different way to OOP
- Without a true pointcut model, you only have trivial interception
- By integrating AspectJ's pointcut expressions in Spring AOP, it's a much more powerful AOP framework
Hot on the heals of Spring 2.0, Spring Web Flow 1.0 will be released. It's a full Spring subproject and part of Spring's web stack. Using SWF, you can capture a logical flow of your web application as a self-contained module, at a higher level.
Another interesting project is Spring LDAP. It's a Spring subproject that simplifies LDAP operations - based on the pattern of Spring's JdbcTemplate. It encapsulates nasty boilerplate plumbing code traditionally required for LDAP.
Finally, Spring 2.0+ will support OSGI. So what is OSGI? It's an industry driven framework specification, with multiple implementations. It has a dynamic omponent model, based around the idea of bundles. It's a full component model with classloading (for isolation and versioning), lifecycle control definition, etc. It's the foundation of Eclipse's plugin architecture.
Why do you need Spring-OSGi? Spring-OSGi is an integration library for Spring in OSGi environments. For those that need it, allows a more powerful component programming model. Without Spring having to re-invent the wheel, ApplicationContexts become bundles that are able to import and export services with full isolation and integration into OSGi lifecycles. The project is moving along rapidly, with large amounts of interest and involvement from vendors such as BEA, Oracle, IBM members of the OSGi foundation and the general public.
Finally, don't forget about The Spring Experience 2006. It's 3 days, 55 sessions across 5 tracks, including: Core Spring 2.0, Core Enterprise 2.0, Core Web 2.0, Domain-Driven Design and Just Plain Cool.
Posted by Jason Shao on September 26, 2006 at 05:00 PM MDT #
Posted by Matt Raible on September 26, 2006 at 05:34 PM MDT #