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!


Friday, September 20, 2013

Blossom 3.0 release candidate 1 released

This week at the Magnolia conference we released Magnolia 5.1 RC1 and with it I released Blossom 3.0 RC1. The feature set is stable since alpha1 but on a deeper level there were many changes to the inner workings of presenting dialogs.

See my earlier blog post on alpha1 for in-depth details on Blossom 3.0 features.

Note that the RC1 of Blossom requires at least Magnolia 5.1 RC1.

UPDATE: The groupId changes to info.magnolia.blossom starting with this release, use this snippet for your maven poms.

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

Blossom at SpringOne 2GX 2013

I had the pleasure of presenting Blossom and Magnolia CMS at this year's SpringOne conference in Santa Clara California. The conference took place over the course of three intense days with tons of interesting talks. At the keynote Pivotal announced the Spring IO platform and Chris Beams even launched the new site spring.io right there on stage.

Our talk was on the first day right after lunch, me and my co-presenter Daniel Lipp showed what Magnolia can do for Spring developers and I shared my experience of integrating it with Spring Web MVC. I wrote the Blossom module so I wouldn't have to write my own CMS for my Spring projects. It surprised me hearing from so many attendees coming to our table in the exhibit hall that that's exactly what many people do.

SpringOne 2GX is also the biggest Grails event of the year. Many attendees I talked to who where there primarily for the Grails talks were thrilled to here about Maglev, the Grails plugin that bundles Magnolia CMS with Blossom and brings it to the Grails platform. Using the same annotation based API but on Grails classes instead.

The slides from the talk is up on slideshare, it was recorded and will be available on youtube soon.







Thursday, August 29, 2013

Magnolia CMS and Blossom on Chariot TechCast

There's a new episode out of the Chariot TechCast, this time the topic of discussion is Magnolia CMS and the Blossom spring integration module. Listen in as Boris Kraft, CTO of Magnolia and myself talk with Ken Rimple about the history of Magnolia, the revamped user interface in version 5 and of course in depth about how the Blossom module works!

The podcast is available on iTunes and as a direct download on the Chariot TechCast site.

For iPhone there's a great podcasts app from Apple, that I discovered only recently. It lets you subscribe to podcasts and can download new episodes automatically when on WiFi as they become available. Check it out and subscribe to Chariot's podcasts, lots of interesting stuff in these for Spring developers.

Wednesday, August 28, 2013

Submit your Blossom questions in our online Q&A

As I mentioned in my last blog post, Blossom 3 brings a number of changes to how dialogs and fields are configured. To make it easier to understand these changes, I'll be hosting an online Q&A in about three weeks to answer user-submitted questions about the new Blossom module.

Register now and submit your questions.

I'll be hosting this online event on 26 September at 5 PM CET (8 AM PDT) together with my colleague Daniel Lipp. If you run into problems integrating your Spring application with Blossom 3, or have suggestions for improvements, this is the ideal forum to make your voice heard and have your issues resolved.

See you there!

Friday, August 23, 2013

Blossom 3 alpha 1 released

I have just released the first alpha of Blossom 3.

Blossom 3 is a major update that brings support for Magnolia 5. In particular the new dialogs introduced as part of the brand new user interface.

Blossom 3 builds on Magnolia 5.1, which is also in development and both will be released this September in time for this years Magnolia conference.

The new user interface is built using Vaadin. A component based UI toolkit where the components run on the server and renders on the client using Google web toolkit. This makes it much easier than before to develop custom fields for your projects.

In previous versions of Blossom you would create and configure controls, now instead you build an object model that defines how the dialog and its fields should appear and behave. This definition
model is then used as a blueprint to create and configure Vaadin components.

For composing the definition model Blossom 3 uses a builder style API that creates a more 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 the fields.

@TabFactory("Content")
public void contentTab(UiConfig cfg, TabBuilder tab) {
    tab.fields(
            cfg.fields.text("title").label("Title"),
            cfg.fields.checkbox("hideInNavigation").label("Hide in navigation").description("Check this box to hide this page in navigation")
    );
}


The fields now have much better support for validation which is why @TabValidator and @DialogValidator have been removed in this version.

@TabFactory("Content")
public void contentTab(UiConfig cfg, TabBuilder tab) {

    tab.fields(
            cfg.fields.text("title").label("Title").validator(
                    cfg.validators.email().errorMessage("A title is required")
            ),
            cfg.fields.checkbox("hideInNavigation").label("Hide in navigation").description("Check this box to hide this page in navigation")
    );
}


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.

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-alpha1
mvn install
cd magnolia-blossom-sample-webapp
mvn jetty:run-war

UPDATE: When running it like this from the command line you might run into issues where the application does not have enough memory, especially in the perm gen pool. To get around that do this first:

export MAVEN_OPTS="-XX:+CMSClassUnloadingEnabled -XX:PermSize=256M -XX:MaxPermSize=512M -Xmx512m"

UPDATE 2: The alpha1 release of Blossom builds on the alpha1 release of Magnolia 5.1. If you need to use a more recent build of Magnolia 5.1 you should use the corresponding Blossom release or use the latest SNAPSHOT.


Stay tuned!