OOPhoto: Further Exploration Of The Facade And Controller-Model Interaction

<!--- This is our mock "serivice layer" method. --->
<cffunction
	name="ProcessForm"
	access="public"
	returntype="void"
	output="false"
	hint="I am a method used to mock the processing of form data.">
 
	<cfdump var="#ARGUMENTS#" />
	<cfabort />
 
	<!--- Return out. --->
	<cfreturn />
</cffunction>
 
 
<!--- Param form data. --->
<cfparam name="FORM.from" type="string" default="" />
<cfparam name="FORM.to" type="string" default="" />
<cfparam name="FORM.submitted" type="boolean" default="false" />
 
 
<!--- Check to see if form was submitted. --->
<cfif FORM.submitted>
 
	<!--- Process the form data. --->
	<cfset ProcessForm( FORM ) />
 
</cfif>
 
 
<cfoutput>
 
	<!--- Reset the buffer and stream content. --->
	<cfcontent type="text/html" reset="true" />
 
	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
	<html>
	<head>
		<title>Add Crush</title>
	</head>
	<body>
 
		<h1>
			Add Crush
		</h1>
 
		<p>
			Let us know who likes who!
		</p>
 
		<form action="#CGI.script_name#" method="post">
 
			<!--- Flag form submission. --->
			<input
				type="hidden"
				name="submitted"
				value="true"
				/>
 
			<p>
				<!--- This person. --->
				<input
					type="text"
					name="from"
					value="#FORM.from#"
					/>
 
				<em>likes</em>
 
				<!--- That person. --->
				<input
					type="text"
					name="to"
					value="#FORM.to#"
					/>
 
				<input type="submit" value="Submit" />
			</p>
 
		</form>
 
	</body>
	</html>
 
</cfoutput>

For Cut-and-Paste