Content management and Custom [tags]

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

Currently i have a little website that outputs xhtml and wml. But the templates get their data from a Smarty object instead of an xml file.

As i said before, it all depends in your needs. If you want absolute portability one could also argue to pass the data between the webserver (controller) and the script (model) wrapped in xml.
McGruff
DevNet Master
Posts: 2893
Joined: Thu Jan 30, 2003 8:26 pm
Location: Glasgow, Scotland

Post by McGruff »

timvw wrote:If you want absolute portability one could also argue to pass the data between the webserver (controller) and the script (model) wrapped in xml.
Apart from the question of how well MVC can be applied to dynamic websites, what is the advantage of passing data to the model in xml? Wouldn't that be better off encapsulated in some kind of ModelData object?
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Post by Gen-ik »

I agree.

I'm not saying that XML is a waste of time because it's not, and when it's used in the right places and in the right way then it's a very powerful tool. All I'm saying is that a lot of people use it because they can, and not because they need to :)
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

McGruff wrote:
timvw wrote:If you want absolute portability one could also argue to pass the data between the webserver (controller) and the script (model) wrapped in xml.
Apart from the question of how well MVC can be applied to dynamic websites, what is the advantage of passing data to the model in xml? Wouldn't that be better off encapsulated in some kind of ModelData object?
That's why i've repeatedly said: it all depends on your needs.

At a given point you decide: i use 'cgi' to pass data between webserver and script. Just as you decide i use 'foo' to pass data between script and template.
Post Reply