<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Aarrgghh!!: Squidhead</title>
<link>http://www.numtopia.com/terry/blog/</link>
<description>The Internet Home of Terrence Ryan.</description>
<language>en</language>
<copyright>Copyright 2009</copyright>
<lastBuildDate>Thu, 25 Sep 2008 23:01:52 -0500</lastBuildDate>
<generator>http://www.movabletype.org/?v=4.0</generator>
<docs>http://blogs.law.harvard.edu/tech/rss</docs> 


<item>
<title>Squidhead Still Swimming</title>
<description><![CDATA[<p>I'm pleased to announce that <a href="http://squidhead.riaforge.org/">Squidhead</a> is getting some more chefs.  I'm pleased to announce that <a href="http://www.mischefamily.com/nathan/index.cfm">Nathan Mische</a> and <a href="http://www.lifelikeweeds.com/">Dave Konopka</a> are joining the effort. I'm excited about both additions.  Dave was working with me when I first wrote Squidhead and has already contributed some code. Nathan is, of course, the lead developer on <a href="http://coldfire.riaforge.org/">ColdFire</a>.
</p><p>We're still working out what's coming down the pike, but improvements will include: 
</p><ul><li>A more organized and useful API to the database introspection piece.
</li><li>A better template system
</li><li>A configuration creator and editor
</li></ul><p>It's all towards making Squidhead more useful and extendable. Expect new releases soon.
</p>]]></description>
<link>http://www.numtopia.com/terry/blog/archives/2008/09/squidhead_still_swimming.cfm</link>
<guid>http://www.numtopia.com/terry/blog/archives/2008/09/squidhead_still_swimming.cfm</guid>
<category>Web Development</category>
<pubDate>Thu, 25 Sep 2008 23:01:52 -0500</pubDate>
</item>

<item>
<title>Knowledge@Wharton High School Coming Soon</title>
<description><![CDATA[<p>I'm pleased to report that the <a href="http://knowledge.wharton.upenn.edu/">Knowledge@Wharton</a> team launched a pre-release site for the upcoming <a href="http://kwhs.wharton.upenn.edu/">Knowledge@Wharton High School</a>. If you are, or know any high school students send them along.  We're launching in February 2009, and as part of that, are holding an essay contest with prizes. I don't think we've spelled out what those prizes are, but from discussions I've heard, they're pretty awesome.
</p><p>It's powered by ColdFusion 8, and Flash Video.  I worked on the backend details: hosting, network configuration, database CRUD.  My co-worker Sanjay did the design and UI, and my boss Dave, did the Flash video setup.  The time it took us to go from mockup to finished product was very short - we did this much quicker than I had done before for non-personal project. I know it isn't a huge site, but after years of working on nothing but backend systems that never get seen by the public, it was extremely satisfying to work on something that wasn't behind a corporate login.  
</p><p>A couple other things make me happy about this. <a href="http://squidhead.riaforge.org/">Squidhead</a> powered backend development, which made dealing with last minute schema changes a snap. It also used the core application framework that I've been developing for Knowledge. It was the first project we did with the new one click build process. It uses <a href="http://squidhead.riaforge.org/">unfuddle.com</a>, SVN commit hooks, ANT, and ColdFusion calling ANT to allow for:
</p><ul><li>Automatic publishing of SVN checked-in content to a shared development server
</li><li>1 Click publishing of checked in content to a shared development server (In case automatic is too slow)
</li><li>1 Click publishing of shared development space to staging
</li><li>1 Click publishing of staging to production
</li><li>1 Click publishing of SVN checked-in content to development to staging to production
</li></ul><p>This new model allowed for both a thoughtful develop and review process during development, and was flexible enough to allow for rapid content updates when we were rolling out production.  
</p><p>All in all, it was awesome to use all of the stuff I learned about over the past two years at <a href="http://www.cfobjective.com/">cf.Objective</a> to do my job.</p>]]></description>
<link>http://www.numtopia.com/terry/blog/archives/2008/09/knowledgewharton_high_school_coming_soon.cfm</link>
<guid>http://www.numtopia.com/terry/blog/archives/2008/09/knowledgewharton_high_school_coming_soon.cfm</guid>
<category>Web Development</category>
<pubDate>Thu, 25 Sep 2008 11:05:09 -0500</pubDate>
</item>

<item>
<title>Automating Documentation Part 2</title>
<description><![CDATA[<p><span style="font-size: 10pt;">This is a follow up to the post <a href="http://www.numtopia.com/terry/blog/archives/2008/02/automating_documentation.cfm">Automating Documentation.</a>  <a href="http://www.thecrumb.com/">Jim Priest</a> wanted to see example code, and I'm happy to oblige. 
</span></p><p><span style="font-size: 10pt;">For this example, I am sharing the code for documenting "steps" in <a href="http://squidhead.riaforge.org/">Squidhead</a>. Steps are operations that do one thing, like generate stored procs, or ant scripts, or email developers. They are powered by cfm templates in a specific folder.  Once there they can be referenced through in the project's config file. The documentation for them is included in the download for Squidhead, and can be viewed online (<a href="http://www.numtopia.com/squidhead/docs/steps.cfm">Squdihead -  Steps</a>).
</span></p><p><span style="font-size: 10pt;">So after the jump, here is the code for creating this documentation.
</span></p>]]></description>
<link>http://www.numtopia.com/terry/blog/archives/2008/02/automating_documentation_part_2.cfm</link>
<guid>http://www.numtopia.com/terry/blog/archives/2008/02/automating_documentation_part_2.cfm</guid>
<category>Squidhead</category>
<pubDate>Fri, 08 Feb 2008 12:09:25 -0500</pubDate>
</item>

<item>
<title>Squidhead Updates and New Features</title>
<description><![CDATA[<p>It's been a little while since I've talked about new features of <a href="http://squidhead.riaforge.org/">Squidhead</a>, so I figured I would take the opportunity to blow my own horn. 
</p><p>New features:
</p><ul><li>Oracle Support
</li><li>Linux Support
</li><li>Linking table support 
</li><li>FKCrazy Application template
</li><li>Rudimentary ColdSpring Support
</li></ul><p>Squidhead will run against Oracle 10g. It alters its model a bit to create stored procedures within packages, as this seemed to be in keeping with Oracle Best Practices.
</p><p>Squidhead will run on Ubuntu.  I haven't tried it in other flavors yet, but I can't tell why it wouldn't. 
</p><p>If you follow the convention of naming tables [table1]To[table2] and have the primary keys from table1 and table2 as foreign keys, Squidhead will recognize the table as a linking table. It will create stored procedures that pass queries through this linking table to create relationships between linked tables.
</p><p>FKCrazy application will use the linking table information to automatically create interface that uses all of the foreign key relationships to add and delete child records. It can do this in a one to many relationship, or in a many to many relationship.  Translation:  If you've seen my <a href="http://www.numtopia.com/terry/blog/archives/2007/10/facebook_in_17_minutes.cfm">Facebook in 17 minutes</a> presentation - everything I did manually at the end now happens automatically. So if I did it today, it would be more like Facebook in 12 minutes.
</p><p>Squidhead can create its own <a href="http://coldspringframework.org/">ColdSpring</a> configuration files.  Not earth shattering but makes integrating a Squidhead application with an application already in ColdSpring much easier.
</p><p>So there you go, quite the update over the past few weeks. </p>]]></description>
<link>http://www.numtopia.com/terry/blog/archives/2007/11/squidhead_updates_and_new_features.cfm</link>
<guid>http://www.numtopia.com/terry/blog/archives/2007/11/squidhead_updates_and_new_features.cfm</guid>
<category>Squidhead</category>
<pubDate>Wed, 21 Nov 2007 00:31:25 -0500</pubDate>
</item>

<item>
<title>Squidhead Presentation</title>
<description><![CDATA[<p>I've posted my <a href="http://www.numtopia.com/terry/files/squidhead.ppt" title="Squidhead Presentation Given to Philadelphia CFUG">Squidhead Presentation</a> that I gave last night at the <a href="http://www.phillycfug.org/">Philly CFUG</a>. 
</p>]]></description>
<link>http://www.numtopia.com/terry/blog/archives/2007/11/squidhead_presentation.cfm</link>
<guid>http://www.numtopia.com/terry/blog/archives/2007/11/squidhead_presentation.cfm</guid>
<category>Web Development</category>
<pubDate>Wed, 14 Nov 2007 17:27:23 -0500</pubDate>
</item>

<item>
<title>MSSql vs MySQL vs Oracle, Stored Procedures, and Code Generation</title>
<description><![CDATA[<p>Over the past two weeks I've been struggling with adding support for Oracle in <a href="http://squidhead.riaforge.org/">Squidhead</a>. (Expect a release early next week.)  Oracle was more different from both Microsoft SQL and MySQL than they were from each other.  It got me thinking about the three and their various pros and cons for code generation, and their pros and cons for me doing code generation with stored procedures.  I figured it could make a good blog article. (Or someone could see my post and say "Hey you didn't have to do all that because of the <em>blah</em> command!")
</p><p><strong>Microsoft SQL 
</strong></p><p>This was the first one I started with, so the others are being compared to it.  It comes with the built in stored procedure sp_help, which is absolutely brilliant. It gave more information for tables than I ever needed.  It also gives most of the information for a stored procedure that I need.  Although there are a few things lacking which made me have to resort to using sp_helptext, and then parsing the actual stored procedure.   I had to do this to get the number of result sets that a stored procedure returns. (Because if a stored procedure returns more than one record set, Squidhead writes the method to return a structure of queries instead of just a query. ) Also I had to do this to get the metadata of the arguments being passed to a stored procedure. 
</p><p><strong>MySql
</strong></p><p>Of the three this was the easiest to do.  I had a flash one night ("just implement sp_help's queries in MqSQL") and it took me less than 24 hours to add it.  Nonetheless I still had to query a lot of system tables directly to get the results I wanted.  
</p><p>There are few other limitations that bug me, but they aren't related to code generation.  Things like stored procedures not being able to take default values in their inputs, and views not being able to contain subqueries.  I'm sure as those features mature though, we'll see better results there.
</p><p><strong>Oracle
</strong></p><p>Finally, we reach Oracle.  It took me a week of hair pulling, keyboard slamming and muttered curses to get it right.  But finally I did. 
</p><p><em>What I didn't like:
</em></p><p>One has to create a cursor to contain output recordsets for a stored procedure. That's so different than the other systems that I wanted to kill someone.  Although, I must confess it makes counting output record sets much easier. 
</p><p>That everything is limited to a name length of 30 characters.  So I had to get creative with how to deal with stored procedures with names like <em>usp_entryToComment_list_foreign_key_labels. </em>The solution I came up with was to abbreviate them and rename them higher up in the Squdihead stack so that the functions have the "correct" names.
</p><p><em>What I liked:
</em></p><p>Packages.  Packages are sort of like classes or CFC's for Oracle operations. The encapsulate code into discreet chunks.  I basically create a package for every table so my stored procs have names like <em>ENTRYPKG.READ</em> which is better in my mind than <em>usp_entry_read</em> as that's just a way I use to group and sort stored procedures anyway.
</p><p>The sheer amount of data in the various data dictionaries.  I don't have to parse any code strings to get any metadata.  That's much easier.
</p><p>"CREATE OR REPLACE."  Truly awesome.  Cuts down on the amount of steps I have to do to recreate a stored proc or package.  I wish I had known it exists for MySQL.   
</p><p><strong>Conclusion
</strong></p><p>It's kinda funny, and it may be cognitive dissonance talking, but of the three, I really like Oracle the best for code creation and metadata.  Overall, I still lean towards Microsoft Sql as it is the one I know the best.  Also whatever your thoughts on Microsoft  Sql Server Management Studio, it's so much better than SQL developer for Oracle.  But that's a completely different topic. </p>]]></description>
<link>http://www.numtopia.com/terry/blog/archives/2007/11/mssql_vs_mysql_vs_oracle_stored_procedures_and_cod.cfm</link>
<guid>http://www.numtopia.com/terry/blog/archives/2007/11/mssql_vs_mysql_vs_oracle_stored_procedures_and_cod.cfm</guid>
<category>Web Development</category>
<pubDate>Sat, 03 Nov 2007 19:10:09 -0500</pubDate>
</item>

<item>
<title>Presenting at the Philadelphia CFUG 11/13</title>
<description><![CDATA[<p>I'll be doing a presentation and little demo of <a href="http://squidhead.riaforge.org/">Squidhead</a> at the <a href="http://www.phillycfug.org/index.cfm/2007/10/28/Upcoming-meetings">Philadelphia Area CFUG</a> meeting on Tuesday November 13<sup>th</sup>. 
</p><p>I'll be going over the reason behind the application and what it can do. As for the demo, have you seen my <a href="http://www.numtopia.com/terry/blog/archives/2007/10/facebook_in_17_minutes.cfm">Facebook in 17 minutes demo</a>?  Well, I'll be doing that, in about half the time.  (I've made some improvements to Squidhead in the interim.) </p>]]></description>
<link>http://www.numtopia.com/terry/blog/archives/2007/11/presenting_at_the_philadelphia_cfug_1113.cfm</link>
<guid>http://www.numtopia.com/terry/blog/archives/2007/11/presenting_at_the_philadelphia_cfug_1113.cfm</guid>
<category>Web Development</category>
<pubDate>Thu, 01 Nov 2007 21:54:04 -0500</pubDate>
</item>

<item>
<title>Squidhead Mailing List</title>
<description><![CDATA[<p>Inspired by <a href="http://corfield.org/blog/index.cfm/do/blog.entry/entry/Edmund__EventDriven_Model_Framework">Sean's example</a>, I asked myself, "Why doesn't Squidhead have a mailing list?"  
</p><p>"I don't know," I replied. 
</p><p>So now I have one. Feel to join and pester myself and the 2 other people that will join.
</p><p><a href="http://groups.google.com/group/squidhead-coldfusion">Squidhead ColdFusion Code Generator</a>
	</p>]]></description>
<link>http://www.numtopia.com/terry/blog/archives/2007/10/squidhead_mailing_list.cfm</link>
<guid>http://www.numtopia.com/terry/blog/archives/2007/10/squidhead_mailing_list.cfm</guid>
<category>Web Development</category>
<pubDate>Wed, 24 Oct 2007 17:53:27 -0500</pubDate>
</item>

<item>
<title>Why Use Squidhead?</title>
<description><![CDATA[<p>Squidhead has gone through a little resurgence since I got back from MAX.  It's happened for two main reasons.  
</p><ol><li>I'm using to it to build a more complex application
</li><li>I talked to a few people about it, and they actually liked it
</li></ol><p> But it occurs to me that I could/should do a better job explaining why you might want to give it a longer look. 
</p><p><strong>Squidhead might be for you if:
</strong></p><ul><li>You or your organization requires a generator that uses stored procedures instead of inline SQL calls
</li><li>You or your organization prefers using foreign keys and wants a generator that can use them to discover business logic
</li><li>You want to fool around with code generation but don't the like MVC code that many of the others use.
</li></ul><p><strong>Squidhead might give you an excuse to:
</strong></p><ul><li>Work with Ant, because of the build.xml files it creates for itself.
</li><li>Experiment with Unit Testing, because it builds its own CFUnit Tests and runs yours too
</li></ul><p><strong>Squidhead isn't for you if:
</strong></p><ul><li>You find the name "Squidhead" ridiculous.
</li><li>You're already using a more established generated or framework
</li></ul><p>If you're interested, here are some resources for you:
</p><ul><li><a href="http://squidhead.riaforge.org/" title="Squidhead at RIAForge">Squidhead at RIAForge</a>
		</li><li><a href="http://www.numtopia.com/squidhead/" title="Squidhead Documentation">Squidhead documentation online</a></li></ul>]]></description>
<link>http://www.numtopia.com/terry/blog/archives/2007/10/why_use_squidhead.cfm</link>
<guid>http://www.numtopia.com/terry/blog/archives/2007/10/why_use_squidhead.cfm</guid>
<category>ColdFusion</category>
<pubDate>Wed, 17 Oct 2007 21:56:26 -0500</pubDate>
</item>

<item>
<title>Facebook Demo Part 2</title>
<description><![CDATA[<p>Um, hey, did some of you try and download the Flash version of the video?  Um, yeah, and did it crash your browser, and possibly crash your computer?
</p><p>Sorry about that. 
</p><p>I've fixed the Flash version and it shouldn't do that anymore.  I should have gone with Flash Video encoder in Flash CS3 from the get go. 
</p><p><a href="http://seven-dev.wharton.upenn.edu/users/tpryan/facebook/facebook.cfm" title="Build a Facebook in 17 minutes.">Flash Version</a></p>]]></description>
<link>http://www.numtopia.com/terry/blog/archives/2007/10/facebook_demo_part_2.cfm</link>
<guid>http://www.numtopia.com/terry/blog/archives/2007/10/facebook_demo_part_2.cfm</guid>
<category>Web Development</category>
<pubDate>Mon, 08 Oct 2007 21:10:48 -0500</pubDate>
</item>

<item>
<title>Facebook in 17 Minutes</title>
<description><![CDATA[<p>I've long thought about doing a blog in 15 minutes demo of <a href="http://squidhead.riaforge.org/">Squidhead</a>.  But come on, everyone's done one by now, right? 
</p><p>Then I thought about ColdFusion 8 and its image capabilities, and the image CRUD that I've added to Squidhead and thought maybe a facebook type application would be more compelling. So I did it, and put it up on Google Video. (cause I couldn't get it under 10 minutes.) Then I saw it on Google video and was repelled by the quality of the video.  So I have few options to watch it below. 
</p><p>I show off three features of Squidhead in the video:
</p><ul><li>Image CRUD interface
</li><li>Foreign Key usage
</li><li>Scaffolding your stored procedures.
</li></ul><p>If anyone watches it, please let me know what you think.
</p>
<p><strong>UPDATE:</strong> It appears that the Flash Version will cause your computer to crash. Sorry about that. I will have a replacement up at some point in the very near future.</p>
<p><strong>UPDATE:</strong>Flash Video version works now.</p>
<ul><li><a href="http://video.google.com/videoplay?docid=3636070234577090588&amp;hl=en" title="Build a Facebook in 17 Minutes">Google Video Version</a> (pretty blurry)
</li><li><a href="http://seven-dev.wharton.upenn.edu/users/tpryan/facebook/facebook.cfm" title="Build a Facebook in 17 Minutes">Flash Version </a>(Takes a long time to download)
</li><li><a href="http://seven-dev.wharton.upenn.edu/users/tpryan/facebook/facebook.wmv" title="Build a Facebook in 17 Minutes">Windows Media Version</a> (download, still pretty long to download)
</li></ul>]]></description>
<link>http://www.numtopia.com/terry/blog/archives/2007/10/facebook_in_17_minutes.cfm</link>
<guid>http://www.numtopia.com/terry/blog/archives/2007/10/facebook_in_17_minutes.cfm</guid>
<category>Web Development</category>
<pubDate>Sun, 07 Oct 2007 18:13:25 -0500</pubDate>
</item>

<item>
<title>Squidhead 2.0</title>
<description><![CDATA[<p>I've been noodling here and there and have finally put the finishing touches on Squidhead 2.0.  
</p><p>Before I started rewriting, I spent some time developing more applications with Squidhead.  I figured out a couple areas of inefficiency and tried to fix them when I could.  Creating configuration files took longer than it should and was a bit confusing. I found myself writing Ant scripts for all of my applications. I kept forgetting to test my applications. 
</p><p>Further when I was maintaining the actual Squidhead codebase, some things were frustrating.  Maintaining a separate code base for ColdFusion 8 and ColdFusion 7 was a pain in the ass. Maintaining a simple version and a business version was a pain.  Adding new features required a series of cascading tweaks because it was poorly architected. 
</p><p>So here are the solutions to all of those issues and a few more for good measure.
</p><p>New features:
</p><ul><li><strong>MySql 5.0 Support
</strong></li><li>It creates Ant Build files for common tasks
</li><li>It can run CFUnit tests that it creates during its build
</li><li>It now will use CF8 rich elements it the generated crud *
</li><li>It now handles images *
</li><li><div>It's now a little easier to extend
</div><ul><li>It's easy to add steps.
</li><li>It's possible to add application templates
</li></ul></li><li>Modified XML configuration allows developer to override certain defaults like form field labels. 
</li><li>New Configuration Builder
</li><li>New Shiny Web 2.0 looks (Okay, not a feature per see.)
</li><li>Cheesey Web 2.0 Logos created for every application. 
</li></ul><p>* CF 8 features can be turned off if application will not be running on a CF8 server. 
</p><p>Deprecated Features:
</p><ul><li>Simple Applications (They are still available, but they won't be updated)
</li></ul><p>Removed Features:
</p><ul><li>Threading (Speed Enhancements weren't enough to justify added complexity)
</li></ul><p>Requirements:
</p><ul><li>Squidhead: ColdFusion 8
</li><li>Database: Microsoft SQL 2000 or 2005; MySql 5.0
</li><li>Generated Application Using MSSQL: ColdFusion 7 or 8
</li><li>Generated Application Using MySql: ColdFusion  8
</li></ul><p>Notes:
</p><ul><li>For the most part, your old config files will still work.  However the more changes you made the more likely they are to have problems. 
</li></ul><p>Old versions of Squidhead still available at <a href="http://www.numtopia.com/squidhead">http://www.numtopia.com/squidhead</a>.</p>
<p>The new version is available at <a href="http://squidhead.riaforge.com">Riaforge</a>.</p>]]></description>
<link>http://www.numtopia.com/terry/blog/archives/2007/09/squidhead_20.cfm</link>
<guid>http://www.numtopia.com/terry/blog/archives/2007/09/squidhead_20.cfm</guid>
<category>Web Development</category>
<pubDate>Sun, 23 Sep 2007 02:35:00 -0500</pubDate>
</item>

<item>
<title>CFUnit and CFAnt</title>
<description><![CDATA[<p>I'm working on some improvements to <a href="http://squidhead.riaforge.org/" title="Squidhead at Riaforge">Squidhead</a>, and a few of them relate to Ant. The new version of Squidhead creates Ant build files.  In addition to Ant tasks for rebuilding and refreshing the application, there is also one for running all of the <a href="http://cfunit.sourceforge.net/" title="Welcome To CFUnit">CFUnit</a> tests that Squidhead creates. 
</p><p>Since I'm trying to highlight the ability to add steps to Squidhead applications, I was thinking that it might be cool to not just write the tests as part of the Squidhead build, but also run the tests as part of the Squidhead. Including the ColdFusion autorunner for the reports didn't work.  Because both CFunit and Squidhead rely on &lt;cfflush&gt;.  So I fired up <a href="http://coolskool.blog-city.com/cfant__undocumented_coldfusion_tag.htm" title="CFANT - Undocumented ColdFusion tag">CFAnt</a> to see if it would run. It didn't. It through an error that stated:  BUILD FAILED&#133; askdef class net.sourceforge.cfunit.ant.CFUnit cannot be found. 
</p><p>I copied the version of cfunit-ant-v3-alpha.jar I use with Eclipse to my ColdFusion8/lib directory, restarted the server and voila: BUILD SUCCESSFUL.
</p><p>Ant in ColdFusion is cool. 
</p><p>Oh and I imagine the same tip would help you to run CFCUnit tests to run from &lt;CFAnt&gt;
</p>]]></description>
<link>http://www.numtopia.com/terry/blog/archives/2007/09/cfunit_and_cfant.cfm</link>
<guid>http://www.numtopia.com/terry/blog/archives/2007/09/cfunit_and_cfant.cfm</guid>
<category>Web Development</category>
<pubDate>Wed, 19 Sep 2007 01:49:54 -0500</pubDate>
</item>

<item>
<title>Squidhead Future</title>
<description><![CDATA[<p>I'm doing some serious thinking about the future of Squidhead, and I some stuff I wanted to run by the small but plucky group of Squidhead users that are out there.
</p><p>It's gotten a little unwieldy to do updates for both a ColdFusion 7 and 8 version of the feature set. Additionally, the whole business objects and non-business objects version is also getting hard to support.  Finally, there are a whole bunch of features I would like to support but require ColdFusion 8.  So here is what I am proposing:
</p><ul><li>Ceasing development of the current version of Squidhead.
</li><li>Starting a new development track that required ColdFusion 8 for application generation. (But then generated application could run on ColdFusion 7.)
</li><li>Dropping the non-business objects version of the code.
</li></ul><p>Once I did that, I could do the following:
</p><ul><li>Switch database analysis over to use &lt;cfdbinfo&gt; for most, but not all of what I do. 
</li><li>This would make adding support for other DBMS's easier
</li></ul><p>I'd be happy to hear any feedback you might have on these proposals.  Assuming no one objects, I would publish one last version of the old code as 1.0, and then start pruning and working on what I would call version 2.0. (I would also come up with a more standard versioning system.)
</p><p>
 </p>]]></description>
<link>http://www.numtopia.com/terry/blog/archives/2007/08/squidhead_future.cfm</link>
<guid>http://www.numtopia.com/terry/blog/archives/2007/08/squidhead_future.cfm</guid>
<category>Web Development</category>
<pubDate>Sun, 26 Aug 2007 23:36:40 -0500</pubDate>
</item>

<item>
<title>Squidhead and CFUnit</title>
<description><![CDATA[<p>I published a change to <a href="http://squidhead.riaforge.org/">Squidhead</a> earlier today that included an option for <a href="http://squidhead.riaforge.org/">Squidhead</a> to write its own unit tests today. These unit tests are compatible with and require <a href="http://cfunit.sourceforge.net/">CFUnit</a>. Here's a little bit about the reasons behind this. 
</p><p>I originally started fooling around with unit testing because after drinking <a href="http://www.pragmaticprogrammer.com/">Pragmatic Programmer</a> Kool-Aid, and attending <a href="http://www.cfobjective.com/conference/">cf.Objective</a>, it was the next thing on my list.  I figured I would be pulling them into Squidhead, as it's pretty easy to tell if Squidhead worked (the application is either written or not,) but it's hard to tell if the created application is working. So I started to write unit tests for my DAO Objects figuring it would be an easy place to start.  Once I got one working, I realized it was relatively rule based and could stand to be generated itself. 
</p><p>What it does is:
</p><ul><li>Create a mock struct of the record. 
</li><li>Create a mock struct of the record slightly different from the first.
</li><li>Create a record from the mock record. 
</li><li>Read it back and compares it to the source. 
</li><li>Update it according to the different mock record.
</li><li>Read it back and compares it to the source. 
</li><li>Delete the record
</li><li>Read again to make sure the item is gone.
</li></ul><p>All that is wrapped in a &lt;cftransaction&gt; making sure the thing never happened. Additionally it reads in and honors foreign key constraints.  It's got some weaknesses: it doesn't like binaries or images; its smalldatetime check is only accurate to the hour; and there are probably more bugs lurking. 
</p><p>Now once I got them working, they were in, but what's the point for users of the application? One should expect that the parts work. 
</p><p>So to make this worthwhile I added some logic that will run any test that is in the test directory structure. So if you're using Squidhead and looking to dip your feet in the waters of CFunit or unit testing in general here's your chance.
</p><p>If you're wondering why <a href="http://cfunit.sourceforge.net/">CFUnit</a>, and not <a href="http://www.cfcunit.org/cfcunit/">CFCUnit</a>, it's because as far as I can tell <a href="http://www.cfcunit.org/cfcunit/">CFCUnit</a> requires <a href="http://www.mach-ii.com/">Mach II</a>, and I figured one requirement was better than two. 
</p><p>So if anyone has any suggestion on how to test gateways or dao's I'd be curious. Otherwise check it out. 
</p>]]></description>
<link>http://www.numtopia.com/terry/blog/archives/2007/05/squidhead_and_cfunit.cfm</link>
<guid>http://www.numtopia.com/terry/blog/archives/2007/05/squidhead_and_cfunit.cfm</guid>
<category>Web Development</category>
<pubDate>Thu, 24 May 2007 21:50:53 -0500</pubDate>
</item>


</channel>
</rss>
