Demo of Wisss 0.2.0

by alf

28 01 2008

Things 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.



Wisss icon set

by alf

6 01 2008

While preparing the Wisss module for Acceleo 2.2 release, I’ve made a tiny icon set to replace default one and to show you a simple Wisss model :

Wisss model

I’ve seen that old demo videos have been clicked although the link is down. I will put them back in the next days.



Wisss 0.1.0

by alf

5 01 2008

It’s 6. a.m. I’ve not yet commited since the Acceleo’s SVN is down but I’ve achieved my first milestone : manage persistence. For now, Wisss allow to define a data model, similar to Merise and generate all DTO and DAO based upon Zend Framework.

I will enhance this feature in the future but it can already save dto in a mysql database. It manages 1-1, 1-n and n-n associations too. It allows you to save each object independently or in one step with a “sync” method. Loading is done by lazy loading and array of primitive type attributes are serialized to blob.

It avoids duplicate objects (and then save memory) by using a dto registry wich insure that there is only one instance of a same Business Object (or Dto, no distinction in Wisss for now) at a time.

Concerning the saving policy, I’ve put the focus on generating optimized queries. That’s why a change recorder observe each object for changes (sic!) and is then polled during saving process to only insert or update what is needed.

Finally, the “sync” method have to be preferred most of the time since it shortcuts the problem of browse a graph of objects. It browses the dto registry and save all new or modified objects. The save method will be useful for specific saving inside a transaction.

Bugs must remain but I’m very happy of what I’ve done, mainly in the last 2 days rush. I’m hopeful for the future, a future where I do not bother anymore about writing sql queries rather than concentrating on business logic. Simplicity like in Zope is possible, even in PHP !

See you later, I need to sleep and come back to my musician life for the week end.



libmodbus 1.2.2 is out!

by Stéphane

2 01 2008

libmodbus is an old project but I never wrote a post about it, 2008 is the right year!

I recently released 2 new versions to include some bug fixes :

libmodbus 1.2.2 (2007-11-12)
- Fix #161989 (Konstantinos Togias)
Serial device paths more than 10 chars long (eg. /dev/ttyUSB0) don’t
fit to modbus_param_t -> device char[11] var.
- Structure is also bit better ‘packed’ to conserve memory (see the
trunk for a real enhancement).

libmodbus 1.2.1 (2007-11-02)
- Fix #159443 (Stefan Bisanz)
Index of incoming data in force multiple coils function
- Deleted useless code in check_crc16()
- Untabify source code
- Changed author’s email (Stéphane Raimbault)

The development continues (slowly) in trunk to include the slave component of the protocol.