Thursday, January 14, 2010

Upgrading Beginning Groovy and Grails to Grails 1.2

Beginning Groovy and Grails (BGG) was the first book using Grails 1.0. Since then, Grails 1.1.X and now Grails 1.2 have been released.

We have received several requests to upgrade the book code. I've started the process to upgrade the book code to Groovy 1.7 and Grails 1.2. You can find it on my GitHub Site: http://github.com/jshingler/BGG_Grails1.2

Thursday, November 26, 2009

Griffon Painter Demo


I was looking at the Swing Labs site and ran across the page on painters(http://swinglabs.org/docs/frameworks/painters/index.jsp) and thought the code looked pretty straight forward. Then I had the thought, Well Griffon uses SwingX I wonder, . . . the result is the image above.

Griffon code: PainterView.groovy


import java.awt.*
import org.jdesktop.swingx.painter.*

GlossPainter gloss = new GlossPainter(new Color(1.0f, 1.0f, 1.0f, 0.2f),
GlossPainter.GlossPosition.TOP)

PinstripePainter stripes = new PinstripePainter(
paint: new Color(1.0f, 1.0f, 1.0f, 0.17f),
spacing:5.0
)
MattePainter matte = new MattePainter(new Color(51, 51, 51));

application(title:'painter',
//size:[320,480],
pack:true,
//location:[50,50],
locationByPlatform:true,
iconImage: imageIcon('/griffon-icon-48x48.png').image,
iconImages: [imageIcon('/griffon-icon-48x48.png').image,
imageIcon('/griffon-icon-32x32.png').image,
imageIcon('/griffon-icon-16x16.png').image]
) {
jxpanel(id: "header",
backgroundPainter: new CompoundPainter(matte, stripes, gloss)) {
label('Griffon Painter Demo',
icon: imageIcon(resource:'griffon-icon-48x48.png'),
foreground: Color.white)
}
}

Tuesday, November 10, 2009

COJUG: Eclipse Demo Camp Links

Here are the Links for my COJUG: Eclipse Demo Camp Groovy and Grails Plugins discussion

You can use these links to download the Eclipse Groovy V2 plugin and SpringSource Tool Suite.

http://groovy.codehaus.org/Eclipse+Plugin+V2+FAQ#EclipsePluginV2FAQ
http://blog.springsource.com/2009/07/30/a-groovier-eclipse-experience/
http://docs.codehaus.org/pages/viewpage.action?pageId=133464433
http://grails.org/STS+Integration
http://www.springsource.com/products/springsource-tool-suite-download

Thursday, September 10, 2009

The Griffon Celebrates



WooHooo! Griffon celebrates the first anniversary of its public release today. Griffon was first released Sept. 10, 2008. It is hard to believe it has only been a year.

It has been a very productive first year. Griffon is maturing and the word is getting out. For me, the most notable event was Guillaume Laforge winning the Java One 2009 Scriptbowl with an application called Twittersphere. Twittersphere was build using Griffon and Groovy.

The founding fathers of Griffon (Danno Ferrin, Andres Almiray, James Williams) have done an absolutely fabulous job. Their work and dedication have enabled it to become what it is today.

Well Done guys!

PS Keep your ears open, . . . you might hear some Griffon news soon.

Saturday, September 5, 2009

ANN: gConfig 0.1.2




I am pleased to announce the release of gConfig 0.1.2, a configuration tool for Griffon, a Groovy Technology.

This release is an upgrade to Griffon 0.1.2 and resolves a LogManager not found issue.

Background

While building Griffon applications, I found myself doing the same repeatative steps when I started building the application. Install these sets of plugins, get those additional 3rd party jars, and oh ya, I want a menubar, toolbar, statusbar, . . . , you get the drift.

I felt like I was spending too much time doing boilerplate code. So I did what any good IT person would do, made it easier through automation. The result is gConfig.

After creating the application, you run gConfig. gConfig is a wizard that will present you with a list of the currently available plugins. You pick which ones you one and the move on to select some popular predefined 3rd party jars. Finally, you are presented with a collection of templates (Menubar, ToolBar, StatusBar, About, and Tips) to install.

When you have completed your selections, gConfig will do the rest. Install the plugins, download the jars, and install the selected templates.

It saves a load of time.

Give it a try.

Screen Shots:









Monday, August 3, 2009

ANN: Grails RefCode Plugin 0.2

Marcel Overdijk released RefCode plugin May 2008. The plugin provides an easy solution for 'code/description' reference/lookup data. Often in your business model you have simple reference/lookup tables with just code and description columns; e.g. Country (uk=United Kingdom, nl=Netherlands, ...), OrderStatus (C=Cancelled, N=New, P=Pending, S=Shipped), OrganizationType, ...

The latest release of the plugin include the refCode Custom Constraint to make validation against the domain valued even easier.

Assuming you a have a domain of "USStates", you can now setup a constraint like so:


class Person {
String name
String street
String city
String state
String zip

static constraints = {
name()
street()
city()
state(refCode:"USStates")
zip()
}
}


You can find out more about the RefCode Plugin at: http://www.grails.org/Ref+Code+Plugin