It's been a couple of months, but cfrails
has been "officially" updated (as in, I released a new zip, not just put new code into the repository).
We're a lot closer to 1.0 than one quarter of the way, so soon you should be seeing higher version number jumps. Anyway, here's what's been updated with this release:
Added the automatic include of views/layouts/application_header.cfm and views/layouts/application_footer.cfm even when using view CFC (formerly, this only happened if you instructed it to and using .cfm templates for views). Also added auto-include of controller-specific templates simply by placing controllerName_header.cfm and controllerName_footer.cfm in views/layouts.
Brought the existing unit tests up to date (amazingly, with all the neglect there was only a couple of very minor problems, mostly due to changing paths).
Migrated request processing out of individual applications and into Dispatcher.cfc. This is a major improvement in the DRY arena, and allows me to make changes to the ways requests are processed without having to make them to every application that uses cfrails (Thanks to Dan Lancelot for prodding me to do this a couple of months back).
Added some minor Spry integration for form validation - this only works with required text fields at the moment.
Added the ability to use primary keys that aren't named "id" (although, still no composite PK support)
Changed behavior of a particular file to not catch errors (it was getting hard to debug)
Added an onchange attribute for form elements (can edit onchange per column without writing out the entire form)
cfrails now automatically creates blank controller, model, and view cfcs if you request one where it doesn't exist. This just makes it easier to develop, and may end up being a setting you turn on and off.
Added validations where you can specify a function to call and a message to display upon failure for validating forms (as opposed to simply using the built-in autovalidation based on DBMS metadata).
Added support for bigint, tinyint, and smalldatetime data types.
Added the ability to call a function when outputting a column in a list (though complete closures are not yet fully integrated)
So, there was a lot done as you can tell. And, MySQL support is coming soon
, I promise!
Oh yeah, I forgot what might be the most important part: New, more complete docs on cfrails
are available (thanks to cfcdoc
Hey! Why don't you make your life easier and subscribe to the full post
or short blurb RSS feed? I'm so confident you'll love my smelly pasta plate
wisdom that I'm offering a no-strings-attached, lifetime money back guarantee!
Leave a comment
Sounds great. Just curious, but do you have plans to offer on/off switch for the Spry integration?
Posted by andy matthews
on Jun 12, 2007 at 07:34 PM UTC - 5 hrs
Yes, as a matter of fact I meant to write in there that it will in fact have an on/off switch. I don't know what the default will be, but I'm certainly leaning toward it being off.
Some function in the next release will be introduced into the view, perhaps like setAjaxFormValidation("on") and/or setAjaxFormValidation("off").
The main reason is I don't want to tie you into a particular Ajax framework. Eventually there will be more methods and shortcuts to do things in Spry, but I've also thought about keeping a mapping file so that you could redefine the shortcuts to use a different framework.
However, I don't know if those will come in before version 1. The main issue I have on the table is doing MySQL support, and hopefully I'll get Oracle in the next release too.
Posted by Sam
on Jun 14, 2007 at 11:07 AM UTC - 5 hrs
That would be AWESOME if you allowed us to hook into a different JS library. Marvelous!
Posted by Andy matthews
on Jun 14, 2007 at 11:35 AM UTC - 5 hrs
Leave a comment
Thank you for interesting post !
<a _moz_dirty="" href="http://www.google.fr
Posted by Kate Riri
on Jan 04, 2011 at 04:21 AM UTC - 5 hrs