Skip to main content

Summary of June's Manchester Spring User Group Meeting

I missed the first Manchester Spring User Group meeting back in April which I heard was excellent so I made sure I didn't miss June's meeting.

The sessions (based at the University of Manchester Core Technology Facility - cool building BTW) were organised by Cake Solutions (in particular their MD Guy Remond) and it was Guy that introduced the evening and laid out the agenda. Just a quick note about the venue, it's a very new tidy building, the room was an excellent size (seating for 50+ people) and coffee (and cake!) were provided. Parking was free and immediately outside the building, just press the buzzer and mention the Spring User Group...

The first talk was by Paul Sweby (of CapGemini) entitled:

Spring in Government - Improving System & Personal Performance

Paul works on the HM Revenue & Customs website and started his talk by providing some pretty impressive statistics: around 40 million tax payers use the HMRC web site for various purposes. The software is developed by CapGemini, the systems integration provided by Fujitsu, with BT providing the network connectivity.

Previous versions were composed of a mixture of COBOL, Java and .Net, and since 2000 it was predominately Java with stateless sessions beans and the facade pattern.

Since then this has been ripped out and replaced with Spring. It's now made up of the following software technologies: Spring 2.0, Hibernate 3.2, Apache Commons, Drools 4, and the following supporting components: F5 BigIP, Apache, WebLogic, Oracle 10g (with RAC)

Here are the notes that I was able to capture as Paul described some of the key points to being able to build such a large scale application:
  • Minimal use of JavaScript to ensure widest reach and browser compatibility
  • Uses REST extensively - will be migrating to Spring 3.0's REST support
  • Strictly one business call per request
  • The HTTP session is bad, difficult & expensive to replicate, compromises the compliance of the browsers navigation features (back button)
  • Minimal shared user data is maintained (around 2k) this is passed around between servers either via the database or sometimes as hidden fields on the page
  • Because of the above the pages are all bookmarkable
  • Careful planning of the URLs is important due to the use of REST and the exposure of data and services as 'resources'
  • Using CruiseControl (and possibly Hudson) for continuous integration
  • The used agile 'by stealth', test first development and 'barely enough' modelling
Future plans include:
  • Increased use of Spring Batch
  • Migration from Spring 2 to Spring 3 (remove the concrete inheritance of the controllers)
  • Add support for 'Web 2.0' components
The Spring-based system described above was able to deal with 400,000 filings on the last allowed day (Jan 30th) with 40,000 submissions filed in the last hour alone! For the tax year of 2008/2009 over 5.8 million tax returns were filed, with a saving to the government of £20 million. Pretty impressive stuff!

There was a little break which contained a mention of the Manchester Spring User Group sponsors: UMIC, Hays IT, Skills Matter, SpringSource & Cake Solutions and a mention about a new open source portal/forum/community site called OpenSource-Central.

The next talk was by Russ Miles (author and MD of OpenCredo amongst other things) and his talk was:

Grails Eye for the Spring Guy

Grails is an "open-source web application framework that leverages the Groovy language and complements Java Web development". It aims to make you more productive by providing a natural process from idea to concrete solution. It follows the 'convention over configuration' approach giving you an opinionated 'right way' of doing things - this is helpful in that fact that if you follow it's way of doing things you end up doing your work in less time, it's taken care of a lot of the mundane and background tasks for you.

After Russ explained some of the core ideas behind Grails, he then proceeded for the rest of the presentation to build a simple web application from scratch using Grails. He started by asking Grails to create the basic project structure: grails create-app and then followed by explaining some of the directory structure.

Without writing any code he then started his web application: grails run-app and navigated to a simple start page in his browser - the basic guts of getting a running application was done for you. He then created a domain class using the built-in Groovy scripts to create various types of artefacts, this auto-created an appropriate controller and a number of views suitable for simple CRUD operations. The controller doesn't have normal methods for the CRUD operations, it has 'closures' - methods which are assigned to properties and so can be passed around like variables.
Without writing any database code he re-ran the web app and added a new domain object which was then displayed in a resulting list - Grails had created a development database using HSQLDB and mapped the domain object to a backing table created when the web-application started up.

Grails plugins were mentioned next, it appears that most non-core functionality will be released as plugins which can cover the full technology stack from raw Spring access all the way up through controllers and domain objects up to the views. It's with the use of plugins that new 'conventions' can be introduced enriching the Grails world - one example of this was the quartz plugin - this provided some new commands including grails create-job. Other useful plugins included jsecurity, springws and yui.

He also dived a little into the world of Groovy showing that it's a smooth learning curve from Java to Groovy - you can write normal Java in a .groovy file and the Groovy interpreter/compiler understands it. Groovy also follows the same path as some of the other dynamic languages in that it has a 'metaobject protocol' (MOP) allowing the application to add functionality to objects and classes at runtime.

From my point of view, having done some Ruby and Rails development in the past, was that Grails appears to be a port of Rails to the Groovy language, taking the same ethos that 'convention of configuration' and simplicity are best. That's not to say that I don't see vast benefit in Grails just that I didn't see any new 'magic' being presented. One great advantage of Grails is the fact that it's underlying language (Groovy) is Java-based and runs (and compiles down to) standard Java which runs in the JVM. This allows a much smoother transition for Java developers to migration to something like Grails rather than learn Ruby and then figure out how to deploy Rails - quite different than dropping WAR files into Tomcat...

Guy concluded the evening with a little prize draw and then it was off to the local pub for some beers provided by Arie Chapman of SpringSource, cheers Arie!

UPDATE: Russ Miles has kindly uploaded his slides to his blog

Technorati Tags: , , , , , , , , , , , ,

Comments

Guy Remond said…
Andrew, it was great to meet you on Monday, I am really pleased you enjoyed the event. Thanks for the positive comments, blogging is a great way to spread the word.
Andrew Chalkley said…
There is a gem for JRuby deployment called warbler. It packages up your Rails app in a war file for dropping into TomCat.

Rails deployment is super simple with Heroku.

Good luck with all your development endeavours with Grails, Rails or whatever!
Andrew Beacock said…
Cheers Andrew, it's good to know about the gem - I've not looked at Rails deployment for a while now, I stopped just before mod_passenger...
Ian Moss said…
Thought this was a really great write up.

Gives me a good indication that it might be worth attending soon - though I'll be on holiday in Aug.

Looks interesting, as I used to do the Java Enterprise Dev, but here seems an open minded growing community that could provide a different aspect from my day-to-day development in Ruby/Rails.

Will check out warbler. We've been using JRuby lately for BDD in Cucumber/Celerity.

Cheers -
Andrew Beacock said…
Ian, cheers for your comments, I hope to see you there one day - if you see me, please come over and say hi! :)