Entries for month: November 2008
Working With Transfer ORM - Transfer Transaction Advice
Posted by Paul Marcotte | Tags: ColdSpring , Database , Transfer
Maintaining referential integrity in your database is a good thing. Any decent RDBMS will include ACID (Atomicity, Consistency, Isolation, Durability) transaction support for ensuring consistency and recoverability of your database. With the Transfer ORM Transaction object, one can apply transactions easily to a Service or Gateway. Here's how one can use it to wrap all "save" and "delete" methods for a Service.
A Simple onMissingTemplate Example
Posted by Paul Marcotte | Tags: ColdFusion
For the migration to Mango Blog, I wanted to preserve my previous RSS feed location (/rss.cfm). The new location is feeds/rss.cfm. With the availability of onMissingTemplate event handler for ColdFusion 8, making sure my RSS didn't break was a snap. Here's the snippet of code I added to Application.cfc.
<cffunction name="onMissingTemplate" returntype="void">
<cfargument name="thePage" type="string" required="true">
<cfif arguments.thePage is "/blog/rss.cfm">
<cflocation url="/blog/feeds/rss.cfm" addtoken="false" />
</cfif>
</cffunction>
Not the most elegant solution I've ever developed, but it keeps the RSS feed alive until I decide how I want to manage it the future...
Make Mine Mango Blog - A New Look and Software for Fancy Bread
Posted by Paul Marcotte | Tags: Miscellany
I finally have some free time get back into personal projects and blogging and I decided to kick start things with a migration to Mango Blog.
Transient Creation Performance - ColdSpring and TransientFactory
Posted by Paul Marcotte | Tags: jMeter , ColdSpring , Testing
In my last post, I demonstrated the generic factory I use to create Transient objects in my Coldfusion apps. Jaime Metcher asked in a comment whether the Transient Factory is faster than CS when instantiating transient objects. I had no hard data to answer Jaime's question, so I took the opportunity to set up jMeter on my new dev machine and run through some load tests to find out.A Coldfusion Transient Factory Example
Posted by Paul Marcotte | Tags: ColdFusion , ColdSpring , Design Patterns
When learning how to apply object oriented principles to ColdFusion development, one will assuredly encounter the subject of design patterns. Singleton, Factory, Strategy and Bridge are just some of the patterns that describe solutions to common problems in programming. For this example, I'll demonstrate a variation on the Factory Pattern for transient objects. What is a factory? At it's simplest, a factory encapsulates the creation of objects to provide a consistent api for clients. What is a transient object? A typical OO ColdFusion application will incorporate a combination of Singletons (one instance per application - often instantiated at application startup) and Transients (a per request object that is not maintained in a persistent scope).