<?xml version="1.0" encoding="utf-8"?>
			
			<rss version="2.0">
			<channel>
			<title>Application Generation - Custom Data Types</title>
			<link>http://www.pbell.com/index.cfm</link>
			<description>A series of occasional musings on architecting, securing, optimizing and generating web based applications. By Peter Bell.</description>
			<language>en-us</language>
			<pubDate>Mon, 06 Sep 2010 19:44:56 -0400</pubDate>
			<lastBuildDate>Fri, 25 May 2007 10:30:00 -0400</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>pbell@systemsforge.com</managingEditor>
			<webMaster>pbell@systemsforge.com</webMaster>
			
			
			
			
			
			<item>
				<title>When to Make your Own Types - a Nice Introduction</title>
				<link>http://www.pbell.com/index.cfm/2007/5/25/When-to-make-your-own-types--a-nice-Introduction</link>
				<description>
				
				It isn&apos;t new, but this &lt;a href=&quot;http://martinfowler.com/ieeeSoftware/whenType.pdf&quot;&gt;PDF from Software Magazine&lt;/a&gt; provides a nice concise view of some of the benefits of what I call custom data types.

Unfortunately, implementing these in ColdFusion is a bit of a pain only due to the cost of object instantiation, so my best solution to date is to &quot;hack it&quot; using a DataTypeFacade singleton and getting my business object to delegate most property specific actions to that facade which in turn calls the appropriate data type (so I have singletons for DateTime, SSN, PhoneNumber, etc.). That works pretty well in practice.

How do other people implement custom data types in their CF applications?

[Why a facade? Because I don&apos;t want to have to inject 50 different data types into each transient business object - I feel it is cleaner to just inject a single facade - especially while my API is still settling down.]
				
				</description>
				
				<category>ColdFusion</category>
				
				<category>Custom Data Types</category>
				
				<pubDate>Fri, 25 May 2007 10:30:00 -0400</pubDate>
				<guid>http://www.pbell.com/index.cfm/2007/5/25/When-to-make-your-own-types--a-nice-Introduction</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Generating 80% of your applications: Step 1 - Implementing Custom Data Types in ColdFusion</title>
				<link>http://www.pbell.com/index.cfm/2006/11/1/Generating-80-of-your-applications-Step-1--Implementing-Custom-Data-Types-in-ColdFusion</link>
				<description>
				
				I love the idea of scaffolding. The more routine work that the computer can do for me (especially in terms of CRUD), the better. But the biggest complaint most people have who have used scaffolding is that they usually have to replace it for production because the code is &lt;a href=&quot;http://www.pbell.com/index.cfm/2006/8/30/Why-Scaffolding-Sucks&quot;&gt;too naive&lt;/a&gt;.

If you look at most of the reasons you have to replace scaffolding it is simply because you know that a field is a phone number or an age rather than a string or a date time (which is all the database knows) and you typically want to apply more specialized form fields, display rules, transformations and validations. The solution is to improve scaffolding with Django style custom data types rather than Ruby on Rails style database metadata.

So, why not have a system that just allows you to describe custom data types in terms of their form fields, display rules, transformations and validations and then simply define all of your object properties using those custom data types? That is exactly what I have been doing for the last few years in my application generator, and I’m currently in the process of trying to upgrade the way this works to make it a little more OO.
				 [More]
				</description>
				
				<category>Custom Data Types</category>
				
				<category>Design Patterns</category>
				
				<category>Building The Framework</category>
				
				<pubDate>Wed, 01 Nov 2006 08:56:00 -0400</pubDate>
				<guid>http://www.pbell.com/index.cfm/2006/11/1/Generating-80-of-your-applications-Step-1--Implementing-Custom-Data-Types-in-ColdFusion</guid>
				
			</item>
			
		 	
			</channel></rss>
	

