Wednesday, May 27, 2009

Instant Admin Interface with Grails 1.1

Hi All

I think I have just had a great idea for an instant admin interface for my new Grails app. I have almost completed my new web app and was just thinking that I could really do with simple admin interface. So I came up with this idea.

I can pull out my current domain classes out into a plugin. I can then install this plugin into the main application. Then the main app is back to normal

Then i can create a new app called XXX-admin. I then install the domain classes plugin into the admin app then generate scaffold controllers/views for the domain.

This then gives me an instant admin interface.

Gonna try this out and will write again about how it goes.

Peace...

Tuesday, May 26, 2009

Grails magical second act: The plugin ecosystem

So as you might have gathered I love the Grails framework. The full stack framework is nothing short of magic compared to anything else in its domain. Since the arrival of the core framework (the first act) it has completely transformed my web development: Better, Faster, Smarter,

Anyway it just occurred to me over the weekend that Grails is in fact now on its second act. That in someways is more spectacular than the first. So what is this second act that tops the first one.

The plugin architecture:

I have always thought that the plugin architecture is "tres kool" and I have even written and released my own (Javascript Validator, Grails Template Engine). But it wasn't until i used the S3 Plugin this weekend that it really dawned on my how powerful the plugins are (and can be).

The S3 plugin is the first "full stack" plugin that i have used. It comes with a domain class, tag lib and background tasks. All aimed at seamlessly adding S3 support to your application in no time. I took me about 3-4 hours to integrate and test the plugin into my new app.

With its sync and async modes the plugin is very will written. Also keeping with the Grails philosophy it simply sprinkles magic groovy dust over an existing java framework (jets3)

Anyway just thought I would share this with you all. I think that the awesomeness of the the potential in grails plugins is just beginning and that we can expect to see some really cool stuff coming.

Peace...

Thursday, May 21, 2009

New Grails Plugin Grails Template Engine

Hello Alpha Geeks

I put a small grails plugin out today.

http://www.grails.org/plugin/grails-template-engine

The plugin simply exposes the GSP render engine as a service for backend GSP template rendering . It also adds a new convenient method to the controllers called renderWithTemplateEngine

The implementation was mostly lifed from Graeme's mail plugin. Now it is available standalone.

Hopefully this is useful to someone out there :)

Wednesday, May 6, 2009

Call to arms for Rails to Grails plugin porting

One more thing while I am on a role braindumping on my blog.

I am currently now sharing offices in London with a good friend of mine and others. Anyway this good friend of mine is a Ruby on Rails Developer and a very good one at that.

So I quizzed him a bit about Rails to find out some info. Anyway one of the strong points of Rails is its plugins. They have loads and some really really good ones.

So got me thinking. From what I can see these plugins are all possible in Grails (if they don't already exist) so why don't we replicate them. The Rails guys are basically solving the same problems as the Grails guys and the fact that a Rails plugins exists means that it is a helpful tool to someone.

So anyway I am going to start this porting off. Here are some of my first targets:

http://github.com/technoweenie/acts_as_paranoid
http://thoughtbot.com/projects/paperclip

Next I guess I search for "Top 10 Rails plugins"

http://thetacom.info/2008/02/17/my-10-favorite-rails-plugins/

Pete :)

Dave Klien reviews my Javascript validator plugin in Groovy Mag (April)

So having popped my head up after an intensive month or so of major S**t going on in my life and trying to ship my new on-line service (written in grails of course). Anyway I just seen Mr Dave Klien has done a wonderful review of my Javascript Validation grails plug-in. So I bought the mag. It is actually very good so I recommend you do too. Anyway in his own words:

This plug-in has great potential. It will already save
significant development time in setting up client-side
validation and I’m sure it’s going to keep getting better.
Stop by the Grails Plugin Portal and check it out. You
can leave a comment with enhancement suggestions or
if you’ve tried it out, let others know what you think
with a rating. I’m giving it 5 stars!


I am really happy about this. It is nice to see that the things you do help other people. I guess that is what the open source community is all about. Anyway just wanted to express another thought.

I think the best things, the ones that rise above come from passion and believing "there has to be a better way". That's where the grails framework came from, where groovy came from, where Spring came from, Hibernate, hell even Java too one upon a time.

However another ingredient that means the difference between longevity or 15 seconds of fame is "coming from the trenches"... You can see that with grails.

Graeme Rocher built grails from is own real life experience of using web frameworks. That is why even now I find little gems of goodness in there. The framework helps you all the way from development to production. That is something special.

I guess with my own little javascript validator plug-in in a much much smaller way that same is true for me. I needed client side validation and I had used Sprig'svalang before with spring mvc and really missed it with Grails. So I built it. When I say built it a really mean I made the "glue of convenience" that glues together some already established fantastic framework patterns (grails constraints, i18n, commons validator js libs). Then guess what. I actually used it on my own project as a user. I made it fit my own needs while trying to keep it generic. Anyway I think that's why people love it.

One last final thought... I love this quote just can't remember who said it.

A reasonable man changes and adapts to the world around him. The unreasonable man changes and adapts the world around him. Therefore all the innovation in the world lies in the hands of the unreasonable man :)

Ps. I have two new plug ins coming out this week. Again the came from the trenches of a need for them in my own app. I am sure you will love them.

Nullable vs Blank sorted i forgot to post about it

Hi All

I just realise i forgot to post about the solution to the Nullable Vs Blank problem. Well after consulting lost of people for input I decided on a simple rule.

If the blank constraint and the nullable constraint are both used for a String attribute then the blank constraint wins.

The simple solution always wins :) (Occam's razor)