Archive for July, 2008
Groovy, Grails and JetBrains IntelliJ IDEA
by RJ Salicco on Jul.10, 2008, under Development
I might be late in the game with this post, but I have to comment on some niceness I have experienced when working with Groovy, Grails and IntelliJ IDEA 7.0. I received a license for IntelliJ IDEA when I attended the Groovy/Grails Experience in February 2008. That ended up being a very cool event; learning from the creators and contributors and getting software to make life easier all in one weekend.
I downloaded the JetGroovy plugin using IntelliJ’s plugin manager and I was on my way. First, I created a new Grails project and ran it to see that everything was setup properly with the plugin. Everything worked as I had expected and I was up and running with my new Grails project. Instead of working with this new project from scratch, I imported my Grails POC code and started working to make some minor changes to see how IntelliJ and Grails work together. I opened up one of my domain objects and noticed that the controller, views and tests were now just a click away on the toolbar while I was looking at my domain object.

If you are already familiar with the Grails world, above is a selector with the application’s domain objects, a quick link to the controller, views and tests that correspond to the domain object selected. Very nice.
Code completion, highlighting and refactoring are other nice features supported in IntelliJ via the JetGroovy plugin that we usually take for granted in the Java IDE space. The JetGroovy plugin does a great job of exposing a new Groovy developer to an environment that most seasoned Java developers are already accustomed to. So, if you are a Java developer who is interested in learning Groovy/Grails and would like to exploit the comforts of IDE support, IntelliJ 7.0 and the JetGroovy plugin will get you started on the right path.
GridGain at the Tampa JUG
by RJ Salicco on Jul.01, 2008, under Development
Dmitriy Setrakyan, Founder and Director of Development at GridGain , presented at the Tampa JUG on June 24th, 2008 and showed us just how easy grid computing can be with Java and GridGain. Dmitriy showed the group how to take a simple "Hello World" example and grid enable it within about 10 minutes. Here is my explanation of the demo:
In our Java Class, we create a simple public static void main(String[] args) method that calls a static method named sayHello().
...
public static void sayHello() {
System.out.println("Hello World");
}
public static void main(String[] args) {
sayHello();
}
...
Now we can run our class and see "Hello World" printed out. Next we need to "grid-ify" our little application by adding the GridGain dependencies to our project Classpath and by adding a few key lines to our code:
...
@Gridify
public static void sayHello() {
System.out.println("Hello World");
}
public static void main(String[] args) {
GridFactory.start();
try {
sayHello();
} finally {
GridFactory.stop();
}
}
...
So, we added the @Gridify annotation to our sayHello() method, the GridFactory.start() and GridFactory.stop() lines and a try/finally block to our code. Now, all we have to do is start up a few GridGain nodes (this is done manually by going to GRIDGAIN_HOME/bin/gridgain.bat) and then running our little application. Our application starts it’s own node, GridFactory.start(), and then the sayHello() method will run on one of our running nodes! Pretty simple? Yeah, obviously there is bit more we can dive into other than grid enabling a "Hello World" application, but when Dmitriy did this simple demo at the Tampa JUG, it got me to start playing with GridGain .
