Since I am also a C# programmer, I wrote some templates in CodeSmith. I would
be happy to share. They might be a good starting point for you.
Here are the templates I have so far.
1. StoredProcedures.cst - Look at a MSSqlServer table and generate CRUD stored
procs.
2. ColdFusion_function.cst - look at a MSSqlServer table and it's
dbo.usp_TABLENAME_Insert and dbo.usp_TABLENAME_InsertUpdate stored procs (from
#1) and generate <cffunction> calls suitable for inclusion in a cfc.
3. ColdFusion_actAddPage.cst - look at the InsertUpdate stored proc and a
table and generate the action page to call the cfc in #2. Here is sort of what
it looks like.
<cfset Vendor_ID = 0>
....
<cfif IsDefined("form.Vendor_ID")>
<cfset Vendor_ID = form.Vendor_ID>
</cfif>
....
<cfinvoke component="VendorCatalog" method="VENDOR_CATALOG_InsertUpdate"
returnvariable="qVendorCatalog" >
<cfinvokeargument name="Vendor_Catalog_ID" value="#Vendor_Catalog_ID#">
....
</cfinvoke>
4. ColdFusion_AddPage.cst - generates a bare bones page with <cfinput
type="text"...> and <cfselect...> which calls the add page in #3.
5. ColdFusion_Update.cst - generates a bare bones update page.
6. ColdFusion_TablePate.cst - generates a display page in a table with
<cfoutput> for a single record query.
I generally have to modify these pages a fair amount to add business and
display logic, but at least I do not have to write the tedious part of the 3
tiers and I can get a test page up for a table in an hour or two.
Nick Stein
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:296430
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4