I’ve been trying all day to figure out how to turn my todolist-grails application into a Grails plugin, but so far, I’ve hit walls in all directions. Plus, Tomas Lin pointed me to yet another unfinished trial at integrating Flex in Grails, another one trying to work with dpHibernate.

Now I think it’s time for me to step back for a while and think a little bit about what I would like this plugin to do:

  1. When I install it into my project, I want it to create a src/flex directory and copy a dummy MXML application file in it. I don’t think that putting MXML files somewhere under grails-app/views is very clean. I’d rather keep only GSP files there.
  2. I want it to add one servlet and one servlet mapping for the BlazeDS message broker dispatcher servlet. Now the first problem is that this servlet needs a Spring configuration file and I don’t know how to generate it, knowing that this configuration contains a component-scan element that needs to point to the base package of the project.
  3. I need the plugin to handle Spring Security integration when combined with Acegi plugin (this I haven’t even managed to make it work with todolist-grails application so far) and to use the authentication domain generated by Acegi plugin.
  4. I need it to automatically expose all services whose expose static array contains the string ‘amf’ or ‘blazeds’ (the same static variable used my remoting plugin
  5. I need the plugin to automatically recompile my Flex application whenever I run run-app, and when the server is running, whenever something changes under src/flex
  6. I need it to provide a generate-html-wrapper target to generate a html wrapper within web-app
  7. I need it to provide a target to automatically generate Actioscript DTO’s based on a configured package (using GraniteDS GAS generator). By the way, I don’t want to use dpHibernate because I don’t want to expose my Hibernate entities to my presentation layer anyway. I’d rather work with DTO’s, all the more so as Groovy makes it really simple to copy data from Hibernate entities to DTO’s and vice-versa.

If there is a Grails plugin expert out there, please help me make this come true. And if you have the same dreams, if you need this plugin like I do, please leave a comment.


0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.