The Dopefly Tech Blog

<< The Dopefly Tech Blog Main page

Scaffolding: a true wow factor device

posted under category: ColdFusion on March 16, 2006 at 1:00 am by MrNate

I've been thinking about frameworks a lot lately, if you couldn't tell. Something that really struck a nerve in my original post, for me, was Ruby on Rails' Scaffolding. The idea is pretty simple. In 1 line of code, a developer can spit out a form page that simply and easily matches up with a database table. It creates, in the background, an entire CRUD application, just like that.

I would venture to say that this is the driving force for RoR. It's popular because it greatly eases the prototyping phase, and gets developers a good start on creating their real web site. Scaffolding is why people say "wow" when they look at Ruby.

Now let's talk ColdFusion. We have got, pretty well, everything short of this one scaffolding area, at least as far as the public domain open source framework community. Why is that?

There are a few answers. For starters, we're afraid of scaffolding. We have it in our heads that we build enterprise applications, and scaffolding (as well as automated data abstraction layers, some frameworks, etc) take the enterprise performance and stability away from us. Maybe it will. Maybe we won't trust the code it can create.

Another reason is just simply that no one has done it right yet. Either it hasn't been open source, or it just looked and felt wrong or unusable, or it couldn't be customized right, or whatever. Nobody has done it right. Not yet. Any attempts have been and killed off for lack of interest.

I suppose this is where my call to action would sit, so without further ado... It's time, ladies and gents, to embrace automatic form and site generation, though in an obviously more CF way. We can do it better. We can put the Rapid back in RAD.

So, 2 things to ponder... how do we do it, and what do we call it?

More on this subject later.

Too old to comment!
On Mar 16, 2006 at 1:00 AM brian.leroux (http://westcoastlogic.com) said:
What defines software as an enterprise application, exactly?

On Mar 16, 2006 at 1:00 AM Brian Rinaldi (brinaldi who really likes remotesynthesis.com) said:
Does CF Wheels do any scaffolding? It is both free and open-source. That being said, the one thing that turned me off about RoR was scaffolding. 1) In 90% of cases (IMHO) it is useless because it doesn't meet the needs of the application. Thus you are forced to spend alot of time trying to tell you application to please ignore the generic crap it just generated for you. 2) I am no fan of the convention over configuration ideology. Projects like Reactor, for instance, make the configuration easy, and its configuration over convention makes it more flexible. If someone (like CF Wheels) wants to do scaffolding, more power to them, but I don't feel it will change much one way or the other.

On Mar 16, 2006 at 1:00 AM Nathan Strutz (http://www.dopefly.com/) said:
Brian L, it's really a matter of opinion. If you think you're doing it, you probably are.

Brian R, thanks for input. CFWheels does not do any scaffolding yet, but I have a feeling Rob Cameron has something up his sleeves.

I agree that scaffolding has a huge potential suck-factor. Stay tuned, I'm still thinking about this :)

On Mar 16, 2006 at 1:00 AM Daniel D (d at the ever popular danield.us) said:
I like the idea of scaffolding but even more like the idea of scafolding generator. So that you get code that can be configured. If the form is build for styling with CSS it can be very easy drop in your app without a lot of work.

On Mar 16, 2006 at 1:00 AM Nathan Strutz (http://www.dopefly.com/) said:
Daniel, that's right on for where I'm going with this. Think customizable on at least 3 different levels (none of them required) before you even get a generic HTML (or flash) form spit out. From there, it should give you a partial page with generic enough class names to make everything snap together in your CSS framework.

On Mar 17, 2006 at 1:00 AM Peter Boughton (cf at the ever-endearing bpsite.co.uk) said:
I tried something similar a few years back, but didn't really know what I was doing and it didn't really get anywhere.
It could be fun to try again now.

Can anyone provide a good/simple example of how RR does scaffolding? (I've Googled but not found anything useful.)

On Mar 17, 2006 at 1:00 AM Craig M. Rosenblum (crosrenblum of gmail.com) said:
Remember codecharge, the highly hyped, application that will let you create speedily one of the pre-packaged or downloadable app templates and just generate teh code for you?

But when you actually look at the code, it's completely awful code.

Or Spectra, Allaire's great Content Management System...

Beautiful but awkward interface...

But it had the most god awful database design and sql queries.

The point being is that automation is a good idea, but implementing it correctly is not as easy as that.

I think this points that the value of application beauty also depends on code and database beauty.

I think it can be done,but how can you make sure the cf code and sql code is of the highest caliber in easy to use, read, document and improve/change or fix? As well as being highly secure and scalible?

So have your great scaffolding dreams,but anchor them strongly in the hard core needs of reality.

On Mar 17, 2006 at 1:00 AM John Farrar (http://www.sosensible.com) said:
I am working on an Active Records like concept for generating code that is simular but 'for me' better. It is aimed at supporting scaffolding like form generation also. This is definitely a thing to do. One other thing my system will support is having the form that it generates process without having to write a special page to process the form! (It will also support building form templates so you can do custom scaffolding.)

On Mar 17, 2006 at 1:00 AM Nathan Strutz (http://www.dopefly.com/) said:
Peter, the best example is from checking out the videos on the rubyonrails.com site.

Craig, the beauty of the code (used and generated) is key to making something that we will use. I sure wouldn't use it if it spit out pure crap all the time ;)

Good comments guys!
Too old to comment!