Re: [PHP] Re: XML+XSLT or Smarty again??

2003-03-31 Thread SLanger
Hello

Ok can't refrain from giving my opinion to this one. 

First of all I think separating presentation from business logic can be 
achived fairly simple with SMARTY and if your template code acutally 
contains business logic than you have not understood the concept of the 
template engine. The only logic that should be included in the template is 
the presentation logic. This is clearly stated in the docs and on the 
website.  Removing logic from presentation is not possible in my opinion. 
Basically you always have to have someway of specifiing if something is to 
be shown or not. SO you basically just remove a complex programming 
structure and replace it with a somewhat less complex custom template 
declaration such as if else constructs etc... 
Also Smarty allows you to build custom tags to include logic into template 
without programming making it fairly easy to include businesslogic without 
introducing code.

About XSLT as a templating mechanism. I just think it's more complicated 
and until every browser supports XSLT on the client side I don't see how 
it improves performance over a custom performance optimized templateengine 
such as SMARTY. Not to forget that the logic in an XsLT Stylesheet seems 
as complicated if not more complicated than building customized php code. 
But then again this is just my opinion.

About Templatetamer, didn't have too much time to look at it but I don't 
like the fact, at least that is the impression I got from your website, 
that I have to use your tool to create templates. I have my own set of 
tools and I'd like to stick with them. So editing templates should be as 
easy as opening your favourite editor.

So there is no real pro or con. Every situation has their advantage but 
IMHO if you are using XSLT just for separation purposes it is an overkill 
and makes things to complicated. If you need to transfer constructs into 
other languages such as perl etc... then thats a whole different 
situation...

Regards
Stefan





RE: [PHP] Re: XML+XSLT or Smarty again??

2003-03-31 Thread Dan Rossi
wow thanks ! i've been looking for some example like this for a very long
time , does it mean that the templates becomes similar to the template block
?

-Original Message-
From: Pete James [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 2:08 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: XML+XSLT or Smarty again??


This xml+html+xslt paradigm provides great separation, especially when
viewed in light of the traditional xslt=html+code method.  I've used it
with good success.

http://www.xml.com/pub/a/2000/07/26/xslt/xsltstyle.html

HTH.
Pete.

--

http://www.shaman.ca/pusher

A news aggregator with email notification.


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


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



Re: [PHP] Re: XML+XSLT or Smarty again??

2003-03-31 Thread Pete James
IMO, Smarty is just an abstraction of PHP.  Smarty templates are HTML 
templates, but they still contain their own application logic for 
looping, etc, and so are still not a real separation (or are *dirty*, as 
'rush' calls it).

XML+HTML+XSLT (or Template Tamer from what I can gather) take it the 
extra step.  The application logic in PHP generates an XML data stream, 
which contains no dependencies on output.  It is simply data.  The XSLT 
parser parses the HTML template (which contains _only_ HTML and 
placeholders), and when it encounters a placeholder it executes the 
relevant XSLT code.  This way, the design department can design the HTML 
fully, without having to learn PHP, Smarty, or any other syntax.  They 
just put in placeholder tags wherever information from the XML file is 
needed.

There are drawbacks to every abstraction, and templating is no 
different.  Smarty templates are fast, and are enjoyed by a large user 
base for their relative simplicity.  XML, XSLT, etc are complex and 
verbose, but provide for maximum abstraction.  Template Tamer sounds 
like it combines the best from both (from what I've heard here).

It is a matter of taste, I suppose.  I think that people may sometimes 
waste more time trying to maximize the division between presentation and 
logic than it's worth.  Well written PHP scripts can be almost as good a 
template as any (by separating the HTML and just using embedded variables).

HTH,
Pete.
--

http://www.shaman.ca/pusher
A news aggregator with email notification.

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


Re: [PHP] Re: XML+XSLT or Smarty again??

2003-03-31 Thread Hardik Doshi
Hi,

>From my point of view, XML+XSLT increases complexity
with very less number of advantages. 

Fundamental of using XML+XSLT with PHP is to seperate
HTML code from the PHP and database code. But in the
following article, it shows XSL stylesheet comes with
full of logic. Do we really need this approach?? At
this time i think smarty is separating the
presentation from logic in the best manner.

Please correct me if i am wrong.

THanks

Hardik  


--- rush <[EMAIL PROTECTED]> wrote:
> "Pete James" <[EMAIL PROTECTED]> wrote in
> message
> news:[EMAIL PROTECTED]
> > This xml+html+xslt paradigm provides great
> separation, especially when
> > viewed in light of the traditional xslt=html+code
> method.  I've used it
> > with good success.
> 


__
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

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



Re: [PHP] Re: XML+XSLT or Smarty again??

2003-03-31 Thread rush
"Pete James" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> This xml+html+xslt paradigm provides great separation, especially when
> viewed in light of the traditional xslt=html+code method.  I've used it
> with good success.

This does relieve the problem of dirty templates, but with some costs in
inreased complexity. With TT you would have less things to do to achieve
similar, but I assume that in the end it is largely a matter of taste and/or
preferences.

Sincerely,

rush
--
http://www.templatetamer.com/




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



Re: [PHP] Re: XML+XSLT or Smarty again??

2003-03-31 Thread rush
"Pete James" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> This xml+html+xslt paradigm provides great separation, especially when
> viewed in light of the traditional xslt=html+code method.  I've used it
> with good success.

This does relieve the problem of dirty templates, but with some costs in
inreased complexity. With TT you would have less things to do to achieve
similar, but I assume that in the end it is largely a matter of taste and/or
preferences.

Sincerely,

rush
--
http://www.templatetamer.com/




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



Re: [PHP] Re: XML+XSLT or Smarty again??

2003-03-31 Thread Pete James
This xml+html+xslt paradigm provides great separation, especially when 
viewed in light of the traditional xslt=html+code method.  I've used it 
with good success.

http://www.xml.com/pub/a/2000/07/26/xslt/xsltstyle.html

HTH.
Pete.
--

http://www.shaman.ca/pusher
A news aggregator with email notification.

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