Posts Tagged ‘spring web flow’

According to feedback from our users, one of the biggest learning curves with MyEclipse for Spring is understanding everything that gets generated.  And, when you consider all of the new scaffolding options (Spring Web Flow, Spring-Flex, GWT, iPhone Web) that are now supported in MyEclipse for Spring 8.6, there’s now even more to understand.  Our primary focus has been on making the product rich in code generation functionality and easy to use, but we’ve learned from recent customer feedback that we need to do a better job of explaining exactly what comes out of MyEclipse for Spring.

The MyEclipse for Spring 8.6 Reference Guide now contains a new section called Scaffolding Blueprints.  For each supported web client (Spring MVC, Spring Web Flow, Adobe Flex, GWT, and iPhone Web) and application layer (web, service, domain and data access), the blueprints provide (1) a blueprint diagram and  (2) an inventory of generated files.  Many of the 8.6 early access users have reported that these blueprints have been a tremendously helpful reference and provide a great jumpstart for understanding the capabilities of MyEclipse for Spring.

Read the full post at http://bit.ly/dAFb1m

All Spring Web Flow Editors are not created equal.  The purpose of this post is to outline some of the key differences between the Spring Web Flow Editors found in SpringIDE and MyEclipse for Spring.  I’ve also included some screenshots to further illustrate how working with a Flow Editor that is intuitive and feature-rich can make all the difference when developing applications with Spring Web Flow.

Read the full post at http://bit.ly/9nmb2X

The first milestone (M1) release of MyEclipse for Spring 8.6 is now available! This major release of MyEclipse for Spring includes:

  • New options for application scaffolding.  Generate Spring MVC,Adobe FlexSpring Web Flow, and iPhone applications in minutes.  Support for Google Web Toolkit (GWT) scaffolding will be included in the GA release next month.
  • New Code Assistant capabilities that facilitate the annotation-based development of Spring and JAX-WS artifacts
  • Over 200 bug fixes and enhancements

As a reminder, MyEclipse for Spring includes all the features in MyEclipse Professional.   And, existing MyEclipse for Spring 8.5 subscriptions are eligible to receive the 8.6 release at no additional cost.

There are two ways to get your hands on M1.  Existing Pro subscribers can use the add-on option in the Dashboard tab of the Software & Workspace Center, while new MyEclipse users can download a free, 30-day trial at http://bit.ly/asbbYo

Give it a try and let us know what you think!

The production release of MyEclipse for Spring 8.6 is currently targeted for late June.

In case you missed it, the replay of last week’s “Application Development Secrets: Spring Scaffolding” webinar is now available.  Hosted by Genuitec and Skyway Software, see how MyEclipse for Spring is being used to generate ready-to-run Spring applications in minutes.

The webinar also includes a sneak peak at the new scaffolding options coming in MyEclipse for Spring 8.6, including Adobe Flex, GWT, Spring Web Flow and iPhone application scaffolding.

Watch the webinar replay here.

Once you’re ready to give it a try, download MyEclipse for Spring, and let us know what you think.

You’ve probably seen all the cool new features with 6.3, and I’m sure you can’t wait to dive into what it can do.  Having the privilege of using it for the past couple months while its been in development, I been able to discover interesting and easier ways to do things during my development based on specific requirements in my projects.  Here is a list of these items, and I hope you find them useful:

  • JSF / Spring Faces: JSF Integration just got a TON easier now with 6.3 and the ability to use Lists.  Check out the Spring faces wiki article and the sample TPS project.
  • Web Flow Validation: There’s nothing in 6.3 that changes this technique, but now it’s formally documented in our wiki under Validating WebFlow Models.
  • Quartz Integration: Ever need to schedule a job?  May the Quartz be with you! Okay, yes – again, I’ll stick with my day job.
  • Pagination AND Sorting: Pagination is easy (with EE).  Sorting is easy.  But put them together, and there’s several approaches that you can take.  Here’s one reusable approach as a tutorial and sample To Do List project.

Hope these help!  Let us know what you think!

Dave

In conjunction with the release of Skyway Builder 6.2, we’ve published an updated series of videos for generating a Spring MVC application using Skyway Builder.

All Skyway Builder videos can be found here, and here’s a list of the Spring MVC tutorial:

These videos cover the Spring MVC tutorial that can be found under Skyway Documentation.  There’s also a Spring Web Flow tutorial that produces the same application as the Spring MVC, but it uses Spring Web Flow instead.

Skyway Builder 6.2 has undergone some big changes in the web layer.  In addition to adding support for Spring Web Flow, the support for Spring MVC has been enhanced.  The signature of an operation can now be explicitly defined, and a broader set of objects can be used as command objects and model attributes.  Furthermore, variables can now be added to a Controller.

In Skyway Builder 6.1, the approach for implementing the model of a Spring MVC application was to create a single object called a Model that contained all the variables and constants needed by an operation, which is used to implement web methods.  Operations were defined under these model objects, and all operations contained underneath a model shared the model variables.  Any and all variables that you wanted to accept as input data, return as output data, or use locally with an operation for execution were defined in a Model.  This approach was effective and technically accurate, however developers really wanted more fine-grained control in the definition of web methods.

Note: In previous versions of Skyway Builder, the web methods of a controller were called Actions.  In Skyway Builder 6.2, Actions have been renamed to Operations.  This was done to bring the implementation of controllers into alignment with services, which both have a concept of operations that have input and output parameters.  The implementation of service and controller operations is nearly identical.  The term Action is now used to refer to the artifact that’s used for implementing operations using a model-based approach (Skyway Steps).

As result of developer feedback, we decided to enhance the flexibility of the web layer.  In Skyway Builder 6.2, the signature of an operation can now be specified. It’s still possible to implement applications using the earlier approach; however, the new approach gives the developer fine-grained control over the data that can passed into and exposed from an operation.  It also opens access to additional data, including the request object, the response object, the session object, the locale, request parameters, and validation errors. This enhancement also lets you define operation variables that are used for implementing the operation logic.  Operation variables can not be manipulated externally, and are only available to JSP pages if explicitly mapped to an output variable.

Another change is that you can now define controller variables.  Controller variables are generated as Spring @ModelAttributes in the code, and they are available to all operations defined under the controller.  The variable name is used as the name of the model, and it’s used to reference the variables from the operations defined under the controller and from JSP pages.

Along with the definition of operation signatures, operations can now use any data type as a parameter.  Developers are no longer limited to using the Skyway Model objects.  As a matter of fact, the use of Skyway Model objects is completely optional.  You can use anything that is supported by Spring, including domain objects, form backing objects or primitive variables.  A model is still useful for aggregating a set of related variables and exposing them as a single @ModelAttribute, and a model also has configurable scope (request and session).  If you have data that you want span multiple requests, a session-scoped model can be used instead of defining session scope controllers.

In order to support these changes, the Skyway meta-data model had to change a bit.  In the diagram below, you see that Operations and Models are now peers.  A Controller can have a Model and Operations as direct descendants.

metamodel4

To stay in the loop on the upcoming 6.2 release, please follow us on Twitter or join the Skyway Community. As one of the many benefits of joining our community, you will automatically receive product announcements and updates.

In features preview #3 I shared the new Spring Web Flow support in Skyway Builder 6.2, and I hinted at another feature related to Spring Web Flow that is also coming with Skyway Builder 6.2.  Spring Web Flow is an excellent alternative to Spring MVC for implementing web applications, but unfortunately, authoring the flows can be a bit difficult because the flows are defined in XML.  You need to learn the web flow schema in order to be able to define the flows of your application.  Furthermore, it’s hard to visualize the application flows in XML format.  What is needed is a flow editor that lets a developer define flows visually, and that’s what is provided with Skyway Builder 6.2.

webflowsample

The Spring Web Flow editor is one of Skyway Builder’s newest visual editors.  The Skyway Builder flow editor is very similar to Skyway Builder’s action editor, except that you implement flows instead of operations.  You start with an empty canvas which represents a single flow, and you drop different web flow states (i.e. view, decision, action, subflow and stop) onto the canvas.  State transitions are defined by drawing lines between the states and specifying the event associated with the transition.  Actions can be added to flows and states.

The biggest advantage of using Skyway Builder’s visual editor is that you can visually model the flow of the application.  The application flow is inherently a diagram.   While XML is a perfectly suitable format for storing the flow data, XML is not adequate for visualizing or authoring a flow.  A developer would never take an XML file to a business analyst and say “here’s the flow of the application“.  A visual representation of a flow is a better medium for developing, understanding, and communicating a flow.  Whether the a flow is defined using a UML diagram, the back of a napkin, or in your head, it is very common for the flow of a web application to be visualized as a series of nodes, representing views, and lines connecting the nodes.  This is exactly the visualization provided by Skyway Builder’s flow editor.

The flow diagram is directly tied to the XML file representing the flow.  As a flow diagram is updated, the flow XML is also updated.  Spring Web Flow is often regarded as a DSL for page flows.  Unlike the other layers of a Spring web application (i.e. MVC, service, and data) where Skyway Builder needed to define a DSL, Skyway Builder is able to leverage the Spring Web Flow DSL.  Skyway Builder persists the changes made to the flow diagram directly to the flow XML file.

Another benefit of modeling flows is that a diagram can guide a developer in the context of what the developer is trying to configure.  For example, each flow state has a different set of configuration options that is defined by the Spring Web Flow XSD. A developer would need to reference the XSD to understand the available configuration options, but Skyway Builder’s flow editor will only present the developer with contextual configuration options that are available for the specific element of the flow they are configuring.

Spring Web Flow only defines the page flow of the application, and eventually, application logic existing elsewhere is going to be required.  Using an expression language, a developer can make calls to other resources, and Skyway Builder’s flow editor adds content assist to facilitate the selection of those resources.  For example, when you need to specify a type, the content assist will help you select a type from your project.  When you need to call an operation from the service layer, the content assist will help you select a service and operation.  The editor’s awareness of the other artifacts in your application makes it easier for a developer to leverage the other artifacts.

To stay in the loop on the upcoming 6.2 release, please follow us on Twitter or join the Skyway Community. As one of the many benefits of joining our community, you will automatically receive product announcements and updates.

One of my favorite new features of Skyway Builder 6.2 is support for Spring Web Flow, a project from SpringSource for simplifying the development of web applications.  While Spring Web Flow is compatible with Spring MVC, Spring Web Flow uses flows instead of controllers for implementing the web layer of an application.  Since Spring Web Flow has functionality for managing application state, it is best suited for implementing the functionality where the activity being performed by the end-user spans multiple page requests.

For example, an online commerce application typically has checkout functionality which spans multiple pages.  One page may require that you confirm the items in your order, with the option to add/remove items and change quantities.  The next page may solicit shipping information, including picking shipping options and providing a shipping address.  The next page is used for entering billing info.  The bottom line is that checkout is a unit of work, and there are many intermediate steps to complete the checkout process.

A group of related steps to accomplish a task are referred to as a Flow.  While this functionality can be implemented with Spring MVC, Spring Web Flow has features that make it considerably easier, including:

  1. XML-based flow definitions – The flow of the application is defined in XML.  No custom Java is needed to implement a flow.
  2. Expression language support – An expression language lets you leverage logic from the other layers of the web application.  Logic that a developer would typically put into a controller, that isn’t handled by Spring Web Flow, can be expressed in XML using the expression language.
  3. State management – Variables can be scoped (many scopes are supported), and Spring Web Flow will automatically handle the cleanup of those variables when they are out-of-scope.
  4. Modularization of flow logic – Flows can be re-used from other flows.

Spring Web Flow was used successfully in earlier versions of Skyway Builder, but there wasn’t any automated support for Spring Web Flow.  Skyway Builder 6.2 reduces the complexity of adding Spring Web Flow support by automatically configuring the project for you.  The moment you add the first flow to your project, Skyway Builder will add the necessary Spring configuration and libraries.  That by itself is a significant time saver, but Skyway Builder goes one step further in regards to Spring Web Flow (see feature preview #4).

To stay in the loop on the upcoming 6.2 release, please follow us on Twitter or join the Skyway Community. As one of the many benefits of joining our community, you will automatically receive product announcements and updates.