News
2008-01-13
As it can be easily seen, I did not have much time to work on the framework this week end.
Still, I've been able to work on the scope control of the transitions, making it possible to now have "global" (available everywhere) and "inherited" (available in the defining state and all it's direct or indirect children) transitions.
Also, I've slightly improved the WebTest, which now contains a nice layout.
Besides the "cool" design it now has, the layout allows to now clearly see the difference between the simple page reload and the few ajax-based responses being used (by example, when posting a message).
I also added a few more tasks;
- Brainstorm about WebFlow's relationships; giving the possibility to, when creating a new WebFlow from an existing one, establish a relationship between the two of them, allowing informations to directly pass through that link.
- Improve XML parser; although the parser is working quite well, it's structure has become a bit too chaotic and would need a little clean up in the future.
2008-01-06
Yesterday, two tasks were complete;
- AJAX renderers; the hierarchy of the renderers has been reworked and improved, so that the new system allows maximal flexibility
- Pages implementation; the first version of the previously called "views" has been implemented (and renamed, as the "view" name was already used)
Concerning the new tasks to be done, here it comes;
- Brainstorm about users & permissions; even though the handling of security is quite eased through the use of a stateflow-based website, it may be much more improved by setting up a mechanism of permissions for the transitions. That way, the states and transitions don't need to be made especially to handle users' access (by making a set of state for each permission) and, rather than that, you can create transition which will be accessible only to a user with specific permissions. Still, before implementing it, it is first required to think about the best way to manage this security mechanism. li>
2008-01-06, later that day
Ok, I added a basic permission mechanism, which simply consists of giving a WebFlow instance a set of String-based permissions and giving the possibility to define a "permission" element for each transitions in the definition file. Naturally, a transition is "accessible" only if the WebFlow instance asking for it possesses the required permissions (or if the transition didn't specify any permission).
Other than that, I also made a first little version of the WebTest project, which allowed me to find a few problems with the renderer (the buffering of page to be sent as content of the AJAX response was not working in the case of code-generating URL, such as JSP or Struts actions).
This version, as well as the sources, are available in the WebTest section of this website.
2008-01-05
As the website is now available, it will be worked on until it reaches and "acceptable" state.
The same goes for the Wiki (for which a link was added in the menu above).
It should be much better by the end of the week-end.
Also, the focus is now on the WebTest application as it was quite late in comparison to the actual framework development and was not accurately what services were offered.
In the same time, I'll try to work a bit on the WebFlow itself, and here're the tasks I'll try to be working on;
- Making more AJAX transition renderers (such as Alert [JS popup], MultiUpdate [multiple part of the page being updated with a single response], Composite [multiple renderer behavior in a single response], ...)
- Implementing a first version of "views", which will be used to make possible the display of pages not really related to the WebFlow itself (like a FAQ page, which could be called from anywhere), with a taglib allowing to switch to specific view and back to the WebFlow.
- Implementing a first version of scope control for transitions; now, you need to define either a transition or a transitionReference if you want to have a transition accessible in a specific state. The goal of this task would be to give the possibility to set transition either as global (accessible everywhere) and inherited (accessible in the state where it is defined and all the children). li>
- Thinking about an "actions" concept, which would be a subset of transitions, as the only thing they'd do would be to execute code serverside and return a renderer. The objective of those things would be to offer a service allowing to implement technical solution like small Ajax updates in your website (by example, selecting a value in a selectbox would trigger an action on the server which would returns a AjaxUpdate - a new part in the form - without needing to actually execute a transition).
- Thinking about WebFlow definitions inheritance; what would be done, what could be the effects, ...
With that, I hope it'll be possible to soon make a first alpha release so that you can see if it actually useful or not.
2008-01-04
Today, the SourceForge project has been created and the project can now really begins it's growth.
The code source has been committed to the SVN repository, the website has been uploaded to the FTP and everything was set up to work with this new environment.
Let's hope everything goes well and a stable version of WebFlow is available soon ;)
About
WebFlow is a Java framework which offer the possibility to develop a website following a "state-flow" view.
For the developers, it simply means that the pages are designed as "states" and all the actions are designed as "transitions".
Internally, it allows the framework to handle a lot of the workload which comes with the development of a website...
No more thinking about the old usual "pages" paradigm; all the URL, pages, HREF, ... are automatically handled and their use is simplified through simple taglibs.
More than a technical description, a list of what it does to help you might interest you...
- State-flow view of your website, and all the transitions you defined are accessible through easy-to-use taglibs,
- Fully integrated AJAX support, allowing you to directly develop WEB 2.0 applications,
- Single point of entry to the web application; no more playing around with your web application by typing weird URLs,
- Submission of data made through Ajax, more user-friendliness and less problems with the browser's refresh or history
-
All transitions are finally handled by the rendering of AJAX-level responses, allowing for multiple behaviors; page reload, JS script evaluation, partial update, ...
All of that being done without the end user being bother too much by long page reload.
- Support of multi-browser applications; the end user can start up using multiple WebFlow instances in the same time if you want it to be possible,
- Support of multiple WebFlow definitions, along with the management of relationships between the WebFlow instances of a single end user,
How does it work?
To explain how the framework does it's stuff, let's simply study each part one by one;
The WebFlow definition file
The central element of a website developed with WebFlow is its definition file.
This file contains all the states and transitions available and is probably the biggest task to be done by the developers.
For each states, a view (internal JSP page) must be defined and for each transitions, multiple properties can be set (calls to the WebFlow peer, potential results, ...).
The WebFlow peer
The second part of the developer's work is to implement a "WebFlow peer".
Such a peer will be created for each of the end user of your website and will be linked to their WebFlow instance.
This object will be called whenever you defined it in the definition file and will be mostly used to store UI logic and data.
The WebFlow instance
It is the "session" like object linked to each end users visiting the website.
It contains informations about the current state of the visit, and is used as the central point to handle anything related to that end user.
The WebFlow engine
That were the framework does it's job, and that's probably the most difficult part to explain (especially for people like me ;)...
The best thing to be done is to describe what is done when a HTTP request comes in the server.
- The HTTP request comes in,
- The WebFlow engine checks if a WebFlow instance has been created for the end user behind the requests,
- The WebFlow engine either retrieves the already existing instance, or create a new one (along with a WebFlow peer),
- The WebFlow engine checks if a transition is being made,
- If no transition is called, the engine simply renders the view of the current state of the webflow (using the JSP page defined in the definition file),
- Otherwise, the transition data is loaded, the engine executes the transition on the WebFlow instances (calling the defined methods of the peer, switching the WebFlow instance to the new state, ...) and renders the response set up in the calls.
And that's it... In the end, it was not that difficult ;)
Now, let's hope it was enough to shortly explain you how the framework is working...
(for more, you can just go and ready the code on svn :p)
Task List
Task |
Scope |
Date |
ETA |
Status |
|
Brainstorm about WebFlow relationships |
Project |
2008-01-13 |
- |
To do |
Improve XML parser |
Project |
2008-01-06 |
- |
To do |
Implement a first version of permissions mangement |
Project |
2008-01-06 |
2008-01-06 |
Done |
Brainstorm about users & permissions |
Project |
2008-01-06 |
- |
30% |
Add AJAX renderers (Alert, MultiUpdate, Composite) |
Project |
2008-01-05 |
2008-01-05 |
Done |
Implement first version of "views" |
Project |
2008-01-05 |
2008-01-05 |
Done |
Implement first version of transitions' scope control |
Project |
2008-01-05 |
2008-01-13 |
Done |
Brainstorm about "actions" |
Project |
2008-01-05 |
- |
To do |
Brainstorm about WebFlow definitions inheritance |
Project |
2008-01-05 |
- |
To do |
Improve Website |
Website |
2008-01-05 |
- |
70% |
Improve Wiki |
Website |
2008-01-05 |
- |
30% |
Commit 1st version of WebFlow |
Svn |
2008-01-04 |
2008-01-04 |
Done |
Commit 1st version of WebLayout |
Svn |
2008-01-04 |
2008-01-04 |
Done |
Commit 1st version of WebTest |
Svn |
2008-01-04 |
2008-01-13 |
Done |
WebLayout
Internally to WebFlow, another project is develop; WebLayout.
This project offers a taglib in order to help a developer to apply a design to his web application's JSP pages;
- "Bottom-to-top" organization; rather than having a layout file defining which elements it can include, it is the component page that defines from which parent it inherits and which elements it should contain
- Tag based configuration; no more XML or any other configuration files is required, the tags are sufficient to handle the generation of the layout
WebTest
Along with the framework, a little test application has been developped.
It's purpose is to show you, more efficiently than anything else, how it works and how it can help you.
Feel free to get a look at it ;)
In order to make the demo more interesting, you'll need the following login informations (otherwise you'll miss most of the things);
Username: user
Password: pass
The WAR file; webtest.war
The sources; webtest-src.zip