Archive for November, 2012

The Grails app-info-hibernate plugin

Wednesday, November 28th, 2012

The original app-info plugin had support for displaying lots of information about your Grails application, and several pages for Hibernate information and graphs. The Hibernate features ended up being about half of the plugin, so originally I wanted to split out the Hibernate features into a separate plugin. This didn’t work because I wasn’t able to get the GSPs rendered; at the time it wasn’t possible to use a plugin attribute for the render method to tell Grails where to find the controller mixin’s GSPs.

When Grails 2.0 was released my hand was forced though, since there wasn’t a version of the Hibernate Tools library that I use to generate table and entity graphs which worked with the updated version of Hibernate that Grails now uses. I was able to create a mostly-working version of the db-reverse-engineer plugin which also uses Hibernate Tools by forking the Gant script in its own JVM and using a different Hibernate jar, but that wasn’t possible in the app-info plugin because the functionality is part of the runtime, not just a script. So I removed the Hibernate features with plans to create an app-info-hibernate plugin once there was a compatible Hibernate Tools jar; I wrote about this here.

Fortunately there is finally a “CR1” version of the Hibernate Tools library in Maven Central, and in my testing I discovered that the plugin attribute does work in the Grails 2.0 render method, so I finished up the work for the plugin and released it today. I also released an update of the db-reverse-engineer plugin which uses the updated library and no longer needs the hackish workaround of forking a new process; install version 0.5 by adding compile ':db-reverse-engineer:0.5' to your BuildConfig.groovy.


Using the plugin is very similar to what I described in the original blog post. Add the plugin to BuildConfig.groovy:

plugins {
   ...

   compile ':app-info-hibernate:0.2'
}

(that there’s no need to add the app-info plugin since it will be transitively installed) and configure the grails.plugins.dynamicController.mixins map in Config.groovy:

grails.plugins.dynamicController.mixins = [
   'com.burtbeckwith.grails.plugins.appinfo.IndexControllerMixin':
      'com.burtbeckwith.appinfo_test.AdminManageController',

   'com.burtbeckwith.grails.plugins.appinfo.Log4jControllerMixin' :
      'com.burtbeckwith.appinfo_test.AdminManageController',

   'com.burtbeckwith.grails.plugins.appinfo.SpringControllerMixin' :
      'com.burtbeckwith.appinfo_test.AdminManageController',

   'com.burtbeckwith.grails.plugins.appinfo.MemoryControllerMixin' :
      'com.burtbeckwith.appinfo_test.AdminManageController',

   'com.burtbeckwith.grails.plugins.appinfo.PropertiesControllerMixin' :
      'com.burtbeckwith.appinfo_test.AdminManageController',

   'com.burtbeckwith.grails.plugins.appinfo.ScopesControllerMixin' :
      'com.burtbeckwith.appinfo_test.AdminManageController',

   'com.burtbeckwith.grails.plugins.appinfo.ThreadsControllerMixin' :
      'com.burtbeckwith.appinfo_test.AdminManageController',

   'com.burtbeckwith.grails.plugins.appinfo.hibernate.HibernateControllerMixin' :
      'com.burtbeckwith.appinfo_test.AdminManageController',

   'app.info.custom.example.MyConfigControllerMixin' :
      'com.burtbeckwith.appinfo_test.AdminManageController'
]

One thing to be aware of is that the HibernateControllerMixin package has changed; it’s now in the com.burtbeckwith.grails.plugins.appinfo.hibernate package.

Note that due to some issues in the updated grails.org site, the app-info plugin page isn’t editable, so it’s out of date, and there’s no plugin page yet for the app-info-hibernate plugin. It will be at http://grails.org/plugin/app-info-hibernate when the issues are resolved. You can install the plugin, it’s just not viewable in the plugin portal.


You can download a sample application that uses the plugin here.

This Week in Grails (2012-47)

Wednesday, November 28th, 2012

The big news of this week is the updated grails.org site. This was a big effort and a combination of work by VMware employees and community members, including Eric Berry, Damien Vitrac, and Craig Burke. The site is a Grails application and is open source – the repo is here if you have a fix or a new feature and want to send a pull request. We track issue in JIRA here so if you see anything weird let us know.

As part of the site upgrade, we’ve implemented a new system for submitting plugins. Instead of mailing the dev list, submit it with this form. Disqus is enabled throughout the site, so you can use that to make suggestions and ask questions about submitted plugins, and comment on other parts of the site too.

The winners of the Grails48 hackathon have been announced. Congrats to the team at OSOCO for their 1st-place finish!

The early access edition of Programming Grails was updated this week with three new chapters, for a total of ten. Only two more to go 🙂


If you want to keep up with these “This Week in Grails” posts you can access them directly via their category link or in an RSS reader with the feed for just these posts.


Translations of this post:



Plugins

There were 3 new plugins released:

  • bootstrap-theme version 1.0.RC2. Provides a basic Platform UI Theme based on Twitter Bootstrap
  • bootstrap-ui version 1.0.RC2. Twitter Bootstrap based UI Set for plugin platform
  • platform-ui version 1.0.RC1. Abstracted UI elements and theming for plugin/application interoperability

and 7 updated plugins:

  • jesque version 0.5.0. Groovier approach to using jesque
  • lamer-filter version 1.0.2. NOTFOUND
  • page-resources version 0.2.1. Enhances the resources plugin by allowing for creation of ‘page’ resource modules using convention over configuration
  • platform-core version 1.0.RC1. Provides functionality for plugins to use to achieve greater integration with each other and with applications
  • release version 2.1.0. Publishes Grails plugins either to a public or private repository
  • spring-security-facebook version 0.10. Plugin for Facebook Authentication, as extension to Grails Spring Security Core plugin
  • vaadin version 1.7.0-beta9.2. Adds Vaadin (http://vaadin.com/) integration

Interesting Tweets

Jobs



User groups and Conferences


This Week in Grails (2012-46)

Wednesday, November 21st, 2012

The Greach early bird price ends on November 30, so get your tickets now before the price goes up.

The US and EU GR8Conf dates have been announced; the US conference will be July 21st-23rd and the EU dates are May 22nd-24th. Both conferences’ call for papers are open; submit for the US conference here and the EU conference here.


If you want to keep up with these “This Week in Grails” posts you can access them directly via their category link or in an RSS reader with the feed for just these posts.


Translations of this post:



Plugins

There were 4 new plugins released:

  • css-lint version 0.1. Runs csslint on css files
  • kissmetrics version 0.1.2. Allows your Grails application to use KISSmetrics APIs
  • rwt version 0.1. Integrates RWT – the web-ported Standard Widget Toolkit (SWT) – to build your RWT and JFace powered user interfaces
  • vero version 0.1.0. Allows your Grails application to use Vero APIs

and 13 updated plugins:

  • aws-sdk version 1.3.24. Use the Amazon Web Services infrastructure services
  • closure-compiler version 0.9.1. Compiles/optimizes your javascript resources with the Google Closure Compiler
  • clover version 3.1.8. Integrates the Clover code coverage tool
  • cookie-session version 2.0.1. Allows you to store session data in a cookie
  • facebook-sdk version 0.4.4. Allows your application to use the Facebook Platform and develop Facebook apps on Facebook.com or on web sites (with Facebook Connect)
  • geb version 0.9.0-RC-1. Geb is a library for headless web browsing on the JVM, suitable for automation and functional web testing
  • gwt version 0.8. Incorporates GWT into Grails
  • html5-mobile-scaffolding version 0.4.4. Scaffolds HTML5 mobile application using jQuery mobile in a single page
  • jquery version 1.8.3. Integrates jQuery
  • kickstart-with-bootstrap version 0.8.8. Start your project with a good looking frontend, with adapted scaffolding templates for standard CRUD pages using Twitter Bootstrap
  • mongodb-morphia version 0.8.2. Alternative MongoDB GORM based on the Morphia library (former gorm-mongodb)
  • nerderg-form-tags version 2.1. Bringing Readability, Convention, Consistency and CSS to form design
  • vaadin version 1.7.0-beta9.1. Adds Vaadin (http://vaadin.com/) integration

Interesting Tweets

Jobs



User groups and Conferences


This Week in Grails (2012-45)

Wednesday, November 14th, 2012

The Grails48 hackathon was this weekend. Sounds like people got a lot done – I’m looking forward to seeing the various applications that were created and of course to see who wins the various prizes 🙂

The 2012 Groovy & Grails Exchange is coming up soon – it’s only a month away. Be sure to get your tickets now before the price goes up again. And the 2013 Greach conference is not long after that. I’ll be speaking at both and I’m looking forward to the conferences, especially Greach since I haven’t been to Spain before.

I started working on a Grails plugin that provides a UI for P6Spy a long time ago, but didn’t finish it. It was based on the sqlprofiler Swing application that connects to your application with an RMI appender. I’m not sure what triggered me to look at it again but I picked it back up this weekend and got it working. See the plugin page for more information; the source is on Github so feel free to send pull requests with updates (especially CSS and UI-related fixes since I’m not great at developing user interfaces).


If you want to keep up with these “This Week in Grails” posts you can access them directly via their category link or in an RSS reader with the feed for just these posts.


Translations of this post:



Plugins

There were 3 new plugins released:

  • easygrid version 0.9.9. Provides a convenient and agile way of defining Data Grids
  • mongeez version 0.2.1. Integrates the Mongeez change management system for MongoDB
  • p6spy-ui version 0.1. Uses the P6Spy library to intercept JDBC calls and display them in a web page

and 15 updated plugins:

  • app-forty-two-paas version 0.2. Develop engaging and connected Mobile, Web, Social, Enterprise and SaaS Apps using ShepHertz App42 PaaS Cloud and Backend as a Service Platform
  • closure-compiler version 0.9. Compiles/optimizes your javascript resources with the Google Closure Compiler
  • cookie-session version 2.0.0. Allows you to store session data in a cookie
  • cxf version 1.0.7. Expose Grails services as SOAP web services via CXF
  • dojo version 1.6.1.12. Integrates the Dojo javascript toolkit
  • ember-templates-precompiler version 0.2.1. Precompiles EmberJS powered Handlebars templates
  • google-visualization version 0.6. Provides a taglib for the interactive charts of the Google Visualization API
  • greenmail version 1.3.3. Provides a wrapper around GreenMail and provides a view that displays ‘sent’ messages – useful for testing
  • inflector version 0.2. Provides tags to simplify common text inflections, e.g. plural and singular words
  • inviter version 0.4. A Grails port of the functionality found in the OpenInviter PHP project
  • jquery version 1.8.2. Integrates jQuery
  • mail version 1.0.1. Send email from your application
  • neo4j version 1.0.0.M5. GORM for Neo4j
  • stripe version 1.2. Use Stripe to process credit card transactions
  • vaadin version 1.7.0-beta7. Adds Vaadin (http://vaadin.com/) integration

Interesting Tweets

User groups and Conferences


This Week in Grails (2012-44)

Thursday, November 08th, 2012

The big news of this week was the Grails 2.2 RC2 release. Please try out RC2 soon and help us to find issues before the GA release.

The Grails48 hackathon is this weekend, Nov 9-11th, 2012.

Mr Haki wrote a book: Gradle Effective Implementation Guide.

A couple of videos from GR8Conf US were released this week: Ken Kousen’s log.rofl(‘Fun with Groovy metaprogramming’) and Rob Fletcher’s Grails Fields plugin

The 2012 Groovy & Grails Exchange is coming up soon – only one month away. I’ll be doing two talks and am really looking forward to it; the conference is one of the best and London is a cool city.

The Greach site has been updated for the 2013 conference in January. Get your tickets now for 90€ until November 30th when the prices go up, and if you have an idea for a talk send it in – the call for papers is still open.

I did a blog post this week: Grails SQL Logging part 2 – groovy.sql.Sql.


If you want to keep up with these “This Week in Grails” posts you can access them directly via their category link or in an RSS reader with the feed for just these posts.


Translations of this post:



Plugins

There was one new plugin released:

  • modules-manager version 0.2.1. Creates resources modules using packaged resources from Maven central repository

and 15 updated plugins:

  • address version 0.2. An address domain object that can be embedded in other domain object to save redefining it all the time
  • airbrake version 0.9.0. Notifier plugin for integrating apps with Airbrake
  • cache version 1.0.1. Adds controller action, service method, and JSP fragment caching
  • database-migration version 1.2. Official Grails plugin for database migrations
  • external-config-reload version 1.2.2. Polls for changes to external configuration files (files added to grails.config.locations), reloads the configuration when a change has occurred, and notifies specified plugins by firing the onConfigChange event in each
  • facebook-sdk version 0.4.3. Allows your application to use the Facebook Platform and develop Facebook apps on Facebook.com or on web sites (with Facebook Connect)
  • fixtures version 1.2. Load test data via a convenient DSL
  • html5-mobile-scaffolding version 0.4. Scaffolds HTML5 mobile application using jQuery mobile in a single page
  • jsonp version 0.2. Override render method defined for all controller to add parameter callback function name to provide cross domain JSONP RESTful controllers
  • kickstart-with-bootstrap version 0.8.6. Start your project with a good looking frontend, with adapted scaffolding templates for standard CRUD pages using Twitter Bootstrap
  • neo4j version 1.0.0.M4. GORM for Neo4j
  • newrelic version 0.4. Adds the NewRelic Real User Monitoring feature to your GSP pages
  • spock version 0.7. Brings the power of the Spock testing and specification framework to Grails
  • spring-security-saml version 1.0.0.M17. SAML 2.x support for the Spring Security Plugin
  • twitter-bootstrap version 2.2.1. Twitter Bootstrap CSS framework resource files

Interesting Tweets

User groups and Conferences


Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 License.