<?xml version="1.0" encoding="utf-8"?>
			
			<rss version="2.0">
			<channel>
			<title>Application Generation - Design Patterns</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>Thu, 23 May 2013 12:54:32 -0400</pubDate>
			<lastBuildDate>Tue, 23 Jun 2009 10:24:00 -0400</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>test@test.com</managingEditor>
			<webMaster>test@test.com</webMaster>
			
			
			
			
			
			<item>
				<title>Managing Composed objects - admin workflows. Input appreciated . . .</title>
				<link>http://www.pbell.com/index.cfm/2009/6/23/Managing-Composed-objects--admin-workflows-Input-appreciated---</link>
				<description>
				
				A common use case in a cms is that you want to add a new object and then add some composed objects. You might add a user and then add addresses to the user or add an event and then add purchasable tickets to that event, etc.

Anyone got any opinions about good workflows to enable this? Lets take the events with multiple composed tickets (and I want to differentiate this from associated objects - such as where a product is associated to multiple categories but isn&apos;t composed within it).

Simplest solution is you go to the event manager, add new event, then  go to the ticket manager and add ticket, selecting the appropriate event. This is very easy to implement in the general case but not very usable.

Maybe the next step up is at the bottom of the &quot;add event&quot; form to have two buttons - &quot;add event&quot; and &quot;add ticket to event&quot;. The first will add the event and go back to the event list. The other will add the event and then display an &quot;add ticket&quot; form which will have two links at the bottom - one to &quot;add ticket to event&quot; and another to &quot;add more tickets&quot;. First will add ticket and go back to either event list or event detail (displaying composed tickets as a master detail screen). The second will add the ticket and display another add ticket screen.

Another approach would be to ajaxify this a little bit. You could add a &quot;add ticket&quot; button with a pop up window for adding tickets right on the add event form, but then the question comes as to how you associate the tickets to the event if it hasn&apos;t been saved yet. Maybe the &quot;add ticket&quot; button both saves the event *and* displays the add ticket window?

The main issue that makes this complex is that in the general case sometimes you come across composed objects that in themselves have composed objects - n levels down. Lets say that you added a project, a project had composed teams, teams had composed events, and events had composed tickets. How do you provide a usable interface that allows you to easily add tickets to the events that you&apos;re adding to the teams that you&apos;re adding to the projects?! Obviously a bit of an edge case, but has anyone ever come across use cases where they had to step down multiple levels of composed objects in that way and what kind of UI did you find to be most usable?

Any input on good approaches to this problem appreciated.
				
				</description>
				
				<category>Design Patterns</category>
				
				<pubDate>Tue, 23 Jun 2009 10:24:00 -0400</pubDate>
				<guid>http://www.pbell.com/index.cfm/2009/6/23/Managing-Composed-objects--admin-workflows-Input-appreciated---</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>When a Form ISN&apos;T a Business Object</title>
				<link>http://www.pbell.com/index.cfm/2008/11/13/When-a-Form-ISNT-a-Business-Object</link>
				<description>
				
				Often in OO apps, forms relate to business objects. You might have a user registration form, an admin form for managing products and a login form for users to access the system. All of those probably relate to business objects (User, Product and User or SiteUser respectively) and you&apos;ll have some kind of system for populating and validating those business objects on form submission.

However, I often find that there are a number of forms on simple websites that really don&apos;t need to relate to a business object at all. If someone wants to set an appointment online, you may well want an Appointment object with a bunch of business logic for setting them and managing them, but if you just want a simple &quot;contact us&quot; form or even an appointment form that is just supposed to send an email to a person to handle, it&apos;s probably not worth having a whole OO based system for processing those forms. This doesn&apos;t mean the form processor won&apos;t go through an OO framework - just that the form processing itself won&apos;t include populating and validating a form specific business object.

That begs the question, how do you determine whether a given form should have a related business object (or objects)  . . .
				 [More]
				</description>
				
				<category>Design Patterns</category>
				
				<pubDate>Thu, 13 Nov 2008 10:35:00 -0400</pubDate>
				<guid>http://www.pbell.com/index.cfm/2008/11/13/When-a-Form-ISNT-a-Business-Object</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>What is an Object as a Struct?</title>
				<link>http://www.pbell.com/index.cfm/2008/4/14/What-is-an-Object-as-a-Struct</link>
				<description>
				
				Let&apos;s say you have an object and you&apos;d like to turn it into a struct. What does that really mean, and what should the code do?
				 [More]
				</description>
				
				<category>Design Patterns</category>
				
				<pubDate>Mon, 14 Apr 2008 15:30:00 -0400</pubDate>
				<guid>http://www.pbell.com/index.cfm/2008/4/14/What-is-an-Object-as-a-Struct</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Rebuilding my Base Object</title>
				<link>http://www.pbell.com/index.cfm/2008/4/14/Rebuilding-my-Base-Object</link>
				<description>
				
				As you might have guessed from my last few postings, I&apos;m doing a ground up &quot;clean up&quot; of all of my LightBase code. The starting point is to give my base object a quick going over . . .
				 [More]
				</description>
				
				<category>Design Patterns</category>
				
				<category>IBO</category>
				
				<pubDate>Mon, 14 Apr 2008 12:52:00 -0400</pubDate>
				<guid>http://www.pbell.com/index.cfm/2008/4/14/Rebuilding-my-Base-Object</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Storing Instance Data in Beans vs. IBOs</title>
				<link>http://www.pbell.com/index.cfm/2008/4/14/Storing-Instance-Data-in-Beans-vs-IBOs</link>
				<description>
				
				As part of my generic getters and setters I like to put my instance data for all of my beans  into a struct so there is no chance that instance data and methods will overwrite each other (which might otherwise be a possibility if both ever had the same names). But when I start to play with IBO&apos;s, I have two types of data to store - instance/object data and class data . . .
				 [More]
				</description>
				
				<category>Design Patterns</category>
				
				<category>IBO</category>
				
				<pubDate>Mon, 14 Apr 2008 10:59:00 -0400</pubDate>
				<guid>http://www.pbell.com/index.cfm/2008/4/14/Storing-Instance-Data-in-Beans-vs-IBOs</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>What do you put in your Base Object?</title>
				<link>http://www.pbell.com/index.cfm/2008/4/14/What-do-you-put-in-your-Base-Object</link>
				<description>
				
				Creating a base object that all of your CFC&apos;s extend is a powerful technique, but one you&apos;ve got to think carefully about . . .
				 [More]
				</description>
				
				<category>Design Patterns</category>
				
				<pubDate>Mon, 14 Apr 2008 09:55:00 -0400</pubDate>
				<guid>http://www.pbell.com/index.cfm/2008/4/14/What-do-you-put-in-your-Base-Object</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Other Approaches to Getters and Setters</title>
				<link>http://www.pbell.com/index.cfm/2008/4/10/Other-Approaches-to-Getters-and-Setters</link>
				<description>
				
				Both &lt;a href=&quot;http://www.bennadel.com/blog/1193-Happy-Medium-Between-Generic-Getters-Setters-And-Property-Methods.htm&quot;&gt;Ben&lt;/a&gt; and &lt;a href=&quot;http://www.firemoss.com/blog/index.cfm/2008/4/10/Getters-and-Setters--a-different-CFC-approach&quot;&gt;Joe&lt;/a&gt; have proposed other ways to provide getter/setter functionality without having to write (and much more importantly to read and maintain) lots of dumb getter and setter methods . . .
				 [More]
				</description>
				
				<category>Design Patterns</category>
				
				<pubDate>Thu, 10 Apr 2008 20:14:00 -0400</pubDate>
				<guid>http://www.pbell.com/index.cfm/2008/4/10/Other-Approaches-to-Getters-and-Setters</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Generic Getters</title>
				<link>http://www.pbell.com/index.cfm/2008/4/8/Generic-Getters</link>
				<description>
				
				When developing Object Oriented code, it&apos;s important to encapsulate the variables contained within an object. That way, you can vary the internal implementation of an object without having to find and change all of the methods that call the object – providing you don&apos;t change the structure or the behavior of the methods for that object.
				 [More]
				</description>
				
				<category>Design Patterns</category>
				
				<category>Wiki</category>
				
				<pubDate>Tue, 08 Apr 2008 10:44:00 -0400</pubDate>
				<guid>http://www.pbell.com/index.cfm/2008/4/8/Generic-Getters</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Adding State to your Business Model</title>
				<link>http://www.pbell.com/index.cfm/2008/4/7/Adding-State-to-your-Business-Model</link>
				<description>
				
				In a &lt;a href=&quot;http://www.pbell.com/index.cfm/2008/4/4/Modeling-Business-Objects-as-State-Machines&quot;&gt;recent posting&lt;/a&gt;, I looked at how it could be useful to model some of your business objects as state machines. In this posting I wanted to do a thought experiment about how you could build the concept of state right into a business object so you would be able to declaratively describe states and then the object would be smart enough to provide the appropriate attributes, validations and methods automatically, throwing an error should you try to access/modify information or undertake an action which was not valid in the object&apos;s current state . . .
				 [More]
				</description>
				
				<category>Design Patterns</category>
				
				<pubDate>Mon, 07 Apr 2008 13:41:00 -0400</pubDate>
				<guid>http://www.pbell.com/index.cfm/2008/4/7/Adding-State-to-your-Business-Model</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Modeling Business Objects as State Machines</title>
				<link>http://www.pbell.com/index.cfm/2008/4/4/Modeling-Business-Objects-as-State-Machines</link>
				<description>
				
				Often business objects in even fairly simple systems go through a number of states within their lifecycle. For instance, you can&apos;t ship an order that has not yet been placed and a user that hasn&apos;t logged in can&apos;t view their account. This post looks at how thinking about state when designing your objects can help you to write more maintainable applications.
				 [More]
				</description>
				
				<category>Design Patterns</category>
				
				<pubDate>Fri, 04 Apr 2008 10:35:00 -0400</pubDate>
				<guid>http://www.pbell.com/index.cfm/2008/4/4/Modeling-Business-Objects-as-State-Machines</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>E-commerce – Orders and Addresses</title>
				<link>http://www.pbell.com/index.cfm/2008/4/1/Ecommerce--Orders-and-Addresses</link>
				<description>
				
				The thing I love about building even very simple e-commerce applications is that they can bring up sufficiently complex classes of design problems to make them a great testing bed for new ways of implementing web applications. Today I want to look a little at the old “orders and addresses” problem to see if it can provide any more generalized insights into Object Relational Mapping . . .
				 [More]
				</description>
				
				<category>E-commerce</category>
				
				<category>Design Patterns</category>
				
				<pubDate>Tue, 01 Apr 2008 13:37:00 -0400</pubDate>
				<guid>http://www.pbell.com/index.cfm/2008/4/1/Ecommerce--Orders-and-Addresses</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>One Service Class Per Business Object - Not as Bad as You Think . . .</title>
				<link>http://www.pbell.com/index.cfm/2007/12/14/One-Service-Class-Per-Business-Object--Not-as-Bad-as-You-Think---</link>
				<description>
				
				For a while I&apos;ve noticed that a number of people who I respect in the ColdFusion world recommend that you not reflexively have one service class per business object. I want to suggest that actually it&apos;s a pretty useful default approach - especially if you want to develop consistent, maintainable applications - quickly and cost effectively. As always, looking forwards to feedback . . .
				 [More]
				</description>
				
				<category>Design Patterns</category>
				
				<pubDate>Fri, 14 Dec 2007 10:35:00 -0400</pubDate>
				<guid>http://www.pbell.com/index.cfm/2007/12/14/One-Service-Class-Per-Business-Object--Not-as-Bad-as-You-Think---</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>How Many Classes Per Business Object?</title>
				<link>http://www.pbell.com/index.cfm/2007/12/13/How-Many-Classes-Per-Business-Object</link>
				<description>
				
				How many class files should you have per business object? In Smalltalk and Ruby, the answer is often one. I&apos;m finding three is working pretty well for me - here&apos;s why . . .
				 [More]
				</description>
				
				<category>Design Patterns</category>
				
				<pubDate>Thu, 13 Dec 2007 10:35:00 -0400</pubDate>
				<guid>http://www.pbell.com/index.cfm/2007/12/13/How-Many-Classes-Per-Business-Object</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>The Death of the Gateway?</title>
				<link>http://www.pbell.com/index.cfm/2007/12/10/The-Death-of-the-Gateway</link>
				<description>
				
				It is interesting to see the change in tenor on the mailing lists recently when discussions turn to DAOs, Gateways, Service classes and the like. I won&apos;t say the Gateway is dead, but when I say it&apos;s feeling unwell, I&apos;m thinking of Soviet era Russian premiers as I think about it . . . :-&gt;
				 [More]
				</description>
				
				<category>ColdFusion</category>
				
				<category>DAO</category>
				
				<category>Design Patterns</category>
				
				<pubDate>Mon, 10 Dec 2007 10:35:00 -0400</pubDate>
				<guid>http://www.pbell.com/index.cfm/2007/12/10/The-Death-of-the-Gateway</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Do YOUR web applications lie?</title>
				<link>http://www.pbell.com/index.cfm/2007/9/12/Do-YOUR-web-applications-lie</link>
				<description>
				
				I noticed a posting on the Scottish CFUG about AOL and session problems and it got me thinking about sessions, the meaning of URIs and whether we&apos;re building websites that lie . . .
				 [More]
				</description>
				
				<category>Design Patterns</category>
				
				<pubDate>Wed, 12 Sep 2007 11:38:00 -0400</pubDate>
				<guid>http://www.pbell.com/index.cfm/2007/9/12/Do-YOUR-web-applications-lie</guid>
				
			</item>
			
		 	
			</channel></rss>
	

