Search Blog

Recent Comments
Re: Stats plugin ported to Model-Glue (by J.mihai at 12/14 8:52 AM)
Re: CFC DAO Generator (by rui at 7/04 5:42 AM)
Re: Updates to the DAO, Bean and Gateway generator (by rui at 7/04 4:49 AM)
Re: CFC DAO Generator (by fwscott at 6/22 7:03 PM)
Re: CFC DAO Generator (by dan at 6/22 12:38 PM)
Re: Trip to Thailand (by fwscott at 3/27 2:10 AM)
Re: CFC DAO Generator (by fwscott at 3/27 2:03 AM)
Re: CFC DAO Generator (by Garry Harstad at 3/26 12:30 PM)
Re: Trip to Thailand (by Niqui Merret at 3/23 4:51 PM)
Re: Adding a blogger ping utility to BlogCFM (by fwscott at 2/20 9:01 PM)
Categories
Annoucements (1 entries)
BlogCFM (3 entries)
CFC Generator (5 entries)
Coldfusion (11 entries)
Fusebox (2 entries)
Greasemonkey (1 entries)
Misc (3 entries)
Archives
November 2005 (2 entries)
October 2005 (1 entries)
August 2005 (1 entries)
July 2005 (4 entries)
June 2005 (5 entries)
May 2005 (7 entries)

Powered by
BlogCFM v1.01

May 2005
CFC DAO Generator
Post a Comment
Since my blog was not up while developing this application I will not go into the details of what all I had to overcome, only why I created this application.

Why?
I am in the process of migrating an existing application that has over 200 tables in the database.  We do not have any of the queries or access to the source code of the existing application.  The closest thing I could find that would do something similar, did not support my database type.

What I needed:
The ability to generate DAO/Bean CFCs from analyzing a table structure.

What I came up with was:
A multi-database CFC DAO generator.  Its all based on XML and is easy to generate a CFC if you know XSL.
I have uploaded a demo here, the demo only runs off the cfsnippets datasource and the downloadable version displays all datasources registered with CF Admin.

Results:
Amazing for me, I was able to generate over 45 files in about 10 minutes.  These CFCs fitted the database structure we were working with and allowed me to create a standard base DAO factory with ease.

If you download this, please make sure you read the README file in the zip file for instructions on installing / customizing.  The frontend is nothing to brag about but the results are just great.

Tell me what you think.
Posted by fwscott at 12:27 PM | Comments (5)
 
Subscription Options

You are not logged in, so your subscription status for this entry is unknown. You can login or register here.

Re: CFC DAO Generator
There seems to be a quoting issue with SQL2005 (maybe even 2000). I modified the table.cfc around line 180 to remove the quotes from the 0 and -1 as I was receiving a SQL error complaining about being a LONG on one side bla bla.

Posted by Garry Harstad on March 26, 2007 at 12:30 PM

Re: CFC DAO Generator
Cool but so you know, there are better solutions to the problem this tried to solve now. I prefer the ORM solutions like Reactor, Transfer, ObjectBreeze or DataManager. For code generation you should check out lludium PU-36 Code Generator.

None of the above were available when I wrote this software.

Either way, thanks for the fix.

Scotty

Posted by fwscott on March 27, 2007 at 2:03 AM

Re: CFC DAO Generator
I just stumbled across this... brilliant dude. A real time saver... any plans for updates?

Posted by dan on June 22, 2007 at 12:38 PM

Re: CFC DAO Generator
Hey Dan,

I do not plan to do any upgrades as there are better products out that do the same thing.

Check out the link attached to the comment.

http://code.google.com/p/cfcgenerator/

However, both operate on the same principal.... modify the XSLT to produce the style of code that you want.

Francis "Scotty" Scott

Posted by fwscott on June 22, 2007 at 7:03 PM

Re: CFC DAO Generator
HI, I am totally new to programming with flex and I'm currently trying to create " Create,Read,Update,Delete "(CRUD) Methods for my project which uses the datasource from SQL2005 server.

Your generator has generated alot of great codes but i do not know how to use them in a flex datagrid for editing, inserting and deleting.

Can u do a very simple application that does this?

I will really appreciate it if u can help..

Thanks once again...

the.seeker.87@hotmail.com -FLEX NEWBIE

Posted by rui on July 4, 2007 at 5:42 AM

Name:   Required
Email:   Required your email address will not be publicly displayed.

Want to receive notifications when new comments are added? Login/Register for an account.

Anti-spam key

Type in the text that you see in the above image:

Your comment:

Sorry, no HTML allowed!