Robert Cummings wrote:

On Fri, 2003-10-03 at 11:30, Raditha Dissanayake wrote:

Hi,

Please give it a shot, it's real easy. far easier than any of the lame php template systems i have seen. The beauty is that the same XML/XSL combo can be used with PHP, perl, JSP/Servlets, C++, VC++,VB,C,C# and the list goes on and on.

Disclaimer: I have never written a single line of VB ,VC++ or C# code and don't intend to do so in the future.


I have used XSLT before and can't say I particularly liked it. I have my
own "lame" (as you put it ;) php templating system which I prefer much
more. Mind you, in all honesty, XSLT support can be plugged into my
templating engine if I wanted without any adaptation to the engine
itself.

Bloody hell Rob, you've started me on another rant when I could be in bed ;)

XSLT is a pain in the butt if you want to master it - particularly if you're going from imperative programming to declarative (maybe XPath is functional, but declaring templates is definately declarative) as many PHP developers would be. It took me a good twelve months to "get it" (eg. use XPath filters and not <xsl:if/>). That didn't stop me from churning out some production applications using XSLT. You can learn the basics without mastering it and still find it plenty useful. I would argue that my XSLT skills still leave a lot to be desired, but mastery of it is still worthwhile persuing. Quite simply, XSLT has a lot of depth.

I also develop in Java and C# where I can re-use all my "template" knowledge since this knowledge is based on a standard. I plan on having a play with building web apps in C++ and Python if I get the chance (by porting the XAO concept). For the time being, it happens that I am more skilled with PHP so I will develop the XAO architecture and concept in PHP.

It's pointless splitting hairs over the capabilities/advantages of one templating language over another. If the idea of cross-technology compatability doesn't appeal to you enough to put the effort in to master XSLT, then don't master it. Everyone has their own style. XAO is for object oriented developers of XML-centric applications. I imagine it won't be everyone's cup of tea even for such a group.

<<warning: very personal opinion to follow...>>
If you *do* finally decide to master XSLT, you have to conclude that *any* other templating system is a complete/utter waste of time. (all authors of ``yet another PHP templating system'', please try not to be offended). I'm not talking about features/functionality either (for which XSLT is more than adequate), I'm talking about sheer bothersomeness. ie. I'm fundamentally lazy and I couldn't be bothered learning "snazzy g.o.a.t. [proprietary] templaty goodness system" -- "crappy" or otherwise -- I don't care how fantastic it is. The reason why the PHP template has been re-invented so many times, is becuase there is something missing - IMHO, XSLT fits that gap more than "good enough". And since it is a standard, it will only get better -- it has a future. And that, my friends, it good enough for me (being that I am lazy and all).


As it happens, XAO supports custom tags, but a savvy user will realise that using custom tags to expand into display logic is just downright stupid - it missing the point. Still, the facility is there to allow expansion of business logic. It seems to have CMS potential - I may be using it in the future "form controls" feature -- or I may decide it's crap and ignore it alltoegether :D The savvy user will always process the business payload with XSLT - hence maintaining pure separation of display logic.

<<note-to-self: stop ranting and go to bed...>>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to