2008-10-20: Cinnamon 0.3.0 adds new extension points
The new Cinnamon version is the biggest update to the remoting framework so far. The main additions are several new extension points in the Client and Server API. Most of them will probably rarely be used by regular application code, but they might be very useful for building frameworks on top of Cinnamon. They were introduced to allow the Pimento data management framework to hook into the Cinnamon request lifecycle, but they are completely generic and may be as useful for other kinds of frameworks.
New Client API extension points
The new ServiceInvocationHandler interface on the Client
side for example allows to transparently modify request parameters or return values of service
invocations before they are passed to the application. Combined with new utility classes like
CachedServiceRequest they allow to add features like caching in a transparent way,
without the application having to deal explicitly with this functionality. The Pimento entity
cache is built on top of these features.
New Server API extension points
On the server side PhaseListener is one of the new extension
interfaces. It allows you to wrap AMF decoding and encoding and service invocations with additional
functionality. Pimento for example uses this extension point to wrap certain phases in transactions
to avoid lazy initialization exceptions.
Documentation for the new features
The new extension points are described in new sections in the manual. The Client API additions are presented here, and those for the Server API here.
New base classes for Unit Tests
Another addition is the inclusion of base classes for integration tests. There are new TestCase base classes for flexunit and dpUInt. The former is more widely known, but the latter also supports asynchronous setup methods, which is especially useful when writing tests for remote invocations.
Java Enum support
Finally Java enums are now fully supported. They will be converted from and to AS3 Strings.
Backwards compatibility
Except for a change in the namespace URI for XML configuration files (see below), the release is fully backwards compatible unless you used the observer classes in the Client API which had been moved to a different package (but even then it would be an easy fix). The underlying Spicelib Java version has also been updated, so you should not just replace the Cinnamon jar when updating existing applications. The new Spicelib jar contains fixes which remove a few minor annoyances when using the Cinnamon Ant tasks (the "guessing" of type mappings now works better, so there are less cases where you have to explicitly declare type mappings). The new Spicelib jar is now also included in the release folder of the Cinnamon download.
The namespace URI for XML configuration files has been changed. The version
was removed from the namespace URI, so upcoming releases are backwards-compatible. You should now use
http://www.spicefactory.org/cinnamon as the namespace URI and
http://www.spicefactory.org/cinnamon/schema/0.3/cinnamon-config.xsd for the schema location.
The latter still contains the version number, but you won't have to change it for upcoming releases.
Unless we are forced to introduce changes that are not backwards-compatible, we will continue to support
older schema versions. The goal is that in the future minor updates can just be dropped into existing
projects without any changes to your application configuration.
Future roadmap
The next Cinnamon release (version 0.4.0) will then focus on those features that we pushed a bit since they are not needed by Pimento, like adding basic support for EJB3 Session Beans and Seam Components. The release after that will then add security features and we decided that at that point we should definitly call the release version 1.0. The leading zero is misleading anyway, since Cinnamon is very stable (the current release doesn't even contain bug fixes since there are no known issues) and we have been using it in production for more than a year now.
The Cinnamon update is the second release in a series of updates that we release for all existing Spicefactory frameworks to prepare for the initial Pimento release. The next update will be Parsley 1.0.2 in about two weeks, finally followed by Pimento itself hopefully sometime in November. We already had a features freeze a few weeks ago, but the entire documentation has still to be written. But you can check out the prerelease version from SVN if you want to give it a try now.
Download
You can download the new Cinnamon version here.
Release Notes - Cinnamon - Version 0.3.0
New Feature
- [CNM-35] - Add support for Enum types
- [CNM-67] - New server-side extension point: PhaseListener
- [CNM-68] - New client-side extension point: ServiceInvocationHandler
- [CNM-70] - Add CachedServiceRequest to Client API
- [CNM-71] - Add ChainedServiceRequest to Client API
- [CNM-73] - Add configuration option to specify custom MessageProcessors
- [CNM-83] - Add support for Integration Tests written for dpUInt
Improvement
- [CNM-50] - Allow method chaining in ServiceRequest addResultHandler and addErrorHandler
- [CNM-63] - Remove resultTransformer and parameterTransformer properties from Client API
- [CNM-64] - Include the default FreeMarker templates for the Cinnamon Generator in the Jar
- [CNM-69] - Rename util package to observer in Client API
- [CNM-72] - MessageProcessor class should be parameterized
- [CNM-75] - Remove version from namespace URI in all XML Schema files
- [CNM-76] - Separate IO processing that is specific for requests sent from NetConnection from general AMF3 IO
- [CNM-79] - Introduce failFast property for ServiceMessageProcessor
- [CNM-80] - Ant Task for AS3 Code Generator should work with Spring configuration that uses imports
- [CNM-81] - Include the abstract base class for remote integration tests in the core source folder and in the SWC
- [CNM-82] - Add ServiceRequest.setParameters method
Task
- [CNM-9] - Add alerts for errors to quick start example app
- [CNM-51] - Update Spring Dependency to version 2.5.x
- [CNM-74] - Add sections to the manual for the new extension points
- [CNM-89] - Update Dependency to Spicelib Java 1.0.1
- [CNM-90] - Update project settings for Flex 3.1 SDK