Monday, March 14, 2011

Liferay User Interface Development book review

Liferay User Interface Development is the new Pakt Publishing book focusing on the front end side of Liferay development.

The book offer good guidelines for a migration from previous versions to Liferay 6.

An experienced architect would expect the book to be targeting Front end developers but the reality is in the words of the authors "This book is for any Java developers"

I will not jump again into separation of concerns discussions as I have covered that in deep already. Rathert I will go through the book highlighting my impressions. Hopefully it will make the reader aware of how much can be expected from this publishing work.

The first chapter shows Liferay from inside with information about the myriad of technologies it uses. Not a useful chapter for front end development but perhaps a good chapter to educate yourself on terminology and internal Liferay architecture.

The second chapter addresses Theme development. It goes through steps about configuring Eclipse to host the plugins SDK folder, the bundle folder, the source folder etc. I personally prefer Maven projects for any plugin development and that combined with agile deployment gives a faster environment but the book goes through the traditional ant method to build and deploy plugins.

Chapter 3 introduces Layout development and goes deep in the details about how actually the rendering mechanism works in Liferay (which is based on Struts framework)

Chapter 4 combines an explanation about permissions, navigation, internationalization (prepare the portal to support different locales) and localization (Adapting Liferay to respond to specific locale) and how to actually set default values for theming and layout. Velocity tips are given for common operations like removing the Dockbar from the default theme, showing a different logo and so on. It also covers configuring Liferay through XML changes to achieve things like grouping portlets in categories or disabling certain portliest. Finally it goes over customization of Portlets and Control Panel. The name of the chapter in my opinion is some kind misleading "Styling pages" but other than that the information provided is very practical and of great use especially for Portal Admins in charge of Page/Portlet configuration.

Chapter 5 is called "Advanced Theme" and it guides the user through features like color schemes. Again more usable real life hints are provided like for example embedding the SignIn portlet in the header area. The majority of the tricks are about tweaking the velocity template portal_normal.vm from your selected theme. Guidance is provided to migrate a theme from previous version of Liferay to the new version. Be prepare for a lot of diff/copy/paste. The newly supported FreeMarker is introduced as an alternative to the existing Velocity templates. It explains conventions followed on existing CSS, Javascript, folder structure for images and browser compatibility hints. Especially for Java developers that are not that aware of front end difficulties this chapter offers several hints that would help on skinning Liferay. An introduction to Liferay Eclipse plugin follows with some recommendations to use ViewDesigner Dreamweaver plugin for Designers (I have met several designers and they all use OSX and not much of Dreamweaver but if you are a Designer that works on Windows and use Dreamweaver then the plugin might be good for you) Finally it presents several plugins for Firefox and Chrome as recommendations for your toolset.

Chapter 6 is about the Portlet User Interface. It explains the different types of Portlets, how to deploy them using the Liferay Plugins SDK, portlet tags, permission tags and starts a discussion that will be enhanced in following chapters about Alloy UI and UI Taglibs.

Chapter 7 is about Velocity templates, an alternative for JSP widely supported by Liferay.

Chapter 8 is devoted to the newly introduced Alloy taglibs which is based on YUI. This chapter is a good introduction to both YUI and Alloy UI.

Chapter 9 brings a UI Taglib introduction. With UI Taglibs the front end developer has access to rapid error reporting, i18n support, searching, paginator, breadcrumb, navigation, and more.

Chapter 10 finalizes the book with an explanation about migrating from a previous version of Liferay (like 5.2.3) to the newest version 6. While the chapter is titled "User Interface in Production" it does explain how to migrate other components that are not directly related to the front end, after all a web project is divided by concerns but it needs all of its parts as a whole to really work.

Final Thoughts

Even though a pure Front End Developer is not the target of the book (as someone might expect from the title) the book does provide valuable information for Front end developers trying to put their hands on customizing Liferay UI.

To jump into Liferay development the architect will need to make sure the hired front end developer will be fine using Eclipse at least for JSP validations to ensure structural changes in JSP files do not break JSP compilation. But that is half of the path, hopefully the front end developer will be fine to run the whole Liferay bundle locally to develop/customize themes, layouts and portlets.

A Front End developer could use for plugin development just a combination of TextMate and maven to get fast theme development but at this point JSP support in TextMate is very limited.

1 comment:

Mike Bosch said...

Nice Post. Thanks for sharing.