Well, this morning I managed to arrive on time and have my first breakfast at the conference. Thanks to the train driver, thanks to the London tube, thanks to the people on the platform who let me in the train, thanks to God when it comes to arriving on time with London public transports.
So, today is the last day of what has been a very good experience of this Grails Exchange. I’ve started with The Whole 9 Yards: Things you can do in 10 minutes that will make users love you by Glen Smith. When I read the title I thought that was the place to be this morning. The place to be loved by your customers. Glen is the Australian guy behind the groovyblogs.org. He first showed a photo of his family which is his motivation to use Grails : spend more time with the family and less behind the computer (his title on his business card is a stunt programmer ). First of these 10 things, generating PDF . Using the library Flying Saucer (xhtml renderer) to render into plenty of formats including PDF (9 lines of code of Groovy). Thumbnails again using Flying saucers to generate images (3 lines of code). Graps and charts with Jfreechart to generate PNG images of charts (12 loc). Caching for performance with ehCache that comes with Grails (10 loc). Generating feeds and consuming feeds with Rome (7 loc). Sending and receiving emails using ant builder send method (1 loc). Using wiki markup using Textile (4 loc). More flexible layout on your web pages with Yahoo UI grids (1000 layouts in 4Kb CSS file).
Canoo Web Test & Grails by Dierk Koenig. It‘s the 3rd Dierk session that I attend, and I have to say, I really like his style, pretty clear to understand. He started with web tests in general and how to create web test with Canoo Web Test. The internal architecture of Canoo is Ant, HTMLUnit, Rhino, Jaxen and commons-httpclient. Dierk emphasised the use of XPath to test parts of your page (use a XPath expression instead of a set path eg html.body.table.tbody.th). He then showed how to groovyfy your test using the groovyScript tag. Within this tag you can write Groovy and even enhance XPath expression with Groovy. Really powerful stuff. Canoo Web Test uses XML files to store the test suite (go to this page, click on this like, verify the return value…) and it also can use Groovy classes to do the same thing. He then did a demo. He created a Grails app, generated a domain class, controller and so on and then created a web test and run it. This took less than a minute. The Groovy web test class was generated and you could run it again and again. He also showed a demo with capturing and replaying mode (you launch the browser, click on links, enter some data… while a recorder is on). The recorder is a Firefox plugin and while you click it generates your Groovy code (the plugin even allows you to enter XPath expression). Everybody clapped, really impressive. I‘ll be using that, that‘s for sure.
Advanced View Technologies by Jeff Brown. This session was quite amazing actually. Jeff had a 3 slides presentation and then he spent an hour hacking a Grails app live. He created an Grails app from scratch that deals with Albums, Artists and Tracks. He type the code of the Artiste and Album, generated the scaffolding for those classes and used the Boostrat to add some data to the database. Jeff created a template (fragment of a page) and added it to a GSP. Then he played with Ajax and XML. I was quite amazed at the entire thing because it was a live agile process where Jeff was hacking code while the audience was challenging him. Well done Jeff.
And the conference finished with Groovy and Grails quizz. There was 17 books to give away with questions to answer. I didn‘t get any because I was busy finishing this blog. I hope you, reader, will appreciate this effort (to pay me back, if some one wants to send me a book, just drop me an email). And then Guillaume and Graeme did some live coding (a question from the audience, and they hacked the code).
That‘s it for the conference. I‘ll blog later giving a resume of these 3 days. For now, time to enjoy London, go to a pub and see the English team win… or loose.