2010-08-08: Parsley 2.3.0 Final released
After three milestones released in recent months, the new version is finally ready. It is a significant update, in a similar way like the 2.1 and 2.2 releases. It contains several bigger feature additions, enhancements and also again comes with increased robustness and improved documentation.
The version should be fully backwards-compatible for application code and configuration, so it can be used as a drop-in replacement for applications based on Parsley 2.2. For custom extensions it is very likely that they need some level of adjustment, as parts of the Extension API were redesigned for this release. In many cases you might be able to continue to use existing extensions though, as some of the older APIs were simply marked as deprecated instead of getting removed.
These are the major additions and enhancements for Parsley 2.3, including all features that were already added in the three milestone releases:
- Decoupled Bindings:
Bindings where source and target are fully decoupled, based on the new
[Subscribe]tags. It is an alternative to classic dependency injection for use cases that require a more dynamic behaviour.
- New <DynamicObject> Tag: Allows to declare dynamic objects in MXML or XML configuration files. Previously dynamic objects could only be added to the Context programmatically. New methods have been added to the core Context interface for obtaining instances of these DynamicObjects.
- New Configuration DSL:
Allows to easily create an entire Context from scratch programmatically.
Useful in UnitTests or Flash Applications where the
<ContextBuilder>MXML tag is not appropiate.
- Support for Property Files: Supports classic property files either loaded at runtime or compiled into the application. The property values can then be used in MXML configuration classes and XML configuration files, allowing to extract configuration values that change often or differ across deployment scenarios.
- XML-Object-Mapper Enhancements: Now allows to configure the mappings conveniently with metadata tags on the properties of the mapped class and also adds sensible defaults, so that in many cases not even metadata is required. Also adds a new configuration DSL to quickly set up a group of mappings.
- Extension API Documentation: The entire chapter has been completely rewritten. The content is better structured now, more suitable for real-world extension scenarios and has doubled in amount of content. It was also adapted for the new configuration DSL which can be used in tag implementations, too.
List of smaller additions and enhancements that make your life easier:
- New [CommandComplete] Tag: Alternative to the existing
[CommandResult]tag for the many use cases where the actual result value is not needed as just some action has to be performed after command completion.
- Managing Metadata Inheritance: The new
[ProcessInterfaces]tags allow to explicitly instruct the framework to reflect on base classes and interfaces, too. Reflection in the Flash Player does not support metadata inheritance out of the box and automatically parsing the full inheritance tree is not possible due to the associated perfomance penalty.
- New <DynamicProperty> Tag: Finally allows to configure generic Objects and Dictionaries in MXML and
XML. The existing
<Property>tag cannot be used for this purpose as it attempts to reflect on the declared property type which is not possible for dynamic properties.
- Support for Declarative PopUps based on Cairngorm 3: The new
<parsley:PopUp>tag is based on the Cairgnorm 3 PopUp library and removes the need to manually connect the PopUp to the associated Parsley Context. Otherwise it supports all features of the original Cairngorm tag.
- New base class for view related MXML tags: For tags that can be placed
into MXML components that are not managed by Parsley, but nevertheless want access to the nearest Context in the view
hierarchy above them. The name of the new class is
List of internal improvements for increased robustness, simplicity and efficiency:
- Synchronized Object Lifecycles: Increased resource-friendly behaviour of the framework: The lifecycle of DynamicObjects is now synchronized in case they get injected into short-lived objects like DynamicCommands. They will be removed from the Context as soon as the object they were injected into gets removed.
- Improved Extension APIs: For implementing custom metadata tags the framework now offers
new options for increased robustness. In particular the new distinction between pure configuration logic (in an
ObjectDefinitionDecorator) and runtime logic (in an
ObjectProcessor) reduces the likeliness for common errors in custom tag implementations.
- Simplified ObjectDefinition Management: Just two types of ObjectDefinitions are left: one for dynamic objects and one for singleton definitions. These turned out to be the ones actually getting used in real world applications, the reduction of choices streamlined the internal APIs. Despite these simplifications there is now an increased level of flexibility since the capabilities of dynamic objects have been enhanced.
The final release of version 2.3 will be followed by several consolidation and maintenance releases over the coming months. Development of version 2.4 will then very likely begin later this fall.
You can download the new version here.