Groovy 1.6 (still in beta) has introduced a new handy method into the Groovy Console : loadScriptFile. That allows you to load a script and open it into the Groovy Console. Here are the few lines of code to make it work. import groovy.ui.Console; Console console = new Console(); console.run(); console.loadScriptFile("C:/My documents/MyScript.groovy"); That‘s it.
I need to include Groovy templates within other Groovy templates, a bit like JSPs that can include child JSPs. This feature doesn‘t exist out of the box so I‘ve developed a new TemplateEngine based on the SimpleTemplateEngine . If you have this kind of need, just check this little post.
Well, first of all, I really have to beach about public transports in London. Yesterday the Central line wasn‘t working and today the Northern line had severe delays. It took me 1:30 hour to go from south London (Balham) to the conference hall (the Barbican Center). I love London, it‘s a fantastic city and I really enjoyed leaving here for 2 years. But each time I come back for business (not for holidays where I can just wonder around) I remember why I left this city and went back to Paris : on a day to day basis, London is a really tough place to live in. Well, I suppose some people would say the same about Paris though… Enough beaching. Second day at the Grails Exchange. The keynote started at 9:30am and was done by Scott Davis. He talked about open source in general, Groovy and Grails in particular, the economic model of open source, the way companies look at open source (he showed a photo of a guy with long hippy hair… I wonder if it was a photo of Scott). Grails is a fantastic story about open source because it embeds famous open source frameworks (Spring, Hibernate, Log4j…). Talking about figures and economics, Scott showed us some curves going up (Apache software being used more and more) and others going down (lines of code with Groovy). Companies have started to look at open source because it‘s cheap […]
Here I am in London attending my first day at the Grails Exchange. Unfortunately I missed the keynote from Guillaume LaForge and Graeme Rocher this morning because I took a late train from Paris. Not because I wanted to sleep more, but I just managed to enrol yesterday afternoon (thanks to Guillaume for his help on that). Difficult to find an earlier train with such a short notice. The conference is held at the Barbican center in London. Good memories come back to me when I was living in London and coming here to listen to weird concerts. I arrived at the conference at 1pm, just in time for lunch. The atmosphere is pretty good. The food great. A fantastic indoor garden where you can have your meal. Not a lot of people, easy to meet and talk to everybody. My first session is EJB 3 entities & Grails by Jason Rudolph. The talk is about the integration between JPA annotated POJOs and POGOs. Jason first started to reverse engineering an existing database with Hibernate tools to obtain JPA annotated POJOs (Knight ans Sword, he took some Monty Python example). After creating a grails app, he copied these two POJOs into it. Using the groovy shell he could use GORM features to access the data (eg. Knight.list() or Knight.findByNameLike(‘Sir%‘) and so on). Then Jason created a Castle POGO (Groovy bean) which has a Knight attribute (Knight is a POJO, still […]