> The thing about rails is that it generates a
> bare bones scaffold form that includes all of
> the editable portions of that table which can
> easily be modified at a later time. In CF,
> you still need to create a form with all of
> the fields before you can do anything else.
Yeah, that's the portion I wasn't sure about when I watched their 15
minute presentation. I'm not sure I like it generating that much of
the form on the fly... Not that there's anything wrong with it per-se,
but I don't think I'd prefer it. I could build the same thing as a
tool for the onTap framework in a few minutes -- all the groundwork
for it is already in place, fetching and caching the database
meta-data for tables and columns and foreign key constraints, etc. All
it would take is to sit down and write up a custom tag or a display
template that fetches the column info, loops over that query and
generates the form fields with similar assumptions about the data type
and positioning. Something like this:
<cfset rscol = request.tapi.db.columns(variables.table)>
<cfmodule template="#request.tapi.xhtml()#">
<cfoutput>
<tap:form>
<cfloop query="rscol">
<cfswitch expression="#rscol.datatype#">
<cfcase value="text,ntext,clob,nclob">
<cfset type="textarea">
</cfcase>
<cfdefaultcase>
<cfset type="text">
</cfdefaultcase>
</cfswitch>
<input type="#type#" name="#rscol.name#" label="#rscol.name#" />
</cfloop>
</tap:form>
</cfoutput>
</cfmodule>
That's just a 2 minute writeup, so it doesn't account for the primary
key (which should be a hidden field) or include converting
foreign-keys to select boxes, but that's not much code either.
> I was initially wowed by the rapid
> development aspect of RoR, as I get
> deeper into the framework, I'm wowed
> by more interesting things. Say you
> have two tables that are related, say
> an order table and then a line item
> table. The line item table with have
> a column called order_id. The models
> that RoR creates will be aware of the
> relationships. Then you can use
> simple methods to add new line items
> to the order object. You'll not have
> to worry about primary keys and
> foreign keys at all.
Yep, these features are available in onTap too... They may not be as
complete, but they're definately there.
> Joe Rinehart has recently done this
> with MG and I think it's a great step.
> I hope the days of zip packages only
> is limited. I think it's great that
> I can view what changes Joe has made
> to his framework. This makes me feel
> like I have the ability to be more of
> a part of it.
I'll have to see about setting up subversion on my server at home.
> That said, I still haven't tried out
> your framework. I might suggest that
> you make a video similar to the 15
> minute blog video you saw. That would
> go leaps and bounds towards generating
> even more interest in your framework.
Ask and ye shall receive. :)
http://www.fusiontap.com/docs/index.cfm?netaction=articles&article=200
It's been up on the framework site since April. For a while it was set
up as the default home page, but that turned out to be somewhat
annoying... It's in the Articles and Tutorials section.
Several folks have also said that it seems long, so although I'm not
real sure why 18 minutes is "long", I have been considering recording
some shorter demo's more like the quickstart guide I wrote recently.
s. isaac dealey 954.522.6080
new epoch : isn't it time for a change?
add features without fixtures with
the onTap open source framework
http://www.fusiontap.com
http://coldfusion.sys-con.com/author/4806Dealey.htm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:212688
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54