Wednesday, October 9, 2013

Blossom 3.0 released

I'm happy to announce that Blossom 3.0 final has been released!

This release is a major update for Magnolia 5, compatible with Magnolia 5.1 and later. In version 5 Magnolia has a brand new user interface and with it comes a new API for dialogs. This version of Blossom is an update for this API and also contains a few other improvements and new features.

Blossom 3 uses a new builder style API for dialogs with a fluent programming style. A new set of classes replaces the previous API. These classes include a new TabBuilder and DialogBuilder and provides builders for each of the built-in fields, making it easier to configure properties on fields.

A new feature in this release is meta-annotations for component availability. It allows for creating custom annotations that can then be used on components to categorise them. They can then be used for specifying which components can go into an area with the @AvailableComponentClasses annotation. All components having a specified annotation will be available.

@ComponentCategory
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface Banner {}

@Area("banners")
@AvailableComponentClasses({Banner.class})
@Controller
public class BannersArea {}

@Banner
@Template(id = "myModule:components/largePromoBanner", title="Large promo")
@Controller("banner")
public class LargePromoBannerComponent {}

Starting with this release the groupId changes to info.magnolia.blossom, use this snippet for your maven poms.

<dependency>
  <groupId>info.magnolia.blossom</groupId>
  <artifactId>magnolia-module-blossom</artifactId>
  <version>3.0</version>
</dependency>

Using Springs freemarker macros for forms is now straight forward. When rendering freemarker views Blossom will expose a RequestContext object which these macros require, it will also expose everything in the model as request attributes. This feature is enabled by default but can be switched off on the FreemarkerTemplateViewRenderer..

The multipart support that bridges Springs multipart handling to the multipart support in Magnolia has been updated for API changes in Spring 3.1.

New is also AbstractAutowiredRenderingModel which allows for autowiring of RenderingModel classes used outside of Blossom. Very handy.

The sample has also been updated and as always, this is the best place to start.

Get the source and start it up with these commands:

git clone http://git.magnolia-cms.com/git/modules/blossom/samples.git
cd samples
git checkout magnolia-blossom-samples-3.0
mvn install
cd magnolia-blossom-sample-webapp
mvn jetty:run-war

The complete change log can be found in the updated Blossom documentation.

Tuesday, October 8, 2013

Webinar: Blossom Q & A recording online

The recording of my Q & A webinar on Blossom is online. A whole bunch of questions were submitted and I think I managed to answer them all. It starts with an introduction to the module and what's coming up in the next version.

Grab some popcorn, lean back and enjoy!