❯ Guillaume Laforge

Knowing which variables are bound or not in a Groovy script

A few weeks ago on the Groovy mailing-lists, a user wanted to know a way to find which variables were bound or not in a Groovy script, in the context of some custom rules engine. In a Groovy script, names that are not local variables, method parameters, etc. can come from the “binding” associated with a script. This is the way we “inject” variables and values into a script. A usual technique for retrieving variables lazily (for instance when you don’t want to put in the binding a variable that is heavy to compute or retrieve) is to create a custom Binding class and override the methods for getting variables from it. But if you really really want to know before executing the scripts (to avoid any side effect upon execution) what variables are bound or not, I’ve come up with the following script which lists the bound and unbound variables, without having to execute the script.

Read more...

Meeting Neil Armstrong and speaking of Groovy and Grails

I had the pleasure to participate in OCTO’s IT University (UniversitΓ© du SI in French) a couple weeks ago. The conference was really great, and I think France really needed such a high-quality IT event as there was no real good event like that until now. So big kudos to the organizers.

Apart from great food, excellent speakers covering interesting topics, I had the pleasure of spending time with my friends from the OSSGTP community (Vincent, Guillaume, Patrick, Mag, Didier, Fabrice, Erwan), with my former colleagues, and with some great guys like Ross Mason, Erik Meijer (with great tshirts as usual), and more. But perhaps the most impressive, interesting and emotional-heavy moment of the conference was the closing keynote by astronaut Neil Armstrong, as featured on the picture on the side. This man is so humble, interesting, funny, elegant, that everybody really enjoyed listening to him speaking about the space conquest, distilling some nice and funny anecdotes and making parallels with IT, the story of computers, etc. Awesome! It was such a big honnor to have him there!

Read more...

Groovy and Grails trainings by G2One in North American

If you’re in the North America and you want to get up to speed with Groovy and Grails, G2One, the Groovy/Grails company, has just announced its updated training schedule for this year.

From August to November, we’ll be in:

  • San Jose (CA)
  • Chicago (IL)
  • Orange County (CA)
  • Austin (TX)
  • Calgary (Canada)
  • and Atlanta (GA)

You can find the exact dates online. And you can already register for the San Jose and Chicago dates in August.

Read more...

The IT conference you can't miss if you're in Paris!

If you’re in Paris, next week, make sure you don’t miss the “UniversitΓ© du SI” (IT University) conference, organized by my former colleagues from OCTO Technology. This conference is going to rock! Quite frankly, I think France was seriously lacking a good IT conference, and I think OCTO is going to deliver on that promise. I’ve been told they are pretty soon running out of entry passes as we’re close to the deadline, so it’s your last chance to register.

Read more...

Groovy 1.6-beta-1 release with great performance improvements

This is with great pleasure that G2One and the Groovy development team announce the first beta of Groovy 1.6.

Beyond the 73 bug fixes and 24 improvements listed in the release notes above, the main focus was on performance improvements.

Compilation and runtime performance improvements

As you may have already noticed with Groovy 1.5.5, the compiler is 3 to 5 times fasterthan in previous releases. This improvement is available both in this development version and in the 1.5.x stable branch. Thanks to class lookup caches, the bigger the project, the faster the compilation will be.

Read more...

Groovy / Grails meetup, next Monday evening, in San Francisco

If you’re going to JavaOne this year, and if you’re interested in Groovy and Grails, you can’t miss G2One’s free Groovy / Grails meetup, Monday evening, 7pm, at the W Hotel, across the street from Moscone.

It’s going to be a great opportunity to meet the guys behind both Groovy and Grails, learn about the latest news about these projects, see some cool demos, and hear about customers who’ve decided to use Grails in their projects. You’ll be able to also get great Groovy books signed by authors Venkat Subramaniam and Scott Davis.

Read more...

Grails, nominated for JAX innovation award

This week takes place the 2008 JAX conference, in Germany. Last year, Groovy won the first prize of the JAX innovation award, and this year, Grails was submitted and has just been nominated by the jury.Guillaume Laforge, Groovy project lead and initiator of the Grails project, will be at JAX this week and will represent the Grails team and project.

From the nomination announcement:

Now it is official: The ten nominees for the JAX Innovation Award. The winners of the award are kept top secret and will be made public next week at the JAX. The award, which is endowed with price money of 20,000 Euro altogether, originated from an initiative of the Software & Support publishing company.

Read more...

Groovy 1.5.5 released: compiler 3-5x faster

G2One, Inc. and the Groovy development team are pleased to announce the release of Groovy 1.5.5, a bug fix release of the 1.5.x stable branch.

Beyond all the bug fixes and consistency improvements, the major aspect of this release is certainly the improvements in compilation speed. As part of our ongoing efforts to improve the performance of Groovy, we have worked hard on compilation speed, and we backported those improvements from the upcoming Groovy 1.6, to ensure that all users using stable versions of Groovy can benefit from these performance increases. The Groovyc compiler should now be from 3 to 5 times faster, which will make big Groovy / Java and Grails projects much snappier to compile.

Read more...

Groovy / Grails support in NetBeans and GlassFish

Sun engineer Matthias Schmidt has just published an article on the progress of the Groovy and Grails support in NetBeans. The Aquarium also features the ongoing work on support of Grails in Glassfish.

On NetBeans front, Matthias Schmidt and Martin Adamek started working on a plugin back in November. You’ll need to use a NetBeans nightly build, and download the Groovy/Grails plugin from the updace center. The plugin already provides:

  • Method-completion including JavaDoc display for Groovy and Java
  • Code Folding of Groovy source files
  • Starting, stopping of the Grails server
  • Importing existing Grails projects with a week arranged display of project structure
  • Groovy/Grails module settings integrated into NetBeans options dialog
  • Marking of source code errors
  • Easy navigation of Groovy source code by using a navigator view
  • Customizing of Grails environment and server port
  • Auto-deploy to the Glassfish application server
  • Starting common Grails tasks from context menu
  • Status of running Grails server displayed in status-line
  • Syntax highlighting

This is a promising beginning, but there’s definitely more to come:

Read more...

JSON.Net, the Groovy way

On Ajaxian, the other day, I spotted an article about JSON.Net, a project aiming at simplifying the production and consumption of JSON data for the .Net world, and I wanted to contrast what I’ve read with what we are doing with Groovy and Grails. I rarely speak about the Microsoft world, but the latest features of C# 3 are very interesting and powerful, particularly the anonymous types, their closures (whatever they are called), and LINQ for querying relational or tree structured data.

Read more...