The more I use the flow inside cocoon, the more I think there is no way back. Not only it enforces SoC, it also removes over-SoC, which happens where you have your information scattered around the entire place (as for PHP stuff, for example).
But if the sitemap is the ultimate pipeline engine and the flow is the ultimate (and transparently statefull!) controller engine, what is the *ultimate* view, the best template system?
There are a bunch of paradigms on the table but they can be separated in two big groups.
1) generation based 2) transformation based
both can be divided further into
a) compilation based b) interpretation based
Stefano, consider what Microsoft did with .NET. They focused on making it easier to build applications by enforcing the MVC pattern from the get go. The proper layering (which works quite well with my GUIApp framework) is to have the Model on the bottom, and apply Controllers to the Model, and finally add the View on top. You might add another layer of controllers for wizards or flow based navigation.
The bottom line is that with a .NET application, the application has the same API whether it is a desktop application or a web application. The Forms tool that they have allows you to map controls onto a form, and they will be automatically bound to the model underneath it. The model is separated from the backing store so that it is additionally easier to migrate from one datasource to another.
When using a tool like DreamWeaver or some other graphical page editor, imagine having that automatically bound to the underlying model. You could in effect redeploy the same application to cell phones, desktops, etc.
It's a really powerful concept--even if Micro$oft came up with it.
I am exploring a framework that basically allows you to slap any view on a working application. It is Swing Based, but I am finding that the event model is very powerful, and can additionally be used for regular applications. You can find it here: http://d-haven.org/guiapp
All the components are connected with an EventBus (Vincent Tence has been a real help to me with this project). Commands and Wizards (which are the control mechanisms in GUIApp) allow you to publish events to all components that need the information. They also control the displaying of screens.
The whole GUIApp framework can easily be reworked to function in a web environment. Things like MenuBars and ToolBars are useful components, even in a web environment. Imagine building your "main screen" using these components--but it spits out HTML instead of displaying a Swing Application?
In fact, you can personalize the look and feel of these components separate and distinct from everything else. The main issue is that we would need to arrange the controls/information on screen without using Swing. We would need either a declarative API that provides a general layout and all the controls, or we would need an active API that delegates to an underlying presentation.
In fact, that would completely rock! The only problem is that such a construct would not require Cocoon to run--or if Cocoon was run it would be done behind the scenes.
The best kind of templating system is one that is invisible to the user. Imagine a generic Layout Schema, and Cocoon simply adds the look and feel. That would be the benefit of a declarative API--which I personally would favor. It would also make it easier to deploy the same application as both a WebTop and a WebApplication.
Thoughts?