OOPhoto - A Painful Transition To Object-Based Controllers

<!---
	Check the first event item to see which controller
	we have to create. Once we have created the appropriate
	Controller, we will pass control off to it.
--->
<cfswitch expression="#REQUEST.Data.Do[ 1 ]#">
	<cfcase value="api">
		<cfset strControllerPath = "content.api" />
	</cfcase>
	<cfcase value="error">
		<cfset strControllerPath = "content.error" />
	</cfcase>
	<cfcase value="gallery">
		<cfset strControllerPath = "content.gallery" />
	</cfcase>
	<cfcase value="home">
		<cfset strControllerPath = "content.home" />
	</cfcase>
	<cfcase value="photo">
		<cfset strControllerPath = "content.photo" />
	</cfcase>
	<cfdefaultcase>
		<cfset strControllerPath = "content.home" />
	</cfdefaultcase>
</cfswitch>
 
 
<!--- Create the controller and pass off the execution. --->
<cfset CreateObject( "component", "#strControllerPath#.Controller" ).Execute( REQUEST.Data ) />
 
<!--- Include display template controller. --->
<cfinclude template="extensions/templates/_index.cfm" />

For Cut-and-Paste