Practical RichFaces

by John Turner

Posted on January 08, 2010


As I had mentioned in a previous post, I recently invested in a couple of books on JBoss RichFaces. Having read and reviewed JBoss Rich Faces 3.3 I set about doing the same for the other book, Practical RichFaces.

The book started out giving the same background information on JSF, RichFaces and Ajax4Jsf but in contrast to JBoss RichFaces 3.3 stated that it will not be using JBoss Seam in the example’s which I was happy about. That is of course not a reflection on JBoss Seam but more my desire to read about RichFaces and not the many technologies that might complement it.

In the second chapter, the book suggests installing JBoss Tools and as I have not used this Eclipse plug-in before I decided I would do just that. It then proceeds to work through a small example to verify the EclipseJBoss Tools installation. This is done in some detail and would be quite useful if looking at RichFaces for the first time.

Some time is then spent introducing the main RichFaces components that support Ajax functionality, namely , , and . These concepts were covered clearly and concisely with good use of appropriate examples. The remaining a4j components are covered in the chapter that follows.

Read More

JBoss RichFaces 3.3

by John Turner

Posted on December 16, 2009


I have been developing with JBoss Rich Faces for a couple of years now and recently I decided to invest in a couple of books on the subject to try and obtain a better (more rounded) understanding of the framework. When purchasing books related to frameworks that already have good reference documentation I’m always sceptical that the book will provide additional insight above and beyond the freely available references.

One of the books I purchased was ‘JBoss Rich Faces 3.3’ which I set about reading from cover to cover. As with many of these books, it builds a sample application to demonstrate the use of the framework in a ‘real world’ application. In this instance, an advanced contact manager is developed.

The development of the application is demonstrated using Seam, Facelets, Hibernate JPA and Hibernate Validator which may or may not be desirable for the reader. I personally have no immediate interest in Seam and I found the level of content dedicated to Seam to be excessive. There are a number of books available on Seam and I would have purchased one of those had I wanted to read about Seam. I have used Hibernate JPA extensively and given that JPA is a standardised API it’s inclusion in the examples is welcome (it makes for more realistic examples).

The demonstration application used the AJAX components of Rich Faces extensively and this was one of the areas I wanted to focus on. Each of the AJAX components is discussed in the context of the contact manager application as well as smaller examples. This does a good job of relaying the key characteristics of the component and its attributes. In particular, the book does a reasonably good job of describing how the AJAX support components interact with the JSF lifecycle.

Read More

Building Twitter with Grails

by John Turner

Posted on December 08, 2009


I have been hearing good things about Groovy and Grails for quite a while now without really knowing much about either. The aquisition of the company that developed Grails (G2One) by Spring Source in late 2008 has naturally added some weight to the Grails movement. Having grown tired of standing, eyes glazed over, as others discuss the advantages delivered by Grails I decided I would learn more.

One of the more popular demonstrations of Grails is that delivered by Graeme Rocher in which he demonstrates building an application similar to Twitter using Grails. A webinar of this demonstration is available for download from the Spring Source website.

The webinar runs for just over an hour and begins by giving an introduction to Grails, what it is, what it hopes to deliver and how it delivers it. This includes how Grails leverages existing technologies such as Spring, Hibernate, Sitemesh and Groovy. Graeme then gives a brief history of Grails explaining its inception in 2005 through to acquisition by Spring in 2008 before using download metrics to give an indication of the current adoption of Grails (70,000 downloads per month at the end of 2008).

The core of the webinar is focused on the demonstration of building Twitter with Grails. Graeme starts by introducing the Grails command line interface and uses it to build the initial project directory and file structure. He gives an tour of the directory structure explaining what goes where before proceeding to install the Spring Security (acegi) plugin for Grails. The functionality provided by this plugin includes the generation of the authentication domain model, authentication manager and login registration process (user interface and controllers).

Graeme then demonstrates the creation of additional domain model objects to which he adds associations and constraints. In order to manipulate the additional domain objects, Graeme creates a controller and associated view (.gsp file). This controller and view facilitates posting a tweet and displaying a history of tweets.

Graeme then proceeds to install and demonstrate the use of the Searchable plugin which facilitates searching for domain objects using criteria queries. This also requires overriding the default view of the searchable plugin. The Searchable plugin and associated view modifications allow the user to add people who they are interested in hearing tweets from.

If someone who the current user is interested in adds a tweet, a JMS message is sent to notify them (update their tweet history) that a new tweet has been added. The JMS functionality is delivered via an activemq plugin which is installed through the Grails command line interface.

Graeme then demonstrates exposing the same tweets via RSS and XML using the same controller that handles web requests.

The key features of Grails are specified as:

  • Plugins to let you rapidly compose an application
  • Plugins that use convention over configuration
  • Not only a web framework but an entire platform (JMS support etc.)
  • Plugins to enable testing (Selenium, Fitness, Code Coverage etc.)
  • Rich Grails (Flex, GWT, Grails UIYahoo UI etc.)
  • Secure Grails (Spring Security, JSecurity OpenID)
  • Integrate Grails (Search, Jasper Reports, JMS)

This was a good introduction to Grails, the command line interface, project conventions and the plugin system. It has piqued my interest sufficiently that I will spend a bit more time (when I have it!) progressing through some of the many Grails tutorials.


Introduction to Data Protection Legislation

by John Turner

Posted on November 27, 2009


As a member of the Irish Computer Society I regularly receive invitations to their ‘Breakfast Briefing’ and ‘Lunch and Learn’ events. I have been meaning to attend the regular ‘Introduction to Data Protection Legislation’ event for some time now and finally got the opportunity to attend one today.

This event was held in the ICS building in Dublin 2 (convenient city centre location), starting with a light lunch at 12:30 with the presentation running from 1pm to 2pm. The presenter was Hugh Jones and I found him very knowledgeable and highly informative. We only had an hour so the aim was to touch on all the facets of the legislation without going into detail.

The presentation started by discussing privacy and the many definition’s it has been afforded over time. A couple of high profile privacy cases are then outlined to demonstrate different legal views on the protection of privacy.

The presentation then proceeds to discuss the particulars of the Irish data protection legislation giving a summary description of the acts. Before explaining the acts further, the terms ‘Data’, ‘Automated Data’, ‘Manual Data’, ‘Personal Data’, ‘Sensitive Personal Data’, ‘Relevant Filing System’ and ‘Processing’ are defined, as well as the characters ‘Data Subject’, ‘Data Controller’ and ‘Data Processor’.

The data processing rules are then explained, along with the individuals rights afforded by the legislation. Finally, enforcement provisions, registration, specific offences, overseas transfers of data and exemptions are discussed.

Coming from a development background and working primarily in this domain I have never required in depth knowledge in this area but it is certainly advisable to have an awareness. This event refreshed my long lost memories of when data protection was covered in my undergraduate degree and I found it interesting. Anyone working with personal data should be aware of their responsibilities and if you are completely ignorant in this area, I would highly recommend this event. It is free to ICS members and a small fee is applicable to non-ICS members.

If you have more responsibility relating to data protection and require more than just an awareness of the legislation, the ICS also provide a 1-day course and 3-day certification in the area. For me, the introduction was as far as I feel would be relevant but i found it very informative and interesting.


Spring Source - OSGi and Modular Applications

by John Turner

Posted on November 24, 2009


OSGi is a dynamic module system for Java which has been gaining quite a lot of publicity in recent times. One of the most well known OSGi implementations, Equinox is used within the Eclipse project to provide its plugin architecture. Spring Source are full members of the OSGi Alliance and have shown their commitment to OSGi with the development of the Spring Source dm Server and Spring Dynamic Modules.

Spring Source have recently added the OSGi and Modular Applications training video to their free online training offering. I was eager to learn more about OSGi and what Spring Source were doing to simplify OSGi in the same way it has with much of enterprise Java.

The training video lasts for just over an hour and provides an overview of OSGi, Spring Dynamic Modules and Spring Source dm Server. It starts with a history of OSGi and the OSGi Alliance and provides some information related to OSGi bundle visibility, the OSGI bundle lifecycle, the OSGi service registry and the OSGi container.

The video then proceeds to a demo entitled ‘Using plain OSGi bundles to share types and services’. The demo uses Spring Source Tool Suite to develop an OSGi bundle which exports a service and then deployes the bundle to the dm Server. It then demonstrates the development and deployment of another OSGi bundle which imports the service provided by the previous OSGi bundle.

Next, there is an introduction to OSGi and Spring which focus on Spring Dynamic Modules and how it simplifies OSGi development in the same way that the Spring Framework simplifies enterprise Java development. A demo entitled ‘Using Spring Dynamic Modules to share types and services’ highlights how Spring Dynamic Modules provides dynamic proxies to services that have been exported to the OSGi service registry. It also demonstrates the use of the OSGi namespace to configure the OSGi services within the exporting and importing bundle.

We are then introduced to some of the issues surrounding enterprise OSGi including incompatible classloading models, lack of web support, appropriate deployment models and lack of enterprise library bundles. This is very useful as it highlights some of the obstacles to be overcome before introducing OSGi to the enterprise. OSGi architectures and partitioning strategies are also discussed highlighting the characteristics of vertical and horizontal partitioning as well as partitioning granularity.

The final demo is ‘Developing a multi-bundle web application with Spring Source dm Server’ which demonstrates a web application consuming OSGi services.

Overall, the training video provides a useful introduction to OSGi and OSGi development using the Spring technology stack. As with the previous free training video the quality of the material was very good and it was presented in a clear and concise manner.


About - MonkeyLittle

Thoughts on Software Engineering, Infrastructure and everything in between.

Twitter Feed