Sunday, January 30, 2011

From 0.6 to 0.7

It has been a long time since the last release. There has been many changes from 0.6 to 0.7.

Context has finally matured to such state that it can really be used. At this point it needs projects that try to use it and try to push it boundaries so that it will evolve into 1.0.

Here are the biggest changes what has happened:

Component model simplified


The earlier component model contained quite many classes and interfaces such SimpleElement, CElement, EnhancedElement and EnhancedSimpleElement. These classes were needed when Context was mixing non-annotation besed control with annotation based one. Now that has evolved so that all those classes were replaced with a class Component and one annotation @Buildable

Attribute handling


In the earlier version there was one class to handle all attribute conversions. Now that has been replaced with serializer for each java-type. The same serialializer are also used in JSON-serializing when needed.

Name and package refactorings


Many packages and class/annotation/interface names were refactored to more clearly reflect their intended purpose.

Sarissa dependency removed


Earlier a library called Sarissa were used to parse page updates. This dependency had a nasty habit to conflict with jQuery and I found that I really did not need its full capabilies. Sarissa was removed and replaced with much simpler solution.

What's new


Lifecycle listener


Context now contains a method that can be used to track and interrupt the lifecycle when page is opened or udpated. This is useful for opening and closing database connections or otherwise modify the flow in exceptional circumstances.

Property provider


In previous version framework read properties from System properties. Now, this can be intercepted if needed.

Resource loading from jars


In previous version all dynamic resources needed to exist in the project itself. With improved resource loading mechanism resources are also loaded from jar-files and has simplified the project configuration.

Buildins


Buildins is a similar concept to mixins. Buildins are classes that can be mixed during build process as they were part of the buildable class itself. This is useful for instance providing external information such URLs or meta-information that does not belong to the original class itself.