Demo of Wisss 0.2.0
by alf
28 01 2008Things are moving on in Wisss, I’ve been working on presentation and business logic over the last couple of weeks. It’s beginning to be presentable. This 0.2.0 milestone is not yet finished but already I can show you how it handles the model and what it generates.
Concerning the metamodel, I’ve defined two new packages: view and workflow. View metamodel allows you to define widgets by adding attributes from class data, references to classes or other widgets. The goal is to avoid generating CRUD forms by mapping to classes, which is not always exactly what we want. In the example, it allows you to create a new blog post with a new category. Another use case is to only show a part of a class.
The workflow metamodel, which may be soon renamed to dataflow (thanks to Tortoose for pointing this out) aims to define simple business processes. Like for views, generating simple CRUD processes is not enough for real projects. You often want a form which will create an object associated with another object or a wizard to dispatch creation in several actions. To achieve this, I’ve made a kind of dataflow to define simple algorithms. It allows you to link activities with each other using transitions and define what is for instance a blog post creation process. Activities can be either predefined or user defined. For instance, there is a Create activity which is related to a class. It takes several parameters in entry, mapped to the related class and returns an object.
For these predefined model entities, I’ve played with the code generated by JET. It’s the part which allows me to have a model editor from the ecore metamodel. For instance, what I’ve made is to add in and out parameters to a create activity when you choose its type.
I’ve made a flash demo of the model creation for a very small blog example (Icon set for new packages have not yet been done).
Concerning generation, I’ve added a configuration file for an apache virtualhost, a simple bootstrap, controllers, business objects and view templates. Each widget generates a template and IO activities (input or output) generate the templates which will be used with the controllers. I’ve used the new partial() function to achieve widget inclusion.
Concerning the work dataflow, I generate a business object for each process which contains a static method for each activity (which is not IO activity). A controller is also generated for each process and a controller action is added for each IO activity. A java service generates activity calls in the right order by browsing transitions.
I’ve also made a flash demo of the generation and the webapp working.
Concerning the next steps in Wisss, I may achieve the 0.2.0 in the next days, implementing all typical activities. The next 0.3.0 will add authentication and ACLs and the 0.4.0 will be the right time to add error management and user code blocks. I may find a 0.5.0 milestone before the 1.0 but I hope it will be the last. Now Wisss is presentable, I hope that the buzz will grow in the PHP community.
Thanks to Akrabat, TubularBell and norm2782 from #zftalk for proof reading.
Categories : Wisss, english






