A new Grails plugin: Invitation-Only
This morning I released a new Grails plugin that lets you manage beta-invites to your app and similar.
This morning I released a new Grails plugin that lets you manage beta-invites to your app and similar.
There have been lots of iPad reviews, so I’ll try not to go over the same old stuff. Suffice to say it is very good, but I’m still learning how to use it – i.e. how it fits into my life. Will I really do diagrams on it, will I read e-books for long periods, will I write code?(?!).
A quick summary after 2 days intermittent use.
I can’t vouch for Pages, Numbers, Keynote or iBooks yet – they aren’t available in the UK app store (which you can only access from iTunes currently anyway).
The Weceem CMS plugin for Grails uses the Blueprint CSS framework, jQuery and jQuery UI Javascript libraries. As the Grails plugin marketplace continues to mature, other plugins will have more polished user interfaces or reusable tags that require certain libraries.
This raises an ugly prospect: a new resource dependency problem. Only unlike java dependency problems this is worse as you end up with multiple copies of resources in your app, even if they are the same version because plugins will typically bundle the resources themselves. Your app may add some of these too and your site becomes slow to load or experiences failures related to clashing library versions.
There is however a staggeringly simple solution to this: lightweight Grails plugins that contain the resources.
Thanks to Grails’ automatic dependency resolution we (the grails community) can just create plugins to wrap up each such library and then we just make any apps or plugins that require them depend on them by installing the library plugin or adding it to the dependsOn clause of other plugins.
An important caveat here is that the library plugins need to use version numbers matching the version of the library they encapsulate. Then if you want jQuery 1.4.2 you depend on/install grails-jquery version 1.4.2 or higher. The grails-jquery plugin authors have already done this.
These plugins should implement a simple tag called “resources” in an appropriate namespace e.g. or .
I strongly believe that such plugins should NOT include other tags or more heavyweight tags wrapping up library features – do that in another plugin e.g. “grails-jquery-tools”.
This approach does provide new challenges for optimizing static content – minifying JS and CSS and including only required modules from a larger library remains awkward as it is today with non-dependency solutions.
Ultimately I think we need smarter solutions than those currently in use to solve this. I have some ideas forming…
I have released Bean-Fields plugin 0.6. This extremely handy plugin for Grails applications makes your data form GSPs DRY by centralizing the rendering and styling of your fields, handling <label> rendering, rendering appropriate HTML field based on property type, application of HTML max length constraints, rendering “required field” indicators, and rendering per-field errors. Rendering a whole bean’s worth of fields can be as simple as:
Version 0.6 fixes a bunch of bugs related to rendering fields for nested property paths e.g. propertyName=”book.author.firstName” and introduces support for list / array properties eg “book.authors[3].firstName” (This was really quite painful to implement!). Radio groups are working properly now, and test coverage much improved – thanks to contribs from Antony Stubbs.
It also adds a user-definable threshold for whether a radio group or select list should be used for a field with an inList constraint.
I delivered my talk “Yes you CAN use Grails” yesterday at JAX London 2010, and it was well received. Unfortunately nobody was videoing it, and as the slides are “Presentation Zen” style you won’t get much from the official slides from JAX. It talks about Grails basics and how Grails is the perfect fit for existing Java development shops, and the things you need to know to make it possible to use it in your workplace. Well, at least you can try.
So I recorded myself doing the talk here at home and have uploaded a screencast of it all for those of you who are interested. Its not so good the second try – you had to be there for the best version
Click the thumbnail to download the MOV. Its about 47 minutes. Its probably going to cost me a fortune having it on Amazon S3!
Also available as a torrent.
People interested in making the case for Grails may be interested in an older post of mine that I’d completely forgotten about – “10 common misconceptions about Grails”.
Recent Comments