Sorry for the MeatLoaf-esque title, but I have a video demo that shows off some new features of both ColdFusion Builder extensions in general, and Apptacular in particular.
One feature of extensions that hasn’t been getting any play is the fact that you can wire up your extensions to run after a project is created. At the end of the New Project Wizard you can choose from a list of all of the extensions that have this enabled, and run anything an extension can do. This is really cool for starting up your projects with your preferred structure and style right from the get go. The video demo shows running Apptacular in this manner.
ORM and databases are great together, but sometimes database conventions run afoul of ORM best practices. Take table prefixes for example. Having a table with tbl_user makes some sense on the database side, it’s basically Hungarian notation for tables. (I’ve also seen people append the schema name to the table, as in the video.)
As necessary as it may be on the database side, it’s a big pain on the ORM side. We don’t want to work with a tbl_user object, we want to work with a user object.
Apptacular allows you to set a prefix that you can have removed from any of your tables. In this case it will convert the table tbl_user to the ORM entity user. Very handy, and saves a lot of work.
The other convention that gets in the way of generating ORM content from the database is plurals in tables. So table users should translate to the ORM entity user. I’ve added a checkmark option that will try and do that for you.
So these options combine to make writing clean, readable ORM from databases with these conventions really quick and easy. Check out the video to see this in action.
Apptacular ColdFusion Builder Extension – onProjectCreate, prefixes and depluralizing. from Terry Ryan on Vimeo.
One thought on “Apptacular, onProjectCreate, and Annoying Database Conventions”
Where can we see , error and correction advice?
I got “invalid CFML construct found on line 23 at column 50” always…