miranda

Griffon in Action (a.k.a. hackergarten #2)

By Administrator | May 3, 2010

Last friday we met in Basel for the second hackergarten. Since Andres joined the canoo team last month a griffon jam was obvious. The goal of the evening was to write at least one griffon plugin and release them the same evening. I have to admit, I didn’t wrote swing apps since years now. Writing a plugin for a swing framework without a lot of swing knowledge seems to be very ambitious for just one evening. Though I’m the maintainer of the griffon port at macports and already played a bit with the framework I don’t consider myself as a griffon guy. Last week Manning released the “plugin” chapter of “Griffon in Action” (GiA) in the manning early access programe (MEAP). Great timing for our griffon jam, wasn’t it? Since I had the chance to take a look at Griffon in Action MEAP I like to share my thoughts about the first chapters.

I skipped the chapter about installation. I’m on a mac and use the macport griffon port (latest version is griffon 0.3). If you’re on a mac too, have a look at a previous blog entry about groovy tools and macports. Those of you who are familiar with the grails framework will detect lots of similarities. In fact, griffon was inspired by grails and reuses lots of its approaches.

Even without groovy knowledge, the examples in the book are easy to understand. The final griffon in action will contain an appendix with some further explanation about the groovy foo you need to get started with griffon.
What was always hard for me while developing swing, was the correct usage/implementation of the Model-View-Controler Pattern. Even though you may not use griffon in production, GiA is a nice documentation of a well structured swing applications.

What I didn’t like while following the examples in the book is, that some code snippets are not copy & paste ready. Some listings are polluted with footnotes (e.g. Listing 1.2) what IMHO should be avoided in general. I had even issues with the “clean” code snippets. Somehow the pasted snippet was cluttered and I always have to rearrange the code manually. But maybe that isn’t an issue of the book and more an issue of macosx’ pdf preview. Another thing I didn’t like about the
snippets is the mixed and not explained footnote syntax (A, B or 1, 2, 3)

As mentioned above, GiA contains a complete chapter about writing plugins for griffon. As we already discovered during the griffon jam last at friday extracting your custom components to a griffon plugins is really simple. We (mostly griffon newbies) released nearly four griffon plugins in about 5-6 hours. I think thats the best evidence how easy griffon plugin developement is. Maybe you’re complaining that’s having the project lead there is a bit cheating and maybe you’re right about that. But GiA chapter 11 is all you need to start plugin developing on your own. The chapter is well structured and gives a really nice intro about plugins. This easy plugin environment allows the great reusability of your custom components in different griffon projects.

I learned a lot about swing and swing app structuring while flying over (didn’t read all chapters in depth) the first 12 chapters.

regards,
René

Comments