Squidhead – 3 Big Additions

Over the last few days, between the inspiration I got from cf.Objective(), and some positive internal feedback regarding Squidhead, I was inspired to make some cool additions (Or what I consider cool editions.) I figured I would share.

Business Layer

Dave Konopka advocated for a layer between the DAO and UI for awhile, as I explain in my last Squidhead update. Well he finally got it. Basically it’s the place where you want to put all of your logic for dealing with the objects as they will be interacted with by the UI.

XML Structure Cache

I wanted to do a few things to overcome the fact that the database is does not contain enough metadata to handle certain things. But I didn’t want people to have to start with XML to start working with Squidhead. Solution: an XML version of the variable structure that Squidhead uses to generate all of the procedures, functions, cfc’s, custom tags, and cfml pages for an application.

So what happens is that at some point you freeze changes on the database, then you set Squidhead to use the disk cache instead of the database. It will then allow you to change a couple of things in how the application works.

Currently you can only change three things (and have the change do something useful):

  • DisplayName on database columns that will show as labels on all UI components instead of the name. (“First Name” vs f_name).
  • OrderBy on tables which will alter the order of the default List elements
  • ForeignKeyLabel the column which will be substituted for the primary key, in all tables that link to this table via foreign keys.

Which leads me to…

Foreign Key Support

Squidhead now understands foreign keys. Here’s how it works:

Form UI – On forms that interact with tables with foreign keys, Squidhead will produce a select box of the aforementioned “foreign key labels.”

List and Read UI- These components now call separate stored procedures that properly join the requisite tables to show the appropriate “foreign key label” in lieu of the actual value.

I haven’t done anything with children objects or anything yet. Basically the change was to make the UI a little more useful.

My next pass of updates will be documentation related, as I’ve fallen behind.

Anyway give a try when you get a chance. Get it at RiaForge.

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 )

Facebook photo

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

Connecting to %s