MG3 Feature Sneak: Event Generation Video

Yesterday on YouTube, I posted a video of a new developer workflow coming in Model-Glue 3 called "Event Generation." When in developer mode, hitting a nonexistent event-handler can be configured to generate a conventions-based Controller, listener function, controller, and view. Basically, typing "index.cfm?event=order.list" gives you the following:
  1. An OrderController will be generated if it doesn't exist
  2. A listener function named "list" will be created in OrderController
  3. A message-listener subscribing OrderController.list() to "order.list" will be generated, along with a controller tag if one does not exist.
  4. A view in /order/list.cfm will be created.
  5. An event-handler tag wiring all of this together is created in the XML file of your choice, defaulting to your main ModelGlue.xml
Here's a video of it in action: One of my favorite features coming in MG3 is purely for developer ease of use: hit an event that doesn't exist while in development mode, and it'll generate intelligently named controllers, listener functions, and views, wiring them all together with convention-based XML. Here's a video of Event Generations (and a bit of SES features) in action:

Related Blog Entries

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Can you change your URL routing action to work like coldcourse? (eg.
# Posted By Pat | 4/10/08 7:15 PM
Love it - what's the release date again??
# Posted By Antony | 4/10/08 10:40 PM
Very nice
# Posted By Dave | 4/25/08 5:26 AM
Pretty sleek Joe.. Event generation feature is really a time saver.. Helpers is really a HELP. Bean Injection is simply WOW!!

The new "Formats" feature needed more explanation.. It will be really great if you can write an article focusing this special feature on your blog.. We are ANXIOUSLY WAITING to see that with a small AJAX integration example if possible.

I know it is in Alpha and I faced few issues when I played with it

1)built-in SES URL feature not working for me.
2) event.forward not seems working
3) When we add a new coldfusion UDF file inside '/helpers' folder App needed an init=true to access the new udf functions in 'helper scope' even though reload mode is turned on.

Thanks a lot Joe for your hard work!!

Shimju David
# Posted By Shimju David | 5/5/08 4:10 AM
Can events be generated into different xml files by convention or is it currently just configurable to go to one specific xml file? Our app is pretty big and we tend to have one config file for each controller to keep us sane and include each one into the main ModelGlue.xml. I'm thinking an event named could be added to /config/ModelGlue_user.xml whereas an even named product.view would be added to /config/ModelGlue_product.xml.
# Posted By Jeremy Prevost | 5/16/08 3:29 PM
© 2020 Joe Rinehart
BlogCFC was created by Raymond Camden. This blog is running version