> I just don't see how using XML internally in an app is
> extra work compared
> to using individual attributes or another structure
> format.  And I don't
> understand where there is any appreciable overhead.  Of
> course, my ignorance
> could very well be bliss!

> Advantages that I see:

>       1.  Data for a particular object is "bundled" nicely
> together in a way that is very readable

brief note: the following is not xml ... it's CF custom tags

<gui:jTab width="700" name="smcontract" height="500"
orientation="horizontal" onchange="changeTab">
        <gui:jTabNavigation>
                <gui:jTabItem name="x">x</gui:jTabItem>
                <gui:jTabItem name="y">y</gui:jTabItem>
                <gui jTabItem name="z">z</gui:jTabItem>
        </gui:jTabNavigation>
        <gui:jTabPane>...x content...</gui:jTabPane>
        <gui:jTabPane>...y content...</gui:jTabPane>
        <gui:jTabPane>...z content...</gui:jTabPane>
</gui:jTab>

True you can't perform an XML transformation on tags in-line in a cf
template, but you can't put <cfif> statements directly in an XML
template either (which is easier to code than an xml transromation),
and you could parse these tags and perform a transformation on them or
otherwise output this "xml" to a cf template to be executed. There are
pros and cons to either, I just thought I'd point out that the syntax
can often (although not always) be identical (re: very readable).

> 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?

> This way I can also maintain cart info across expired
> sessions without loading the client up with cookies
> or saving User data

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.

> 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.

Umm... neither do I ... I validate at the UI. Which is mostly
automated from my db meta-data, so I rarely futz with form
validation... I mean... I can, but I rarely need to. Even without
that, I'd probably still only validate at the UI.

> Question that I am working through is how
> to translate xmlValidate error responses to user
> friendly messages at the UI layer

I'd expect that to be tough.

> 4.  I can create an object once and easily include
> in other objects(e.g. Address in an Invoice).
> Of course I could also do this using includes...

I get the same thing from structures and arrays.

> 5.  I can create XML test files and quickly and
> easily run regression test on all code

Mmmm... okay... I never found that particularly time consuming...

> 6.  I am starting to like the way using xmlSpy
> to create schemas and xml helps me think through
> how I am organizing, validating and representing
> objects

I just write the xml out by hand... Not that xmlSpy is bad, but it's
not a big seller for me -- I find the interface actually gets in the
way more than it's an aid.

I use a fair amount of XML in my apps recently actually, but I don't
generally pass it around between components... I have a RuleManager
facade which provides an interface for end-users to manage their
business logic, which internally manages an xml packet and then store
that xml packet somewhere...

Maybe I'm just imagining from your description that you're using it in
a really different way than I am when you're really not... For some
reason I'd just envisioned tons of XML passing back and forth between
marginally related components, as opposed to say a facade which
manages its internal data as an XML packet for the sake of
extensibility.


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:217752
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