Wednesday, February 06, 2008

Stripes 1.5 Beta Available For Download

I just copied this straight from the mailing list announcement.

Stripes 1.5 beta 1 is available for download:

http://sourceforge.net/project/showfiles.php?group_id=145476

Some of the major enhancements and bug fixes include:

* Even less configuration! Using the new Extension.Packages configuration parameter, Stripes can automatically locate and use your extensions (TypeConverter, Formatter, ExceptionHandler, ActionBeanContext, etc.). Most applications can now be configured with just two parameters: Extension.Packages and ActionResolver.Packages. Use the @DontAutoLoad annotation to tell Stripes to ignore an extension class.
* Clean URLs. Just declare URI parameters using, for example, @UrlBinding("/SomeBean/{foo}/{bar}.action") on your ActionBean. The parameters will appear as normal request parameters and will be validated, converted, and bound just like normal request parameters, too. Clean URLs are fully supported by s:link, s:url, and s:form.
* Binding access control. Annotate your ActionBean class with @StrictBinding to restrict binding only to those properties you wish to allow. @StrictBinding works with @Validate to determine which properties may be bound to. For special cases, the annotation also supports the "policy," "allow," and "deny" elements. More information can be found in the Javadocs.
* Easier Formatters and TypeConverters. In addition to improvements to the TypeConverterFactory and FormatterFactory APIs, Formatters and TypeConverters can now be loaded using autodiscovery (see above), eliminating the need to extend DefaultTypeConverterFactory and DefaultFormatterFactory. DefaultFormatterFactory has been improved so that it now provides support for inheritance and interfaces. For example, if a Formatter for List is registered, that formatter will be used for any type that implements List.
* DateTypeConverter improvements. A lot of work was put into making DateTypeConverter more robust.
* Transparent encryption of ActionBean property values. You can now use @Validate(encrypted=true) to cause ActionBean property values to be encrypted before being written to a page in a link or form input. This is meant for cases where you want to send a value back to the server with assurance that it is the same value that was written by the server.
* Validation error report. If an ActionBean is called and there are validation errors and no _sourcePage is given, Stripes will generate a nicely formatted report detailing the validation errors that occurred. This is a vast improvement over the StripesRuntimeException that used to be thrown, with no information as to what went wrong.
* New s:format tag can be used to format an object using a Formatter.
* Tags and Resolutions use Formatters. Where String.valueOf(object) used to be called, Stripes will now attempt to format the object using a Formatter and use String.valueOf() only as a last resort.
* @DontBind annotation to completely bypass both binding and validation for an event.
* @DontValidate no longer fails due to type conversion errors.
* Automatic detection of file upload provider. You can select your file upload implementation just by dropping it in. Commons-FileUpload takes precedence over COS if both libraries are present.
* Partial forms. The s:form tag supports a new attribute partial="true|false" that allows for partial forms nested inside another form tag. This facilitates AJAX code that returns HTML snippets to the client that might contain form inputs.
* Optional _sourcePage for links. By default, the _sourcePage parameter is no longer appended to URLs generated by s:url and s:link. This can be overridden with addSourcePage="true". The _sourcePage parameter is still included in forms.
* Encrypted _sourcePage. The _sourcePage parameter is encrypted to prevent revealing sensitive information about the structure of the app.
* Context-relative URLs. The s:link and s:url tags have a new attribute, prependContext="true|false", that can be used to generate URLs relative to the app context (when set to false). Relative URLs can be used with JSTL tags much more easily.
* Client cache control. The new @HttpCache annotation can be applied to an ActionBean class and/or event handler method to control how the client caches the response. Annotations on methods override those on classes and the annotation is inherited from superclasses. This is especially useful for AJAX calls from IE.
* Property labels with annotations. @Validate(label="Some property label") can be used during development to easily label ActionBean properties without having to add them to the resource bundle. Values from the resource bundle override those from the annotation.
* Automatic maxlength on text inputs. The maxlength attribute of a text input is automatically set if a value is specified by @Validate(maxlength=X).
* s:form supports s:param. Parameters can be added to a form URL by included s:param tags within the s:form tag. This is mostly intended for use with clean URLs, but it works with normal parameters as well.

There are many more. The full list can be found here:

http://www.stripesframework.org/jira/browse/STS?report=com.atlassian.jira.plugin.system.project:roadmap-panel

This release is not completely backward compatible with Stripes 1.4. Some changes to your code and configuration may be necessary. Tim has written up a document that will help with the process. It can be found here:

http://stripes.svn.sourceforge.net/viewvc/*checkout*/stripes/trunk/upgrading.txt?revision=831

We encourage everyone to download and test this software out. Your feedback is very important. During the beta period we will be working on updating all the documentation. Any corrections or contributions are greatly appreciated.

3 comments:

Unknown said...

Hi Gregg,

I'm glad to see you guys moving another release forward. Stripes is a great project that deserves the best.

Many of these features sound familiar, but I suppose we are all working on the same things these days. Cheers!

afkham said...
This comment has been removed by the author.
afkham said...

Is this yet another server-side MVC framework? Aren't there too many of those already?

You should read this

http://wisdomofganesh.blogspot.com/2007/10/life-above-service-tier.html


and this

http://groups.google.com/group/wisdomofganesh/web/Life+above+the+Service+Tier+v1_1.pdf