Since June this year I started at work developing in the open source web application framework Grails . In the past I developed some websites in object oriented PHP in combination with templates in Smarty. Gained experience in handling quite common things like forms/JS, uploads, usermanagement, simple fancy stuff, user friendly URL’s via mod_rewrite et cetera. Actually in my last project (WTC) everything was very nice and clean, no more than 50 lines of code for handling a page, everything beneath was done by OO-classes interfacing with the database. But still it was not a real framework and I have never used one in PHP, although there are plenty of PHP frameworks out there. I think my expertise was more on the building of stand-alone applications with Java Swing/AWT.
But, everything has changed for now. I started building a new prototype of the data support platform for my work in Grails, which is a concatenation of Groovy on Rails. Groovy being a superset of Java – 100% compatible with normal Java, so easily integrate existing libraries – allowed me to pick up things quite fast. Furthermore what I mentioned about my personal PHP experience in the above paragraph, is already covered completely by the Grails framework. Everything works nicely via the Model-View-Controller concept. Beneath the hood Hibernate and Spring are doing their work for persistency/database stuff. The only thing you have to do is write your domain classes which describe your database tables, constraints, fields and relations. Then with a single command you can generate the whole application with CRUD-interface, which means the controllers and views for your domains are generated. To start your webapplication you only have to type ‘grails run-app’ and that’s it. One final thing to mention is that there are many plugins available to give your application a lot of nice features and that Netbeans has a plugin to support Grails.
Of course most effort is then going into customizing your views and controllers and testing. But I am quite convinced that for the upcoming time Grails has become my favorite webdevelopment environment. I am currently even busy to port all existing WTC code to Grails and within a short time it was already up and running. I’d recommend anyone to give it a look/try.