> If I needed multiple formats, I'd probably make a single CFC that has
> three methods, one to pull the raw menu query (probably delegatin gto
> a dedicated DAO), one to pull the menu as a structure, and one to pull
> the menu as XML.  That's really a single job, so it makes sense to
> have it all in one CFC.  then you controller can call whichever method
> it wants, to get the data in the format it needs.
>
> Your model provides data to the controller.  Since XML is data (just a
> different format), i don't think it really belongs in the controller.
> THe controller's job is managing application flow, and is usually tied
> tightly to the UI.  I wouldn't recommend mixing the DB code and the
> XML formatting code necessarily, but I'd say returning the data in XML
> format is part of the model's job (though at the "top" end of the
> functionality spectrum).

Okay, so the idea is that XML isn't considered "formatted data" it's just
considered "data". I can see that.

I always viewed it as "formatted" if something else needs to be done with it
after the query results are returned. So if the returned results weren't in
a format that you "needed"...it had to be passed on to another "controller"
to perform that formatting...But then again, Something like SQLServer could
just return the results *AS* XML, couldn't it? So you could theoretically be
querying AND returning the results as XML all in one handy query wrapped in
a CFC...right?

I'm sorry to jump into this thread, it's just that I'm neck deep in reading
about methodologies and I'm trying to tie what I'm reading with real world
examples to make sure I understand the whole, "MVC" thing completely.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to