Apptacular, onProjectCreate, and Annoying Database Conventions

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.

onProjectCreate

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.

Prefixes

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.

Plurals

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.

http://vimeo.com/moogaloop.swf?clip_id=10526198&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=00ADEF&fullscreen=1

Apptacular ColdFusion Builder Extension – onProjectCreate, prefixes and depluralizing. from Terry Ryan on Vimeo.

One thought on “Apptacular, onProjectCreate, and Annoying Database Conventions

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s