Professional Documents
Culture Documents
Enterprise Content
Management with
Blossom
A Magnolia Tech Brief
Magnolia CMS
Table of Contents
!
Table of Contents
Introduction
Audience
Key Features
Benefits
Templates
Controller Annotations
Views
10
11
12
Case Study
13
Summary
14
More Information
15
Useful Links
15
Contact Us
15
Magnolia CMS
Introduction
!
Blossom is a Magnolia CMS module that allows developers to use the Spring
Framework and Spring coding idioms with Magnolia CMS. It adds a full set of
enterprise content management features to Spring developers' existing
toolkit, allowing them to rapidly deploy integrated solutions encompassing
multiple back-end business systems.
This Tech Brief introduces Blossom and explains how it enables developers
to combine all the benefits of the Spring programming model with the builtin versioning, workflow, staging and security features from Magnolia CMS.
!
Audience
!
This Tech Brief is written for IT project managers, solution architects and
application developers who have some familiarity with Spring. For project
managers and architects, this brief provides information on the key features
and benefits of Blossom, together with a case study of Blossom in the wild.
For developers, this brief provides information on key Blossom concepts to
help them get started building Blossom applications quicker.
Magnolia CMS
No enterprise Content Management System (CMS), no matter how forwardthinking, will satisfy all your integration requirements out of the box. Custom
programming is always necessary and because each CMS has its own API,
architecture and data structures, there are inevitable delays while your
development team acquires the necessary knowledge. Even after this, there
may still be false starts as developers struggle to understand key features
and implement best practices in unfamiliar programming terrain.
Many developers find CMS' to be hostile territory for the above reasons and
try to work around the problem by developing a custom application to
manage content. This tool is usually designed around a few specific use
cases and offers only a subset of the full functionality of a typical CMS. As a
result, when users need changes, developers must add new functionality to
the tool and end up maintaining a custom CMS. It's a lose-lose situation:
developers waste time and effort, and users end up with only a subset of the
features they really need.
Learn a complex CMS, or build and maintain your own? Neither solution is
optimal. That's where Blossom comes in.
The Blossom module for Magnolia CMS provides a modern and elegant
solution to the challenge of integrating Spring Framework applications and
dynamic content with enterprise websites. Blossom allows developers to
easily extend and integrate core Magnolia CMS functionality, such as multichannel and multi-language support, scalability and mobile templating, with
third-party services and applications using ordinary Spring Framework code.
With Blossom, developers can leverage Magnolia CMS' ease of use to enable
rapid, easy content creation and management workflows. Multi-channel
support and best-practice mobile templates make it simple to support mobile
and desktop websites in a single central system. Multi-language support
makes it straightforward to manage and serve the same web content in
several languages and built-in clustering and load-balancing enable websites
to be mirrored to multiple physical servers without losing content integrity.
By building on existing Spring knowledge and conventions, Blossom reduces
the learning curve for developers and produces clean, robust code that
follows current best practices. You get the best of both worlds: all the
complex business logic and integrations possible with Spring without losing
the core benefits of using an enterprise CMS.
Magnolia CMS
Key Features
!
!
Features from Spring
Magnolia CMS
Benefits
!
Developers
!For
MVC-style loose coupling
! Use
test-driven development for
! and
! more maintainable code
! Use code to extend and configure
! Magnolia's administration and
! content creation interface
! Benefit from automated class
! detection and registration
!
! Leverage built-in versioning,
! workflow, staging and security
! features from Magnolia CMS
For Enterprises
Simplify integration with back-end
business systems
Implement custom content
management workflows that
reflect business processes
Provide a more interactive
experience to end-users
Speed up development by
leveraging your development
team's existing Spring knowledge
Execution Flow
In the typical MVC pattern, requests are mapped to controllers. Controllers
populate models and then views render the models.
REQUEST
CONTROLLER
MODEL
VIEW
Magnolia CMS
REQUEST
CONTENT
TEMPLATE
REQUEST
CONTENT
TEMPLATE
CONTROLLER
MODEL
VIEW
These templates are regular Spring MVC controllers. So, for example, they
can read data from, or write data to, databases or other data stores; invoke
REST APIs over HTTP; or validate and process user input from Web forms.
This makes it possible to add a high degree of dynamism and interactivity to
CMS-managed content.
Magnolia CMS
Templates
PAGE
AREA
COMPONENT
AREA
AREA
COMP.
COMPONENT
COMP.
COMP.
COMP.
Magnolia CMS
Controller Annotations
@Controller
@Template(id=myModule:pages/main, title="Main Template")
public class MainTemplate {
@Controller
@Area("main")
public static class MainArea {
@RequestMapping("/main/mainArea")
public String render() {
return "areas/main";
}
...
AREA TEMPLATE
!
9
Magnolia CMS
Views
View renderers for FreeMarker and JSP are shipped with Magnolia CMS.
Blossom uses these renderers for its views, which can make use of standard
Freemarker and JSP tags as well as tags provided by Magnolia CMS.
Magnolia CMS provides the following custom tags to render areas and
components within a view:
cms:init embeds the CSS and JavaScript that powers Magnolia CMS'
WYSIWYG authoring interface.
cms:area renders an area.
cms:component renders a component.
FreeMarker
[#list components as component]
[@cms.component content=component /]
[/#list]
JSP
<c:forEach items="${components}" var="component">
<cms:component content="${component}" />
</c:forEach>
RENDERING COMPONENTS USING FREEMARKER OR JSP VIEWS
10
Magnolia CMS
Dialogs are described using a model of definition classes. These define the
structure of the dialog, its tabs and its fields. They describe both what the
dialogs and its forms should look like and how they should behave.
Blossoms fluent builder-style API with UiConfig, TabBuilder and
DialogBuilder classes makes it possible to define complex dialogs with
multiple tabs using very compact syntax. The API consists of config classes
that produce builders, the builders produce definitions.
public abstract class BasePageTemplate {
@TabFactory("Meta")
public void metaTab(UiConfig cfg, TabBuilder tab) {
tab.fields(
cfg.fields.text("metaAuthor").label("Author"),
cfg.fields.text("metaKeywords").label("Keywords"),
cfg.fields.text(metaDescription).label("Desc.")
...
DIALOG WITH MULTIPLE FIELDS
11
Magnolia CMS
You can easily change dialog code in your IDE, compile and hot-swap the new
code into an instance of Magnolia CMS running in debug mode. This makes
developing dialogs extremely fast.
Note that is also possible to extend the dialog creation mechanism in
Blossom to use custom config classes or replace UiConfig or TabBuilder
with classes of your own for adding your custom or third-party fields.
Magnolia has a small, well-defined core that provides only the essential
services needed by the system. Most of Magnolia's functionality is
implemented in discrete modules that plug into this core. A module is a
independent component that performs a particular task or packages content
and functionality. These modules are simple JAR files with a descriptor XML
file that declares dependencies on other modules.
Controllers using Blossom are packaged as Magnolia CMS modules.
Deploying these is as simple as copying the JAR files into the WEB-INF/lib
folder of your Magnolia CMS instance and restarting the instance. The
Magnolia CMS update wizard recognizes the JAR files and installs their
contents.
When a module using Blossom is started, it initializes the Spring application
context, registers any @Template-annotated controllers and then adds a
special renderer to the rendering engine that handles delegating requests to
controllers.
12
Magnolia CMS
Case Study
!
Blossom has been successfully used by Magnolia CMS users around the
world to perform complex integrations and add sophisticated business logic
to Magnolia CMS-powered websites. Ticket Leisure Travel, the largest private
travel agency in Sweden and the second largest in Norway, uses Blossom and
Magnolia CMS compete with price comparison sites.
Despite being one of the biggest players in the Scandinavian market, Ticket
Leisure Travel (Ticket) was facing stiff competition in 2007 from price
comparison sites. These sites were emerging as a viable alternative to
traditional leisure travel operators, by allowing customers to view and book
a wide range of travel options entirely online, without the need to visit a retail
store. Although customers still valued the retail stores for the chance to gain
personal service and expert advice, the easy availability of pricing and
availability information on the Web was gradually shifting the purchase
process online.
To stay ahead of competition, Ticket needed a technical platform that would
enable it to deliver dynamic, real-time ticket pricing and availability through
integration with third-party services, and also be scalable enough to handle
Tickets growing transaction volumes. Blossom gave Ticket the ability to
deliver dynamic content through numerous integrations with third party
services and partner organizations.
13
Magnolia CMS
Ticket Leisure Travel uses Magnolia CMS and Blossom to integrate with a
wide variety of services, including:
Google Analytics
Google Maps
Payment integrations including credit card and direct bank payments
Mid-office sales application for email generation
Online forums
Charter searching/booking systems
Exchange rates
Travel guides
Affiliate programs
Today, Ticket has a dynamic, interactive travel portal with full transactional
capabilities, performing more than 250,000 searches per day. With Magnolia
CMS and Blossom, Ticket was able to upgrade its website to become more
dynamic and engaging, offering its users the tools they need to plan and
purchase their vacations online. Blossom has helped Ticket Leisure Travel
differentiate itself effectively from its competitors and offer innovative new
services at a lower cost.
Read more Blossom case studies on our website.
Summary
!
14
Magnolia CMS
More Information
!
Useful Links
Contact Us
!
Head Office
+41 61 228 90 00
info@magnolia-cms.com
+1 (305) 267-3033
info-us@magnolia-cms.com
Spain
Czech Republic
+34 66 263 43 36
info-es@magnolia-cms.com
15
Magnolia CMS
Legal Notices
!
Copyright
Trademarks
Magnolia, the Pulse, the Magnolia word mark and the trinity icons are
trademarks of Magnolia International Ltd. All other trademarks are the
property of their respective owners.
Attribution
Code Font: Anonymous Pro Minus by Mark Simonson
Worker designed by James Fenton from The Noun Project
Database designed by Ed Jones from The Noun Project
Document designed by Timur Zima from The Noun Project
Video Game Controller designed by Michael Rowe from The Noun Project
16