Easy Wizard web flow library announced

Discussions

News: Easy Wizard web flow library announced

  1. Easy Wizard web flow library announced (17 messages)

    The first public release of Easy Wizard, an open source lightweight web flow library is available. Easy Wizard allows you to define and control sequences of web pages, known as "wizards". Similar products include Struts Flow, Struts Workflow Extension and Spring Web Flows.

    Easy wizard uses the same concept of Finite State Machine (FSM), as other flow engines. However, a differentiator here is that Easy Wizard integrates the FSM with the domain model, allowing for easier synchronization between state changes and model updates.

    Easy wizard has the following features:
    * Every state is an object, referring to domain model properties.
    * Every transition is an object, which can validate itself.
    * Transitions are evaluated in order of their rank, first valid is chosen.
    * wizard state is stored completely on server
    * wizard state is always in sync with domain model state
    * wizard view is always in sync with wizard state
    * Back browser button is disabled (on some browsers)
    * defined competely in Java, no clunky XML files
    * can be reconfigured in the runtime
    * state machine and domain model integration can be tested without J2EE classes and without user interface
    * A user can leave a wizard, browse other site, then navigate to the wizard location again and resume at the same state.
    * Serviced from one single location, no query parameters in URL
    * Any page can be safely reloaded

    Easy Wizard consists of three components:
    * Rule Engine (the Easy Wizard FSM integrated with domain model)
    * UI Wrapper (user interface controller/view module)
    * framework adapter (Struts and JSF integration already available, WebWork and Spring is in works.)

    Related articles:
    Easy Wizard's state machine.
    How to create Rule Engine for New User Signup Wizard. (java.net)
    Easy Wizard's approach to user interfaces. (java.net)

    Try live demo of New User Signup Wizard for Struts. See how it reacts on page refresh, on Back or Forward buttons.

    Visit homepage of Easy Wizard project, where you can download the source code or pre-built WAR file.

    One note: you need to design the actual pages for a wizard yourself.

    Comments are highly appreciated.

    Threaded Messages (17)

  2. Webwork support?[ Go to top ]

    I'm curious about when webwork would be supported. Is there any official roadmap?
  3. Webwork support?[ Go to top ]

    I'm curious about when webwork would be supported. Is there any official roadmap?
    No, there is no official roadmap. This project started off as Struts add-on, then I decided to port it to other frameworks. During the porting process, I have to learn these frameworks too ;) Thus, Struts integration is the best and simplest one, JSF support is not as clean and slick as it should be, but I am working on that. WebWork integration seems to be easier than JSF, but I cannot tell right now how much time will it take. Every framework has its features and quirks.
  4. What is the license?[ Go to top ]

    Why is it people post "freely available" without posting a license in a clear spot, VERY annoying.
  5. Not only annoying...[ Go to top ]

    But it also makes the software useless in a business environment.
  6. Finally found it...[ Go to top ]

    /*
     * Copyright 2004-2005 Michael Jouravlev.
     *
     * Licensed under the Apache License, Version 2.0 (the "License");
     * you may not use this file except in compliance with the License.
     * You may obtain a copy of the License at
     *
     * http://www.apache.org/licenses/LICENSE-2.0
     *
     * Unless required by applicable law or agreed to in writing, software
     * distributed under the License is distributed on an "AS IS" BASIS,
     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
  7. What is the license?[ Go to top ]

    Why is it people post "freely available" without posting a license in a clear spot, VERY annoying.
    It is a business-friendly Apache license: http://www.apache.org/licenses/LICENSE-2.0
  8. Thanks.[ Go to top ]

    Thanks for answering so quickly. Eventually, I found it in readme. However, it would be handy if it was on your website :-).
  9. No Back button???[ Go to top ]

    * wizard state is stored completely on server
    * Back browser button is disabled (on some browsers)

    If the back button cannot be used with this tool, as is the
    case in the "new user signup"-demo, this is not something I can use... but the first sentences seemed promising...

    The back-button introduces many problems in web application design, but it cannot be ignored. To quote Jacob Nielsen:

    "The Back button is the lifeline of the Web user and the second-most used navigation feature (after following hypertext links). Users happily know that they can try anything on the Web and always be saved by a click or two on Back to return them to familiar territory."

    I have created web sites with dysfunctional back button... but it is really embarrasing, and I'd rather not talk about it...
  10. No Back button???[ Go to top ]

    * wizard state is stored completely on server* Back browser button is disabled (on some browsers)
    If the back button cannot be used with this tool, as is thecase in the "new user signup"-demo, this is not something I can use.
    Why would you need Back button in a wizard, which is a once-in-a-while temporary object? There are buttons on the form to navigate within wizard, if you want to go back from wizard to your previous page, you can always do that.

    But contrary to what you imagined, Easy Wizard does not prohibit you to use Back button. It just tries not to give you that opportunity by serving all content from one URL. Why would you need to see a stale page of the wizard which does not correspond to its current state anymore? But if you feel like reloading a page or clicking Back, wizard tries to provide the accurate response.
    ... but the first sentences seemed promising...The back-button introduces many problems in web application design, but it cannot be ignored. To quote Jacob Nielsen: "The Back button is the lifeline of the Web user and the second-most used navigation feature (after following hypertext links). Users happily know that they can try anything on the Web and always be saved by a click or two on Back to return them to familiar territory."
    This is correct in relation to text/news/media websites, where you just browse link by link, without changing anything. In web application you update server data, so it is highly undesirable to give you opportunity to update the _same_ data again. Even worse, without you realizing it. Why would you want to be able to pay for your shopping cart in online store, and then to click Back and to see you shopping cart again?

    Easy Wizard tries to behave predictably and to render a correct page, if you use Reload/Back/Forward buttons. Back button is disabled on MSIE and Mozilla/Firefox, but is enabled on Opera, because Opera adds everything to its session history even if the content is served from the same location. What is worse, Opera does not reload pages marked with "no-store" cache control header. Easy Wizard fights with this by checking its current state (which is stored on server), and by not accepting input data from pages, which do not correspond to current state.

    Wizard is not a hyperdocument, not even a CRUD application. It should be accessed only as a whole, not with a link to certain page. You should not be able to save a bookmark to a certain wizard page, simply because it is a temporary object, rendered according to its state.
  11. Is the wizard independent?[ Go to top ]

    * framework adapter (Struts and JSF integration already available, WebWork and Spring is in works.)

    for J2EE, framework is everywhere. does Easy Wizard supports the unknown framework? how to? I think it is an important question.
  12. ...having been doing this for years. Tapestry maintains state and page flow is easy; you have to disable the back button yourself.

    Cocoon and Seaside are continuations-based systems where this kind of scripted flow is fundamental from day one. See http://cocoon.apache.org and http://seaside.st

    bill
  13. Actually...[ Go to top ]

    ...you don't really even have to disable the back button in a properly implemented continuations-based system. If you hit the back button. The framework keeps track of where you are in the flow, maintaining state as you go along. If you hit the back button, the framework's internal pointer simply moves back a step in the flow, remembering where you are at all times.

    bill
  14. Actually...[ Go to top ]

    I found out about Cocoon Control Flow two years ago, when I was thinking about flow engines. This is a nice and novel approach. Easy wizard differs from Cocoon in following:
    * it uses pure Java, does not use Javascript
    * does not use XML sitemaps, no parsing; just a simple linked list of Java objects
    * rule engine contains of just three tiny classes with no other dependencies
    * rule engine does not have any knowledge of web-related issues
    * rules can be compiled, debugged and run with standard JDK in console mode (no J2EE or UI)
    * wizard is self-contained and can be easily integrated into most Java web frameworks
    * it provides clean relationship between states and data belonging to them
    * it allows programmer to deny input of data, that does not belong to current state
    * it does not save a bunch of data describing current state into continuation object (well, it uses session-scoped object, so no big diff I guess)
    * it allows easy backward navigation, branching and runtime reconfiguration (I guess Cocoon allows all this as well)

    Can you explain, please, how Cocoon handles Back browser button? How Cocoon knows, that it has to show previous state, does it store state ID in the page? And why does it have to pull previous state when a user simply clicked Back button? Conversely, Easy Wizard always keeps current state and displays a page corresponding to it. Pages are marked as non-cachable, so a user would not be tempted to go back to to submit the same page again. State can be changed only explicitly, when user acts on a wizard. It cannot be rolled back just by clicking Back button.

    Continiations can be serialized to the database, this is cool. But simple wizard which is the target of Easy Wizard project, are temporary objects, and do not need to be serialized.
    Actually you don't really even have to disable the back button in a properly implemented continuations-based system.
    Seems like people get my words about Back button backwards. Once again:
    * Easy Wizard uses Redirect-After-Post pattern to load next view with a separate clean GET. You can reload any page any time.
    * Pages are marked as non-cachable and are rendered according to current state. If you click Back, then you will not see the previous content
    * you are allowed and encouraged to click Back, Forward, Refresh and whatever you want. You can leave the site, and then navigate back to the same URL, wizard will be there in the state you left it.
    * Easy Wizard uses a simple trick in addition to redirection, by serving all content from the same location. In this case some browsers do not add pages to session history, and thus do not enable Back button. Easy Wizard does not disable Back button, it simply fools a browser into thinking that it loads the same page over and over and over again. If browser adds each responds to the history, this is fine: click Back and get page with is relevant to current wizard state.
    If you hit the back button, the framework's internal pointer simply moves back a step in the flow.
    This is exactly that Easy Wizard does not do.

    Easy Wizard is different from Cocoon Control Flow and I think that there is room for both.
  15. Interesting[ Go to top ]

    Interesting work, well done. I wonder how difficult is to port it into a JSR-168 portlet framework. Any ideas?
  16. Will it support Spring?[ Go to top ]

    Do you plan to integrate it with the Spring framework?
    Any plans to make it more customisable like using a xml file to define the flows e.g.(Spring Webflows)
  17. Will it support Spring?[ Go to top ]

    Do you plan to integrate it with the Spring framework?
    Yes.
    Any plans to make it more customisable like using a xml file to define the flows e.g.(Spring Webflows)
    No. At this moment I do not see the benefits of having XML config file. Easy Wizard can be very easily defined in Java code, can be easily reconfigured in runtime, and can be tested with JDK only, without external files, parsing, etc.
  18. Saving state to database[ Go to top ]

    Easy Wizard is really good. Thanks for this excellent web flow library. I have a quick question. I want to persist the state to a database while moving through the web pages.

    The scenario is as follows. There is a save button on each page of wizard web page and the state is saved to the database as each page is done with. Can you please suggest me a good way of doing this.


    Thanks,
    Venus