throw in our first 3 born children and its a go ;)~ haha jk sounds good to me, just send me my task(s) and then I will post them and have the list do them hahahaha
no but for real, sounds good ~Dave the disruptor~ good sites - make money getting rid of ie :) http://explorerdestroyer.com/ http://www.killbillsbrowser.com/ ---------------------------------------- From: "Andy" <[EMAIL PROTECTED]> Sent: Wednesday, November 16, 2005 5:48 PM To: CF-Talk <[email protected]> Subject: Open Source Shopping Cart Architecture I am posting this in CF-Talk versus the Shopping Cart forum becuase 1. Architecture discussion may be interesting to those not interested in Cart 2. Those not interested in Cart may wish be post opinion (please!) Lets move beyond terms OO or not OO and get to a specific architecture. Let me be the first to expose my ignorance and propose the following for comment: * Development will be based off of CFMX 7.0, or whatever the current version is once we complete the architecture plans. * We use CFC's, with "exposed" CFC's representing business, real life, objects such as Order, Item, User, etc. This implies that we may decide to build base components such as controllers that "Users" will not be able to call. Since I don't reallly understand what a controller is, I can't go any deeper then this. But I thought the term was cool... * Objects can be sent either pre-defined structures or XML. Agreement to formats will be later part of discussion * The first person using XML will submit the drafts of both the XML and the code to convert the XML to non-xml format. We will plan for the likihood that this will be needed, just don't have to build it now. * Objects will return the same format that they are sent * Objects and their methods are designed assuming that they are not persisted * Object methods are designed to complete a single business task (OK this might be obvious, but I've had a few glasses of port...) * Objects are designed to enable customization without touching base code, minimizing impact on upgrading to later versions * Objects will NEVER enable output (once debugged, of course!) * Objects will be secured via the "Roles" attribute, which implies that has been executed prior to an object being called. This is likely to translate into the need for a User object, which is probably a good idea anyway. Folks who wish to use alternative security can pre-login users with all possible roles that their Users may require * Objects will NOT test for required variables or variable formats(date, string, integer, you get the point), except as noted below, which means that native CFMX errors will be thrown if required formats are not followed. Code can be extended as noted above if specific usage/implementation requires more "User Friendly" error messages * All database activity will be through stored procedures to completely decouple the application from the underlying database system. If you don't like our database design, need to denormalize for perforance, or need to add attributes, you will be able to do so without complicating upgrading to later versions. Performance will be improved by enabling even complex, multi-table adds and updates to be performed with one SQL call * All "calls" to the stored procedures will use CFQueryParam. Native CFMX errors will be thrown. Spoofers be damned * All calls to store procedures will include a User Name and Password, so if User required security at DB level, OOTB (Out Of The Box) solution will support Based off of these requirements, each CFC would have the following design(items in <>, replace with appropriate Object Name or requested path\name): Something.cfc extends() 1. instance = struct new 2. instance.obj = createObject( ...) for each "Has A" relationship. Do not duplicate object if it is required in multiple places(e.g. item in an order) Function Init arguments config 1. move arguments.config to structure Return This Function addXML method access=Public roles="addSomething" arguments xmlInput - an XML document in defined format Return moveToXML(addObject(moveSomethingFromXML(arguments.xmlInput)) Function updateXML method access=Public roles="updateSomething" arguments xmlInput - an XML document in defined format Return moveSomethingToXML(updateObject(moveSomethingFromXML(arguments.xmlInput)) Function moveSomthingFromXML method access=Public (to allow for when Something is the other side of a "Has A" relationship and therefore is an variable object within another object) arguments xmlInput XML....> 1. Set local variable Data as a structure 2. Move standard data elements to Data 3. If instance.Config not defined and xml\Config is defined 3.1 Move xmlInput\config to instance.config (allow single call of object to perform all required tasks. This will be an include so that it needs to be created only once for all objects) 4. If Something object extends another thing 4.1 instance.data. = xmlmove Name>ToXml(argumetns.xmlInput) 5. If Something object has a "Has A" relationship, for each relationship: 5.1 variables.data. = xmlmove Name>ToXml(xmlInput\) 6. If Something has been extended with new attributes as noted in control block of XML, include addSomethingPreExt Return variables.Data Function moveSomthingToXML method access=Public (to allow for when Something is "extended by" or the other side of a "Has A" relationship and therefore is an variable object within another object) arguments structInput XML....> 1. read XML from file to variable data (or application variable to improve performance) 2. Move standard data elements to Data 3. If Something object extends another thing 3.1 data. = xmlmove Name>FromXml(argumetns.structInput) 4. If Something object has a "Has A" relationship, for each relationship: 4.1 variables.data. = xmlmove Name>FromXml(structInput\) 5. If Something has been extended with new attributes as noted in control block of XML 5.1 include addSomethingPostExt Return variables.Data Function add method access=Public roles="addSomething" arguments structInput- an document in defined format plus an extended attributes 1. local variable Data = duplicate arguments.structInput 2. variables.data = validateSomething(variables.Data) 3. If identified errors not of sufficient gravithy to prevent saving 3.1 Execute add stored proc 3.2 Add required additional info to variables.data (when we get past this higher level design, we can talk about my thoughts here...) Return variables.Data Function update method access=Public roles="updateSomething" arguments structInput- an document in defined format plus an extended attributes 1. local variable Data = duplicate arguments.structInput 2. variables.Data = validateSomething(variables.Data) 3. If identified errors not of sufficient gravithy to prevent saving 3.1 Execute update stored proc Return variables.Data Function validateSomething access="Public" (to allow for when Something is "extended by" or the other side of a "Has A" relationship and therefore is an variable object within another object) arguments structInput- an document in defined format plus an extended attributes 1. local variable Data = duplicate arguments.structInput 2. Perform all of the OOTB validations. Put errors into structure in data.Errors 3. If Something object extends another thing 3.1 data. = validate(data) 4. If Something object has a "Has A" relationship, for each relationship: 4.1 variables.data. = validate Name>(Data ) 5. If Something has been external validations as noted in control block of XML 5.1 include SomethingValidateExt Return variables.Data Additional methods include getSomethingXML, and get plus perhaps some standard functions like recordError> ............................... Let the comments begin ... or just dismiss me enmasse with a comment (Jane, you ignorant slut) and present an alternative.....Either way we will make progress Andy ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:224420 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

