|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hi,
i would like to know if you are a lot to use PHP templates for your web application or web sites ? if yes, which one do you use (smarty, pear, yapter, phplib,...) ? and for which reason ? what is/are the advantages over the others ? thanks a lot, -- Alain ------------------------------------ Windows XP SP3 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008 |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On Sun, 2008-10-12 at 11:09 +0200, Alain Roger wrote:
> Hi, > > i would like to know if you are a lot to use PHP templates for your web > application or web sites ? > if yes, which one do you use (smarty, pear, yapter, phplib,...) ? > and for which reason ? what is/are the advantages over the others ? > > thanks a lot, > I wouldn't really call them templates, they're more libraries, and they all have their individual uses. Generally, your use of them will depend on what you actually want. Can you explain a few details of what you are actually looking to do? Ash www.ashleysheridan.co.uk |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
I'm just reading a book on PHP and they promote quite heavily smarty as
template designer tool for presenting information and data to users. they absolutly do not talk about pear and i'm a little surprised. That's why i'm wondering who use what and for which reason. Basically let's say for data/information presentation to end user...what is the best lib (pear, smarty....) ? On Sun, Oct 12, 2008 at 11:32 AM, Ashley Sheridan <ash@ashleysheridan.co.uk>wrote: > On Sun, 2008-10-12 at 11:09 +0200, Alain Roger wrote: > > Hi, > > > > i would like to know if you are a lot to use PHP templates for your web > > application or web sites ? > > if yes, which one do you use (smarty, pear, yapter, phplib,...) ? > > and for which reason ? what is/are the advantages over the others ? > > > > thanks a lot, > > > I wouldn't really call them templates, they're more libraries, and they > all have their individual uses. Generally, your use of them will depend > on what you actually want. > > Can you explain a few details of what you are actually looking to do? > > > Ash > www.ashleysheridan.co.uk > > -- Alain ------------------------------------ Windows XP SP3 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008 |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
On Sun, 2008-10-12 at 11:33 +0200, Alain Roger wrote:
> I'm just reading a book on PHP and they promote quite heavily smarty as > template designer tool for presenting information and data to users. > > they absolutly do not talk about pear and i'm a little surprised. That's why > i'm wondering who use what and for which reason. > > Basically let's say for data/information presentation to end user...what is > the best lib (pear, smarty....) ? > > On Sun, Oct 12, 2008 at 11:32 AM, Ashley Sheridan > <ash@ashleysheridan.co.uk>wrote: > > > On Sun, 2008-10-12 at 11:09 +0200, Alain Roger wrote: > > > Hi, > > > > > > i would like to know if you are a lot to use PHP templates for your web > > > application or web sites ? > > > if yes, which one do you use (smarty, pear, yapter, phplib,...) ? > > > and for which reason ? what is/are the advantages over the others ? > > > > > > thanks a lot, > > > > > I wouldn't really call them templates, they're more libraries, and they > > all have their individual uses. Generally, your use of them will depend > > on what you actually want. > > > > Can you explain a few details of what you are actually looking to do? > > > > > > Ash > > www.ashleysheridan.co.uk > > > > > > I'm not sure comparing Pear and Smarty is really how to go about it. It's a bit like comparing a apples and oranges. Smarty is indeed a template/presentation framework, but Pear is more a library of components (as is phplib) which offers some presentation components, but isn't solely designed towards that purpose. Personally, if I were you, I'd go with Smarty for the time being, as it has been designed as a template engine, so it should be easier to get to grips with. Ash www.ashleysheridan.co.uk |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
On Oct 12, 5:09am, raf.n...@gmail.com ("Alain Roger") wrote:
> Hi, > > i would like to know if you are a lot to use PHP templates for your web > application or web sites ? > if yes, which one do you use (smarty, pear, yapter, phplib,...) ? > and for which reason ? what is/are the advantages over the others ? > > thanks a lot, > > -- > Alain > ------------------------------------ > Windows XP SP3 > PostgreSQL 8.2.4 / MS SQL server 2005 > Apache 2.2.4 > PHP 5.2.4 > C# 2005-2008 I use Joomla as my Content Manager System (CMS) mainly because the template system they use makes it so easy to edit or, my choice, to create it from scratch. |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
cecilomar <cecilomar@gmail.com> wrote in news:4fe11969-c869-4f04-b269-
1b99abfbd12a@m32g2000hsf.googlegroups.com: > > I use Joomla as my Content Manager System (CMS) mainly because the > template system they use makes it so easy to edit or, my choice, to > create it from scratch. Joomla may be popular but is to complex for general use. Its also a cms not a template or template engine. Smarty is the very good template system. |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
Alain Roger wrote:
> Hi, > > i would like to know if you are a lot to use PHP templates for your web > application or web sites ? > if yes, which one do you use (smarty, pear, yapter, phplib,...) ? > and for which reason ? what is/are the advantages over the others ? > > thanks a lot, > I'd vote smarty or using xslt; smarty is very good and nine out of 10 designers I know prefer it. |
|
|
|
#8 |
|
Messages: n/a
Hébergeur: |
On Sun, 2008-10-12 at 11:09 +0200, Alain Roger wrote:
> Hi, > > i would like to know if you are a lot to use PHP templates for your web > application or web sites ? > if yes, which one do you use (smarty, pear, yapter, phplib,...) ? > and for which reason ? what is/are the advantages over the others ? I use TemplateJinn ![]() Unlike almost every other template engine out there it doesn't require the framework be instantiated at runtime. It can be used to generate static HTML files or it can be used in conjunction with InterJinn or other frameworks. For instance, I use TemplateJinn to organize and build my MediaWiki skins too. Usually when I create a template I pull out into separate file logically distinct layout elements. For example the header is in it's own template, any layout panes such as banner, left column, right column, footer, and content area are also in their own file. Then, I use a template that groups these together where I want them. Additionally, for often use elements I will create a custom tag so that I can just use a single tag to simpify and centralize rendering. An example being MediaWiki's concept of a portlet. For these I just do: <mw:portlet> My content goes here </mw:portlet> This generates the wrapping divs for the portlet that enables easy CSS customization and future proofs my design so that if ever I want more elements to the portlet design I can just change the custom tag code and recompile the skin. MediaWiki never has to know anything about InterJinn or TemplateJinn or that the skin it is using was create via a template engine. Interestingly there was a recent thread about frameworks and someone posted a blog where some guy did a benchmark using various frameworks. Well "Hello World" if done in InterJinn would probably be done as a static template compilation (one expects the developer to use the right framework tool), and thus would be on par with Apache's static content load (faster than PHP). In other words the benchmark is a load of crap since if you use a tool properly there are ways to make it perform while still having the convenience of a Framework. As such, TemplateJinn can be leveraged via InterJinn so that static content pages use the same layout as the entire site but for which the layout was generated at site compilation time and can be requested subsequently without invoking the PHP engine. My guess though, is that the guy would have implemented "Hello World" with InterJinn via a module instead of using the appropriate framework tool just so he could crap on frameworks some more ![]() The downside... for some anyways... of the TemplateJinn system, is that you need to be comfortable editing your HTML by hand. There's no WYSIWYG for custom tags. Personally, I prefer hand crafting my HTML layouts. I find the browser itself to be the best available WYSIWYG. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP |
|
|
|
#9 |
|
Messages: n/a
Hébergeur: |
On Sun, 2008-10-12 at 18:04 +0100, Nathan Rixham wrote:
> Alain Roger wrote: > > Hi, > > > > i would like to know if you are a lot to use PHP templates for your web > > application or web sites ? > > if yes, which one do you use (smarty, pear, yapter, phplib,...) ? > > and for which reason ? what is/are the advantages over the others ? > > > > thanks a lot, > > > > I'd vote smarty or using xslt; smarty is very good and nine out of 10 > designers I know prefer it. > XSLT is for transforming XML documents, so not good for use as a PHP template! Ash www.ashleysheridan.co.uk |
|
|
|
#10 |
|
Messages: n/a
Hébergeur: |
Ashley Sheridan wrote:
> On Sun, 2008-10-12 at 18:04 +0100, Nathan Rixham wrote: >> Alain Roger wrote: >>> Hi, >>> >>> i would like to know if you are a lot to use PHP templates for your web >>> application or web sites ? >>> if yes, which one do you use (smarty, pear, yapter, phplib,...) ? >>> and for which reason ? what is/are the advantages over the others ? >>> >>> thanks a lot, >>> >> I'd vote smarty or using xslt; smarty is very good and nine out of 10 >> designers I know prefer it. >> > XSLT is for transforming XML documents, so not good for use as a PHP > template! > > > Ash > www.ashleysheridan.co.uk > I guess it depends how you program, personally I like to program everything API style nowadays, dumping out my script output/objects as XML then transforming where needed with XSL; you can do it client side or server side using http://php.net/manual/en/book.xsl.php - it is a nice portable way of doing things (especially when having multiple front ends (or using the same system for multiple sites), however as a standard stick these variables into this bit of the (x)html then a conventional "template engine" is what you need. |
|
|
|
#11 |
|
Messages: n/a
Hébergeur: |
The problem with smarty is that they are still using PHP4 as their main
language so they cannot take advantage of speed improvements in PHP5. So, my suggestion is that if you're stuck with PHP4, go with smarty, otherwise, find another engine that's up to date. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Nathan Rixham wrote: > Alain Roger wrote: >> Hi, >> >> i would like to know if you are a lot to use PHP templates for your web >> application or web sites ? >> if yes, which one do you use (smarty, pear, yapter, phplib,...) ? >> and for which reason ? what is/are the advantages over the others ? >> >> thanks a lot, >> > > I'd vote smarty or using xslt; smarty is very good and nine out of 10 > designers I know prefer it. > |
|
|
|
#12 |
|
Messages: n/a
Hébergeur: |
On Sun, 2008-10-12 at 13:17 -0500, Micah Gersten wrote:
> The problem with smarty is that they are still using PHP4 as their main > language so they cannot take advantage of speed improvements in PHP5. > So, my suggestion is that if you're stuck with PHP4, go with smarty, > otherwise, find another engine that's up to date. > > Thank you, > Micah Gersten > onShore Networks > Internal Developer > http://www.onshore.com > > > > Nathan Rixham wrote: > > Alain Roger wrote: > >> Hi, > >> > >> i would like to know if you are a lot to use PHP templates for your web > >> application or web sites ? > >> if yes, which one do you use (smarty, pear, yapter, phplib,...) ? > >> and for which reason ? what is/are the advantages over the others ? > >> > >> thanks a lot, > >> > > > > I'd vote smarty or using xslt; smarty is very good and nine out of 10 > > designers I know prefer it. > > > That's a fair point. I've never really gone into the whole template thing myself, as I generally develop systems from scratch with a library of components I've built up over time. Ash www.ashleysheridan.co.uk |
|
![]() |
| Outils de la discussion | |
|
|