InfoQ

InfoQ

News

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

Spring: unifying themes and complete tour

Posted by Floyd Marinescu on Dec 14, 2006

Sections
Architecture & Design,
Development,
Enterprise Architecture
Topics
Java ,
Transactions Processing ,
Web Frameworks ,
Web Services
Tags
Spring
At The Spring Experience this past weekend, Adrian Colyer keynoted an overview of what the unifying themes of the Spring and what all the capabilities of the Spring portfolio are. For those who still think of Spring as an IOC container, the overview provided a great birds eye view of the entire Spring ecosystem, summarized here.

The keynote began with Adrian talking about the unifying themes of the Spring portfolio, which are simple objects plus dependency injeciton, aspects, and portable service abstractions, plus consistent blueprints of how to get things done. Adrian then showed a diagram of the layering in a typical app, and zoomed in on each layer, presenting what offerings Spring has in the area:

Data access layer
 - JDBC, iBATIS, JDO, Hibernate, TopLink support
 - New JPA support over Hibernate, OpenJPA, Toplink essentials
     - Spring 2.1 may have support for JPA namespaces, common non-standard features (criteria API, user types).
 - other backends: Spring also has support for accessing enterprise systems (CICS, IMS, JCA CCI (CCITemplate))
 - Spring Ldap: provides LdapTemplate that oes resource acquitision and release, iteration, exception translation, utility classes

Services layer
 - Scheduling - JDK Timer or Quartz, run jobs in the background with simple triggers or cron expressions
 - Asychronous tasks via TaskExecutor - can run in a ThreadPool or CommonJ Work Manager via configuration changes
 - Messaging
       - Spring 2.0 extends JMS support to deliver Message Driven pojos that can participate in transactions
       - For XML payloads: Spring Web Services includes an OXM framework (object to xml mapping) that integrates with Castor or JAXB
       - ESB Integration With Mule
                - Mule integrates with Spring's Application Contet event framework as a custom event multicaster allowing you to scan any kind of Mule end point (like pop3, or jms) which then generate application events in Spring
                - you can publish events to mule using normal ApplicationEventPublisher interface
 - Clustering
           - Tangosol Coherence's DataGrid for Spring adds new bean id's with DataGrid scope
                    - no need for cluster wide locking, combines DataGrid bean transaction management, and transactions that can work across the Grid
                    - Java and .Net interoperability is achieved using DataGrid beans
           - GigaSpaces provides access to data in a grid via JdbcTemplate integration or via GigaSpacesTemplate
                    - access MessageGrid via Spring's JMS abstraction
                    - you can submit jobs to parallel processing engine
                    - Application contexts can be part of DataGrids
                    - Java + .NET interoperability
           - Terracotta open sourced their JVM clustering solution, you can Cluster spring without any code changes or dependencies (like DataGrids in the previous examples)
                    - Cluster any singleton spring bean or non-prototype bean
                    - Publish ApplicationEvents acreoss the cluster.. application events broadcast to all the listeners
                    - Cluster Spring WebFlow to enable failover of conversation state
                    -  AOP + clustered beans + Spring JMX = cluster-wide management view

Security - impacts all layers
        - Acegi Security can secure web interfaces, service interfaces, DAO's (eg: do you have rights to this specific account row) and even operations on domain objects.

Presentation layer
   - Spring Rich Client provides a command framework with full data binding and validation
           - management of windows, pages, views, support for gui builds.
   - Spring MVC for a web framework
   - Spring Web Flow - model web interactions as flows and manage state between requests - works in all popular web frameworks
            - declare States and transitions between states
             - simplifies controller logic for workflow type stuff.
             - automatic post-redirect-get
            - browser buttons""just work"
            - Are looking to integrate with JSF later
  - Spring IDE - an Eclipse Plugin whose preview release just went live, supports XML code completion
      - Supports namespaces in Spring Web flow and will soon have a graphical Web Flow editor
      - AOP support of the same quality as AJDT coming: "I've got an aspect and it's got some advice, and these are all the places this advice matches"
  - Web 2.0/ ajax / ria
      - Exposes beans straight out via DWR, JSON-RPC
      - DWS 2.0 support - just add a line in the XML for an existing bean declaration and the javascript proxy to the ojbect gets created 
 
Web services
  - for simple RPC use XFire Exporter
  - for everything else use Spring Web Services, which facilitates contract-first WS development
        - includes object/xml mapping abstraction (OXM)
        - Web Services framework that resembles Spring MVC
        - WS-Security integrated with Spring security

Platforms

  - Spring is part of the OpenSoa collaboration
  -  SCA components can be exposed by any Spring bean in any Spring ApplicationContext

AOP - Spring has always had good AOP support and has strong integration with AspectJ

Spring OSGi - being worked on for Spring 2.1, adds support for this new module/hot deployment standard
    -  makes it easy to configure a bundle using Spring
    - a new Spring namespace handler for OSGi makes it equally easy to define beans representing OSGi services

Dynamic Langauges Integration
 -  Spring supports beans written in dyamic languages (JRuby, Groovy, Beanshell)

After the description of the Spring portfolio, Adrian pointed out that next year they will be looking to do coordinated releases, similar to Eclipse' Callisto framework.

After the keynote a panel of Spring committers assembled, and one question from the audience about whether there was any intention of implementing a good data mapper framework elicited a lot of discussion about what Spring's purpose is.  Rod Johnson stressed that Spring is not in the business of re-inventing existing technology just to call it Spring and suggested looking at iBatis. Rod also mentioned that Spring's aim is to solve problems and it does this by taking a look at what already exists and going as deep as necessary depending on what is already available. For example,  the persistrence templates (HibernateTemplate, etc) go very light since there are existing solutions for persistence, whereas Acegi security goes very deep since security is very important and the J2EE platform doesn't really provide anything.

Matt Raible also blogged detailed coverage of this same keynote. The day before, Rod also delivered a timeline of important Spring events in 2006, declaring the year one in which Spring became ubiquitous. See also the highly-trafficked Spring 2 Update on InfoQ, and the InfoQ Spring-specific content view at InfoQ.com/spring.

No comments

Watch Thread Reply

Educational Content

New-age Transactional Systems - Not Your Grandpa's OLTP

John Hugg discusses high volume transaction processing applications with high and low frequency profiles, and how VoltDB can be used for that purpose.

Cool Code

Kevlin Henney examines code samples to see what can be learned from them starting from the premise that one won’t write great code unless he knows how to read it.

Collaboration: At the Extremities of Extreme

Jason Ayers share the observations he made watching a team of developers collaborating in real time on the same code base, pushing XP, pair programming and continuous integration to their extremes.

Yesod Web Framework

Michael Snoyman presents Yesod, a web framework written in Haskell and containing a web server, templating, ORM, libraries (templating, gravatar, etc.).

Transactions without Transactions

Richard Kreuter and Kyle Banker on how to avoid classical RDBMS transactional systems by using compensation mechanisms, transactional messaging or transactional procedures.

Attila Szegedi on JVM and GC Performance Tuning at Twitter

Attila Szegedi talks about performance tuning Java and Scala programs at Twitter: how to approach GC problems, the importance of asynchronous I/O, when to use MySQL/Cassandra/Redis, and much more.

10 tips on how to prevent business value risk

One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.

Interview: Software Systems Architecture: Working With Stakeholders Using Viewpoints and Perspectives

InfoQ spoke to the authors of Software Systems Architecture on a couple of new topics, the System Context viewpoint and Agile, which have been added to the second edition.