Rich Web Experience

JSFOne

Private Events

Blogs

View all Blogs >>
  • Andrew Glover

    Co-author of "Continuous Integration"

    Enjoy the reading, baby: Continuous Integr more»

  • Michael Nygard

    Agile technology leader and dynamicist

    If large amounts of dirty data are actually valuable, how do you go about collecting it? Who's in the best position to amass huge piles? more»

  • Keith Donald

    Lead of Spring Web and Creator of Spring Web Flow

    I am pleased to announce that Developing Rich Web Applications with Spring, a three-day bootcamp lead by SpringSource engineers on web... more»

  • Mike Levin

    Software Developer specializing in Web2.0 websites

    “ align=“left” Del.icio.us is one more»

  • Matt Raible

    Creator of AppFuse and author of Spring Live

    Last Thursday, Kevin Brown visited LinkedIn's Mountain View office to do a presentation on Shindig, more»

  • Ted Neward

    Enterprise, Virtual Machine and Language Wonk

    If you've peeked at my blog site in the last twenty minutes or so, you've probably noticed some churn in the template in the upper-left... more»

  • Neal Ford

    Application Architect at ThoughtWorks, Inc.

    OK, it's finally here. I g more»

  • Richard Monson-Haefel

    VP of Developer Relations, Curl Inc.

    more»

  • Nathaniel Schutta

    Author, speaker, software engineer focused on user interface design.

    I don’t get to go to quite as many conferences as I’d like but luckily more and more organizers are putting talks on-line or... more»

  • Alex Miller

    Sr. Engineer with Terracotta Inc.

    I’m just starting to build out an app that uses Hibernate. I started with Hibernate mapping files but switched over to using JPA... more»

  • Pramod Sadalage

    Co-author of "Refactoring Databases:Evolutionary Database Development"

    When creating a Foreign Key constraint on the database as shown below ALTER TABLE BOOK ADD (CONSTRAINT FK_BOOK_ more»

  • Guillaume LaForge

    Groovy Spec Lead & Project Manager

    more»

  • Pratik Patel

    Software Architect

    I've been (very) slowly hacking away at new-and-improved Dojo plugin for Grails. I've found that Dojo, not Grails, has been my bottleneck -... more»

  • Graeme Rocher

    Project Lead of the Grails Project & CTO of G2One

    Apologies for not posting as frequently recently, I've been hard at work on the second edition of "The Definitive Guide to Grails" and also... more»

  • Jeff Brown

    G2One Director Of North American Operations - Groovy and Grails Developer

    G2One have announced our G roovy/Grails No more»

  • Jared Richardson

    Agile coach and co-author of Ship It

    Ouch. I feel guilty. The Joy of Tech on 3G iPhones more»

  • Ryan Shriver

    Business and Technology Consulting

    more»

  • Venkat Subramaniam

    Founder of Agile Developer, Inc.

    I have been waiting for this book since I saw my friend Neal more»

  • Jason Rudolph

    Author of Getting Started with Grails

    As of 8:55 EDT, there’s no direct link to the store just yet, but you can “hack” your way in. Just search the iTunes st more»

  • Howard Lewis Ship

    Creator of Tapestry and HiveMind

    I'll be flying into Cambridge, UK for a week of Tapestry training. I'll be there from Sunday through Thursday night before returning to... more»

  • Erik Doernenburg

    Principal Consultant @ Thoughtworks

    For a few releases the Apple development tools have included OCUnit and many developers have now started to write unit tests. There are lots... more»

  • Brian Pontarelli

    Brian Pontarelli - founder of Inversoft

    Found a good shortcut for getting access to hidden folders in OS X file dialogs and the Finder. It requires some typing and it doesn’t... more»

  • Vladimir Vivien

    Software Engineer / Consultant

    Judging from the list of features that will be included in NetBeans 6.5, more»

  • David Bock

    Principal Consultant, CodeSherpas Inc.

    I just spent this weekend speaking at the Ag ile IT Exchange conference i more»

  • Scott Leberknight

    Chief Architect at Near Infinity

    I ran into a situation the other day with Groovy that baffled me at first. Let's create a range from 0.0 to 10.0 and then use it to check if... more»

  • Kirk Knoernschild

    Software Developer & Mentor

    I’ve published a summary of the OSGi survey results on the APS blog more»

  • Stuart Halloway

    CEO of Relevance

    I was talking to Tim the other day about auditing Rails projects, a more»

  • Brian Goetz

    Author of Java Concurrency in Practice

    This surprised the heck out of me.�� We recently finished a new TV room down in the basement.�� We have a 50″ plasma TV, mounted on the... more»

  • Jason Harwig

    Senior Software Engineer at Near Infinity

    I was reading a blog entry at more»

  • Craig Walls

    Author of Spring in Action

    For quite some time I've been pondering OSGi and how it fits into enterprise Java. And that interest has been magnified over the past month... more»

  • Pete Behrens

    Organizational Agility Coach

    Marti nig & Associates Methods & Tools group recentl more»

  • Joseph Nusairat

    Author of Beginning JBoss Seam & Co-Author of Beginning Groovy & Grails

    Today is the first day of JBoss World, I survived the first three presentations and waiting for the keynote to be  complete to d more»

  • John Heintz

    Principal Consultant with New Aspects of Software

    This post is to mostly keep track of the numerous blog threads going on about IDLs and schemas for REST. I find myself with more to say that... more»

  • Brian Sam-Bodden

    Java author, Ruby geek and Open Source Advocate

    In this installment we are going to build the Dashboard page of the Tempo application. T more»

  • Mark Fisher

    Spring Integration Lead

    In my recent post, I had mentio more»

  • Ron Bodkin

    Chief Software Architect, Quantcast

    I'm looking forward to speaking at The Rich Web Experience conference in San Jose next month. The event runs from September 7th through 9th.... more»

  • Mark Goodwin

    Web Application Security Specialist

    We've already looked at one of the two big problems posed by anti DNS pinning on Java applets; because there's rebinding on the applet and... more»

  • Scott Davis

    Author of "Groovy Recipes" & TDD Expert

    Every time I see a live show at the Denver Botanic more»

  • Romain Guy

    Java User Interface expert.

    more»

  • Ramnivas Laddad

    Author of AspectJ in Action, Principal at SpringSource

    InfoQ.com has published my AOP myths and realities talk recorded at a No Fluff Just Stuff conference. InfoQ.com founded by Floyd Marine more»

  • David Geary

    Author of Graphic Java and co-author of Core JSF

    The 2006 NFJS tour kicked off t more»

  • Jason Hunter

    Author of Java Servlet Programming

    I just posted the JDOM 1.1 release for download. This release includes about 20 improvements and bug fixes. more»

  • Kito Mann

    Editor-in-chief of JSF Central and the author of JSF in Action

    In this three-part series, author and Java™ developer Andrei Cioroianu shows you how to automatically save form data in a Java Web... more»


In the Spotlight - Keith Donald

Lead of Spring Web and Creator of Spring Web Flow

Keith Donald is a principal and founding partner at SpringSource, the company behind Spring. He is best known in the Spring community for creating Spring Web Flow. At SpringSource, Keith is the lead of the Web Products Team. His team, based in Melbourne, Florida, sustains the development of Spring Web MVC and Web Flow and their associated integrations, and is also responsible for future innovations in the domain of web frameworks.

Since the first Spring Experience in 2005, Keith, with Jay Zimmerman of NoFluffJustStuff Software Symposiums, has served as director of the popular conference series.

Keith is also the principal architect behind SpringSource's state-of-the-art training curriculum, which has provided practical training on Spring to over 3000 students worldwide.

Over his career, Keith, an experienced enterprise software developer and mentor, has built business applications for customers spanning a diverse set of industries including banking, network management, information assurance, education, and retail. He is particularly adept at translating business requirements into technical solutions.

Keith's blog can be found at http://blog.springsource.com/main/author/keithd














Presentations by Keith Donald

JavaServerFaces: The Biggest Loser of Java Web Frameworks?

The Biggest Loser is a popular fitness TV show where severely overweight participants undergo radical transformations to get their lives back on track. Some might say JavaServerFaces has the reputation of being the severely overweight web framework of Java. Is it possible for JSF to shed the pounds and transform itself in the eyes of Java developers? Come to this session to find out.

Decorating Web Pages with Ajax using Spring JavaScript

Spring JavaScript is a JavaScript abstraction framework that allows you to progressively enhance a web page with behavior. The framework consists of a public JavaScript API along with an implementation that builds on the Dojo Toolkit. Spring.js aims to simplify the use of Dojo for common enterprise scenarios while retaining its full-power for advanced use cases. Come to this session to learn to use Spring.js and Dojo to create compelling user interfaces.

Spring Web Flow 2 Deep Dive

Web Flow is a Spring Web MVC extension that allows you to define Controllers using a higher-order domain-specific-language. This language is designed to model user interactions that require several requests into the server to complete, or may be invoked from different contexts. This session dives deep into the features of the Web Flow definition language, and illustrates how to use it to create sophisticated controller modules.

New Features in Spring Web

Spring has a number of interesting modules for web application development, including Spring Web MVC, Spring Web Flow, Spring JavaScript, and Spring Faces. This session will provide an overview of these modules and show how they relate to one another. By the end of this session, you'll understand how Spring simplifies the development and deployment of rich web applications. You'll also gain a glimpse into the roadmap for Spring Web 3.0.







SpringSource Team Blog
The voice of SpringSource


Keith Donald's complete blog can be found at: http://blog.springsource.com/main/author/keithd

Thursday, July 17, 2008

I am pleased to announce that Developing Rich Web Applications with Spring, a three-day bootcamp lead by SpringSource engineers on web application development, is now available.�� This intense, hands-on workshop teaches how to apply the latest versions of Spring Web MVC, Spring Web Flow, Spring JavaScript, and Spring Faces to create rich web applications.�� It [...]

Thursday, March 27, 2008

Today I am delivering a presentation entitled Spring for Java Server Faces at TSSJS in Las Vegas. The presentation looks at how JSF and Spring fit together, and walks the audience through approaches to integrating these two technologies.

The slides are available for your viewing pleasure, and for you to use as you see fit.

In the presentation, I outline two approaches to integrating JSF and Spring. The first approach is what I call “JSF-centric”, which is the integration approach most folks with a traditional JSF background employ today. The second approach is what I call “Spring-centric”, which is a new, groundbreaking approach to JSF integration driven by the work done in the Web Flow 2 distribution.

There are two demos in this presentation, one showing an example of a “JSF-centric” Spring web application, and another showing a “Spring-centric” application that uses JSF as the UI component model. There is also a comparison of the two demos at the end of the presentation.

To review and run the demos mentioned in the slides:

  1. Use SVN to checkout https://springframework.svn.sourceforge.net/svnroot/springframework/spring-webflow/trunk.
  2. Access the build-spring-webflow directory and run ant. You’ll need ant 1.7 to build.
  3. After the build completes, fire up Eclipse and import the spring-webflow-samples projects into your workspace. The booking-jsf project shows the “JSF-centric” approach. The swf-booking-faces project shows the “Spring-centric” approach.

Enjoy!


Tuesday, March 11, 2008

The Web Flow team has been working hard on Web Flow 2. We just reached our 4th milestone and will enter release candidate status as early as next week. The 2.0 final release is scheduled for the end of the month.

Between now and 2.0 final, we’d like your feedback! If you are an application developer currently using Web Flow 1.x, or evaluating Web Flow for use in your project, please give 2.0 M4 an evaluation and let us know what you think. If you are a web framework provider integrating the Web Flow engine into your framework, we encourage you to evaluate the refined hooks in 2.0 M4 and give us a shout out.

In the next few paragraphs, I’ll provide 2.0 M4 highlights for application developers using Web Flow and framework developers integrating it into their own web frameworks:

Application Developers

First, by far the best way to evaluate the latest Web Flow feature set is to take the reference applications included in the distribution for a spin. There are two reference apps in 2.0 M4, both flavors of a “Spring Travel” trip booking application. One flavor shows Web Flow integrated into Spring MVC with JSP views, the other shows Web Flow integrated into Spring MVC with JSF views. (see: How to Deploy)

One of the major themes of the 2.0 release is ease of use. Web Flow 2.0 M4 introduces many new features that simplify implementing flows, and we would love your feedback on those. Specifically:

  • We have introduced a simplified XML flow definition syntax. Take the latest Spring Travel reference application for a test drive to see it, or compare the old version of one of our example flows to the latest version. What do you think? Much of the simplification comes from enhanced use of EL and simpler tags for executing actions. For example, you can now use EL to execute any method on any Spring bean, in addition to any flow variable.
  • We have introduced integration with Spring Security 2. The Spring Travel reference app shows how to secure a flow using the “secured” element. You can also secure states and transition elements as well.
  • There are several new “rich web” features in 2.0 M4. You can mark a view-state a “popup” and its view will be rendered inside a popup dialog for you (a Dojo popup by default). You can also use the new “render” tag inside a transition block to request partial rendering of a page after processing an Ajax event. Finally, try turning Javascript off in the Spring Travel application and notice how the application continues to work. We’ve worked hard to build in support for degradation, which is important for our customers that cannot rely on Javascript being available on the client.
  • We have significantly reduced the length of a FlowExecution key. The 1.x key format had flow execution URls looking something like this: http://localhost/booking?_flowExecutionKey=_c1E11178E-485F-3913-98BA-86E17A09FA3D_kE977CB0B-47FE-3319-A688-FE4F4FFFCE2.
    The default 2.0 format gives you simpler URLs like: http://localhost/booking?execution=c1v1, where the first number is your conversationId and the second number is your view (or continuation) id. The URL format is still configurable of course.
  • There is more to checkout; see the release announcement for a description of additional new features.
Framework Developers

One of the goals of Web Flow has always been “make it focused on doing one thing really well [implementing flows], and make it easy to extend”. The core of Web Flow plays the heavy-lifting role of providing the most complete flow engine available. In this role, we encourage other framework providers to build on our work and for them to let us know if integration is not as easy as it should be. The Grails community is already doing this, having incorporated Web Flow into Grails for implementing flows in Groovy (Grails is built on Spring MVC, and Web Flow is a natural MVC extension, so the fit is there).

There are a couple of things we are doing in Web Flow to make it easier to integrate for framework developers. First off, there are essentially three main extension points:

  1. The FlowExecutor SPI allows the Web Flow engine to be embedded in another environment, such as a web framework. This is how Web Flow integrates into Spring MVC, for example. We view Spring MVC as the definitive Java-based MVC platform, but if you cannot use it as a base this hook is there for you.
  2. The FlowBuilder SPI allows you to incorporate another syntax for defining flows. Our XmlFlowBuilder ships with the Web Flow distribution. Graeme Rocher developed a Groovy-based flow builder for Grails.
  3. The ViewFactory SPI allows you to integrate a view framework into Web Flow for rendering views within a flow. This is how Spring Faces provides JSF support for Web Flow, and also how the RSF team at The University of Cambridge is integrating Web Flow with their framework. Other candidates for integration using this extension point I can think of include Wicket, Flex, and perhaps GWT.
  4. Each of these extension points has been simplified in version 2, and the ViewFactory extension point is new. 2.0 M4 also introduces a new “AjaxHandler” extension point for integrating Ajax request/response handing, with a implementation that works with Spring Javascript. We’re also currently working with the IceFaces team on integration with their Ajax component library in time for 2.0 final.

    The generally available release of Web Flow 2 is right around the corner. Help us make it as easy to use and extend as possible!


Thursday, November 15, 2007

Spring Web Flow 2.0 M2 has just released. I am particularly excited about this release because it sets the foundation we need to realize the bold vision we have for our community for the future. In this entry, I’ll explain what that vision is, and exactly what this foundation will enable. I’ll also go into detail about the architecture of Web Flow 2.0, and compare it to the 1.0 version.

The Spring Web Flow 2.0 Vision

The goal of 2.0 is to evolve Spring Web Flow as a controlled navigation engine to offer significantly improved support for JavaServerFaces, flow managed persistence, and asynchronous event handling (Ajax) natively. The new Spring Faces project will build on Web Flow 2.0 to provide first-class support for JSF views in a Spring environment. In addition, Web Flow will continue to provide first-class support for Spring MVC-based views, allowing native JSF and MVC views to be used to full-power, even in the same application if desired.

* UPDATE: The vision above was updated on 1/11/08 after considering large amounts of feedback from the Spring community since The Spring Experience 2007. Based on that feedback, Spring Web Flow 2.0, scheduled to release in March 2008, will remain focused on the orchestration of controlled navigation and application transactions in a web application, usable as a complement to Spring MVC in an action-based MVC environment and JavaServerFaces in a component-based environment. When used with JSF, Spring Web Flow 2.0 can power an entire JSF-based web application as a “black box” or can be mixed with standard JSF navigation handlers that implement free-navigation requirements. 2.0, therefore, will be an evolutionary release adding first-class support for JSF and Ajax, supporting Java 1.4+, and providing full backwards compatibility with the SWF 1.0 flow definition language.

Now I’d like to go into a little more detail about the Web Flow 2.0 engine architecture, and how it compares to version 1.0. First lets start with a little 1.0 history.

A Little 1.0 History…

In Spring Web Flow 1.0, the SWF controller engine cared for one half of the web request lifecycle; the half related to request processing, often called the action phase. The other half, the render phase, was pushed off on the caller: either Spring MVC, Struts, or JSF front controllers. This can be shown in the SWF 1.0 architectural diagram below:

SWF 1.x Architecture

The primary benefit of this architecture is it makes it natural to introduce Spring Web Flow onto existing projects. Whether you are using Struts, Spring MVC, or JSF, you can plug Web Flow in to handle your more complex user interactions, and use plain controllers for the rest.

The downside of this approach is it makes it difficult to apply application control logic during the view rendering phase of the request lifecycle without resulting to front controller specific adapters. Consider, for example, the desire for a flow-managed persistence context. Such a context should be allocated when a new flow execution begins, de-allocated when it ends, and disconnected after intermediate view renderings while we wait for the user to continue. If view rendering is not under the flow’s control, how do you issue the disconnect callback at the right time? Similar problems exist in the areas of exception handling, concurrency management, and security.

Another downside of the SWF 1.x approach is it requires duplication of effort to “fit” Web Flow in to some environments, particularly a JSF FacesServlet. In the JSF case, both Web Flow and the JSF implementation were fighting over control over the URLs and how to manage server-side state.

Enter Spring Web Flow 2.0

Beginning with Web Flow 2.0 M2, the entire web request lifecycle is now under the control of Spring Web Flow, including the view rendering phase. Furthermore, Spring Web Flow can now render responses using any view technology, with first-class support for Java Server Faces and Spring MVC-based views. In effect, this means SWF 2.0 is one of the few in its class that offers a unified controller model for all types of user interactions — stateless and stateful alike — with support for multiple view technologies as well. This also means the entire web request lifecycle can now be observed using native Web Flow execution hooks, allowing for security, exception handling, performance management, concurrency management, and persistence context management policies to be applied centrally at the proper points in the request lifecycle
The new SWF 2 architecture, shown running inside a Spring MVC DispatcherServlet, is shown below:

SWF 2.x Embedded Architecture

Subtle, but important difference.
As of Spring Web Flow 2.0 M2, four concrete Web Flow view handling strategies have been proven, and one to several of these strategies can be used in any one web application. Each of these strategies is highlighted in turn below:

Java Server Faces

The first view handling strategy supported is Java Server Faces. Through the Spring Faces project, the SWF engine can now act as a container for JSF and fully drive the JSF UI component lifecycle, combining all the strengths of the SWF application controller model with all the strengths of the JSF UI component model. As a result of this, we bring the following to the table for our community:

  • A Spring-centric way of configuring and deploying a Spring Web application that uses JSF. To get up and running, you deploy a Spring Web Servlet and point it at your bean definition files, very similar to how you configure a Spring MVC web app today. No faces-config.xml or any other special JSF artifacts are required. This makes it very easy for Spring users to take advantage of JSF without any of the traditional drawbacks. You can even use JSF inside a Spring MVC DispatcherServlet if you desire, when running in “embedded” mode.
  • Automatic support for POST+REDIRECT+GET pattern to prevent duplicate submits and browser warnings when using browser navigational buttons. This is possible for the same reasons: Spring Web Flow supports this pattern natively, and we have integrated JSF into our model.
  • Flow-managed UI component state. This is particularly interesting as use of JSF traditionally implies a large amount of HTTP Session state for storing the component tree. JSF component state is now fully managed as SWF FlowExecution instance state, which means how that state is stored is a function of the flow execution repository in use. This means it is possible to implement a JSF app with no session storage whatsoever. This also means session storage is never allocated for stateless or “REST-ful” interactions. It also means when session storage is allocated for stateful flow executions, the amount of storage allocated is less and the scope of that state is defined (and generally shorter in practice compared to your traditional JSF web application).

External Systems

The second type of view handling strategy we have proven is the ability for the SWF engine to communicate with external systems and conversational contexts over HTTP (though the API is protocol independent). A good example of this is what a e-shopping site might use a third-party like paypal for. Lets say you are guiding the user through a e-shopping experience, and as part of that experience you need to pause and redirect the user to paypal to complete a payment authorization process. Paypal, after taking over control for authorizing payment, will then call you back so you can resume the user’s e-shopping experience from where you paused. This is supported generally by passing the external service a callback URL it redirects to when it is done.

Such a pattern is now supported natively by the SWF engine. To do something like this, you would simply issue an “external redirect” to the external system. Spring Web Flow now handles embedding the proper flow execution callback URL in the redirect that is sent to the external system.

Resources

The third type of view handling strategy we have proven is the ability to serve resource content (images, javascript files, css files, etc) from resource bundles such as .jar files. We have a pre-defined “REST-ful” flow installed by Spring Faces for serving Javascript and CSS resources needed by the Ext and Dojo libraries, when Ext and Dojo JavaScript widgets are rendered by Spring Faces JSF components.

Spring MVC Views

Finally, the fourth type of view handling strategy we have proven out is the ability to serve Spring MVC-based views. This allows existing Spring MVC view templates to work as they always have with Web Flow 2.0, which is important for our existing Spring MVC and Web Flow users.

Conclusion

This post provided a high-level overview of the goals of the Spring Web Flow 2.0 release, and the architectural groundwork laid in the recent Spring Web Flow 2.0 M2 release. Watch for follow up entries that highlight the key new features in M2, and the new features we are busy implementing now for M3. Jeremy Grelle, lead of the Spring Faces project, particularly has a lot exciting to talk about regarding the new JSF and Ajax support!


Friday, May 18, 2007

When Sun scheduled my JavaOne 2007 session on Spring Web Flow for Friday, the last day of the conference, I wasn’t sure what to expect. I was honored to have been accepted again this year, but I wondered what I would see in terms of attendance presenting on the last day of the 4-day conference.

I could not have been more pleased with how things transpired. When I checked in at speaker setup on Thursday 800 people had pre-registered for my Friday session. Fifteen minutes before my talk was to begin the room had reached that number. In the end, 1000 JavaOne attendees came to room 307-310 of the Moscone center to experience an adrenaline-powered Spring Web Flow test drive.

Spring Web Flow Test Drive

In this blog I am hoping to re-create some the most exciting parts of my JavaOne Web Flow presentation. Checkout the screen cast below to see what was personally the most exhiliterating part of the presentation for me–building out a search flow from the ground up for deployment in a Java Server Faces (JSF) environment.

This search flow lets you enter some search criteria, see some results, execute a new search, and browse a result’s details if you choose (existing WebFlowians will recognize this as the JSF version of the familiar Phonebook sample application).

When watching the screen cast note how Web Flow manages all navigation and state for the application, while standard JSF components care for view rendering and model data binding. Also note even when I screw something up I can quickly fix it and get back to work because I never need to restart my server or switch my editor.

The Spring IDE visualization of this flow is below:

Search flow

Get the code for this demo here. If you are using Eclipse with Web Tools you can import phonebook as an Dynamic Web Project and fire up the webapp inside your IDE.

Spring Web Flow at Spring One

Be sure to catch Erwin’s talks on Spring Web Flow at SpringOne on June 20th-22nd. He’ll be presenting two very interesting sessions that show how to put this product to work.