> First, I think that your apps are way more sophisticated
> then mine.  All I have is a very basic controller (I am
> using Application.cfc in this role),

Mmmm... I'm thinking that might be a misinterpretation of what's
generally meant by "controller" when people talk about MVC... I've
always heard it described as a "traffic cop" which manages the
relationship between the domain model and the view. You certainly
could use the Application.cfc to instantiate your listeners and pass
data from the form/url to them, in which case it would be a
controller, but I'd be surprised if that's the case (and it's not how
I would write it). All of this just sort of FYI mind you.

> a presentation layer and BusinessObjects (basic cfc's
> like Invoice, Order, Customer, Address, Person).  I don't
> have a factory (although I could since I don't know what
> the heck it is).

> So my use of xml in my app is passing between
> Presentation Layer and 1 business object, sometimes
> a couple objects.

Okay, this is more clear and makes more sense to me now. :) I guess I
have a tendency to forget that most CF apps really aren't very large
or complicated (sophistication and complexity don't necessarily go
hand in hand). :)

> Once in an object, I sometimes pass a node of XML to
> another function, but sometimes just 1 or two values
> directly.

My RuleManagers do this internally... From the view, only the
RuleManager is ever referenced directly -- you create a RuleManager
and then you can optionally choose to load/unload a context and a set
of criteria types (by name/classpath) although by default the criteria
types can interrogate the context to determine their own
applicability. From there on you use the UI to allow users to manage
their rules and you call RuleManager.ruleApplies() to determine the
applicability of an individual rules, but you never reference the
criteria objects directly. Within the RuleManager, the criteria type
CFC's (which share a common interface) will send and receive XML nodes
(as a node or as text) to perform the tasks of making changes to the
rule-set and testing the applicability of individual criteria (within
each rule). The only time XML is passed in or out of the RuleManager
is when you instantiate it (and load up a rule-set) or when you pull
the text of the XML to save it to file or database. I realise this
seems like an advert :) just trying to give some context for
comparison really.

>> 2.  I can easily maintain before and after pictures
>> of an object at the client and do not have to create
>> session variables to do so.

> Why would you want them at the client?

> Is that really a big issue for online shoppers? I figured
> if they
> didn't complete the checkout they probably weren't that
> interested in
> the first place.

> AO:  First, I am mostly a B-B site, albeit very small B to
> very small B.
> And failed completion is not always related to
> abandonment.  I've been
> interrupted while placing an order and by the time I got
> back, I've timed
> out.  So I need some mechanism for maintaining state.  I
> like to let buyers
> know when they've made a change, so I need both current
> and past.  This also
> gives me an unwind feature, even after committing the
> transaction.

Okay that makes more sense... I was thinking about retail transactions
where the person's casually considering a t-shirt or somesuch. And the
"unwind" is also something I build into the Members onTap plugin, and
also used XML as part of that undo/redo process, although in that case
the choice of XML was intended to allow many different, as yet unknown
plugins take advantage of that system, without knowing what data they
might want to store.

>> 3.  Now that I've found out that I can validate
>> against the schema, I don't have to maintain basic
>> validation rules at both the UI and
>> Business Object level.

> Even without that, I'd probably still only validate
> at the UI.

> AO:  How does the UI know what to validate?
> Do you add Metadata to all of your attributes that
> has size and type features?  In which case, you are
> created a schema, you've just rolled your own.

Well I have the ability to do it that way just by adding special
attributes to my forms, and yes that is a sort of schema... but
primarily I just pull metadata from the database and tell the form
which table a particular form is designed to manage... In the next day
or so this url ought to work:

http://www.fusiontap.com/?netaction=articles/powerontap

That will be the new home of the Power onTap Captivate presentation...
I mention it only because the latter half of the presentation
demonstrates the tools used to generate that form validation. Oddly
enough, they do actually use xml to accomplish their task:

<cfmodule template="#request.tapi.xhtml()#">
        <tap:form action="blah" tap:dbtable="product">
                <input type="text" name="productname" />
                <input type="text" name="listprice" />
                <input type="textarea" name="productdescription" />
        </tap:form>
</cfmodule>

That's the short-short version (just the number of fields -- those are
actually complete input elements and that's a complete form), but the
tap:dbtable attribute at the top tells it to use the product table
from the primary/default database for my application. It then fetches
all the metadata from the database and determines the type, character
length and nullability of those fields and uses that information to
apply the framework's default form validation for required fields,
numeric, max-length, etc. If I wanted to manage the form validation
manually, I could omit the tap:dbtable attribute and just use
tap:required and tap:validate tags and attributes.



s. isaac dealey     954.522.6080
new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework

http://www.fusiontap.com
http://coldfusion.sys-con.com/author/4806Dealey.htm


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:217873
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

Reply via email to