Re: [PHP] Template system in PHP
REST is the new SOAP. Yaml is the new XML. I'm guessing this news just hasn't made it into any PHP frameworks yet. that's a very oversimplifying statement. REST is good for small requests and stuff but there are cases when SOAP is needed (at least in cases when you have to connect to some external app with SOAP interface) YAML is good for configuration files and stuff like that, but in no way is replacement for XML, which is much more flexible and has the DOM API which is very powerful. and by the way, symfony has YAML configuration files and a plugin for REST services. greets Zoltán Németh -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template system in PHP
On Thu, 2008-02-14 at 09:29 +0100, Zoltán Németh wrote: and by the way, symfony has YAML configuration files and a plugin for REST services. and Chisimba does YAML configs in the blog module, REST, SOAP and XML-RPC services as well as a whole whack of XML-ish things. --Paul -- . | Chisimba PHP5 Framework - http://avoir.uwc.ac.za | :: All Email originating from UWC is covered by disclaimer http://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template system in PHP
Hello, I vote for Typo3 template system. If you work bunch of HTML only designers this one best. If you have some php avare designers, you should go with php based + memcached template systems. Second option was much faster anything else. Just store the template into memcached and do some str_replace. Regards Sancar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template system in PHP
About designers who don't know PHP. There are two kinds 1). They draw only. They usualy don't know even HTML - they just draw. 2). They know HTML and make templates. usualy these people have to know HTML and CSS very well. And I can't imagine how they can do that without knowing at least Smarty tags (if they work with it). My idea is basicly that for them there is no difference if there if ?=$variable? or {$variable} They just have to know that such constructions displays some data. So I and my colegaues stick to HTML with PHP injections in templates (i worked with smarty once's, have to say comparing to PHP it was realy a mess. And at least with PHP I have code highlight).
Re: [PHP] Template system in PHP
... You won't find many solutions (if any) faster than require(). If all you have currently is developers you don't really have reason to use a custom templating language to slow things down. Even when you do get designers, they should: 1. Not have the final say before systems go live 2. Not be brain dead enough not to understand this: ?if($foo):? ... ?endif? Or for simple variable this: ?=$name? 3. If your front-end people can't understand that (and you can of course expect training to be necessary or some sort of cheat sheet that can be referred to), then they quite honestly aren't worth employing. (the alternative syntax for PHP conditionals and loops, along with short tags) And there should of course be some sort of test site on the same box as your live site allowing you to thoroughly test your new stuff before it goes live. -- Richard Heyes http://www.websupportsolutions.co.uk Knowledge Base and Helpdesk software for £299 hosted for you - no installation, no maintenance, new features automatic and free ** New Helpdesk demo now available ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template system in PHP
As an aside, you can save lines when debugging by doing: echo 'pre' . print_r( $var, TRUE ) . '/pre'; OMG, thanks for that. Lines are so expensive nowadays and all. Sarcasm aside, when I'm debugging I like to be as concise as possible. thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template system in PHP
when I'm debugging I like to be as concise as possible. Concise? Really? -- Richard Heyes http://www.websupportsolutions.co.uk Knowledge Base and Helpdesk software for £299 hosted for you - no installation, no maintenance, new features automatic and free ** New Helpdesk demo now available ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template system in PHP
On Wed, 2008-02-13 at 11:26 +, Richard Heyes wrote: ... You won't find many solutions (if any) faster than require(). Mine is faster. Compiling to the requested page removes cache overhead and file access overhead since the content is already pulled in. Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template system in PHP
when I'm debugging I like to be as concise as possible. Concise? Really? Fair enough. Perhaps I should have said concise with my code, verbose with my actual messages. :p thnx, Chris Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Template system in PHP
Lol... If IE7 goes hun what? I wonder what would happen in lt IE7 :) GO FIREFOX!!! Xavier -Original Message- From: Nathan Rixham [mailto:[EMAIL PROTECTED] Sent: mercredi 13 février 2008 01:27 To: php-general@lists.php.net Subject: Re: [PHP] Template system in PHP *sigh* as always, firefox obeys, ie7 goes huh what? Nathan Rixham wrote: Are you creating custom DTD's or 1.1 XHTML Mods then? I'd like to see that, it's something I'd toyed with a few times in the past but found it far too time consuming (even for me), and opted for the ol' redefine everything in CSS *lightbulb* :: runs off to try css on custom tags why have i never tried that before :: ponders accessibility.. :: wanders off to waste time researching anyways Robert Cummings wrote: On Tue, 2008-02-12 at 15:02 -0600, Greg Donald wrote: On Feb 12, 2008 2:57 PM, Robert Cummings [EMAIL PROTECTED] wrote: I prefer content formatting encapsulation as provided by custom tags. Decorators? Custom tags (XML style ones anyways) provide support for arbitrary ordering and omission of optional attributes. They nest nicer than function calls, and they have the same general formatting as the HTML with which you are working. Additionally, they provide the opportunity to punt anything not necessary at run-time to pre-compiled HTML. Cheers, Rob. -- 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] Template system in PHP
Xavier de Lapeyre wrote: Lol... If IE7 goes hun what? I wonder what would happen in lt IE7 :) GO FIREFOX!!! Xavier -Original Message- From: Nathan Rixham [mailto:[EMAIL PROTECTED] Sent: mercredi 13 février 2008 01:27 To: php-general@lists.php.net Subject: Re: [PHP] Template system in PHP *sigh* as always, firefox obeys, ie7 goes huh what? Nathan Rixham wrote: Are you creating custom DTD's or 1.1 XHTML Mods then? I'd like to see that, it's something I'd toyed with a few times in the past but found it far too time consuming (even for me), and opted for the ol' redefine everything in CSS *lightbulb* :: runs off to try css on custom tags why have i never tried that before :: ponders accessibility.. :: wanders off to waste time researching anyways Robert Cummings wrote: On Tue, 2008-02-12 at 15:02 -0600, Greg Donald wrote: On Feb 12, 2008 2:57 PM, Robert Cummings [EMAIL PROTECTED] wrote: I prefer content formatting encapsulation as provided by custom tags. Decorators? Custom tags (XML style ones anyways) provide support for arbitrary ordering and omission of optional attributes. They nest nicer than function calls, and they have the same general formatting as the HTML with which you are working. Additionally, they provide the opportunity to punt anything not necessary at run-time to pre-compiled HTML. Cheers, Rob. Ummm... It's 11:30PM my time and I'm half drunk. I can only assume the same of you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Template system in PHP
Sounds interesting... Are your XML predefined or generated on the run? From say a DB? Xavier Please consider the environment before printing this mail note. -Original Message- From: Nathan Rixham [mailto:[EMAIL PROTECTED] Sent: mercredi 13 février 2008 01:20 To: php-general@lists.php.net Subject: Re: [PHP] Template system in PHP Are you creating custom DTD's or 1.1 XHTML Mods then? I'd like to see that, it's something I'd toyed with a few times in the past but found it far too time consuming (even for me), and opted for the ol' redefine everything in CSS *lightbulb* :: runs off to try css on custom tags why have i never tried that before :: ponders accessibility.. :: wanders off to waste time researching anyways Robert Cummings wrote: On Tue, 2008-02-12 at 15:02 -0600, Greg Donald wrote: On Feb 12, 2008 2:57 PM, Robert Cummings [EMAIL PROTECTED] wrote: I prefer content formatting encapsulation as provided by custom tags. Decorators? Custom tags (XML style ones anyways) provide support for arbitrary ordering and omission of optional attributes. They nest nicer than function calls, and they have the same general formatting as the HTML with which you are working. Additionally, they provide the opportunity to punt anything not necessary at run-time to pre-compiled HTML. Cheers, Rob. -- 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] Template system in PHP
On Thu, 2008-02-14 at 08:58 +0400, Xavier de Lapeyre wrote: Sounds interesting... Are your XML predefined or generated on the run? From say a DB? From a compiler script that extends a base tag class... all it needs to do is register the tag namespace, tag name, and the function that will handle the tag's content. Here's a very simple case: ?php class ExampleSiteCompilersExampleSiteTag extends JinnBaseTagCompiler { var $filename = __FILE__; function ___jinnConstruct() { $this-handlers = array ( 'example' = array ( 'mandatory' = 'expandTagMandatory', ), ); } function expandTagMandatory ( $content, $space, $tag, $atts, $tagStack ) { return 'span class=mandatory*/span'; } } ? Then when doing forms I can do the following: example:mandatory/ And that will be expanded to: span class=mandatory*/span Then later down the road if I wanted the mandatory symbol to change to an image, I could change the content expanded in the handler, rebuild the site and all uses of the mandatory tag would be updated and would incur no run-time overhead. This is obviously a trivial example. There is much more that can be done. For instance creating boxes, popups, relocating content, checking links, image analysis to get the width and height of image at compile time instead of run-time, etc. Encapsulating the data into a tag allows greatly simplifying content. Also the tag system allows recursive expansion. So a tag handler can output custom tags and those in turn will be expanded. Hell, I could even create a validation tag around the primary layout template that would then validate the content at build time. Anyways, there ARE better template systems than PHP itself. Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Template system in PHP
Wow, Thnks... Seems that are lots of routes to it. Xavier de Lapeyre Web Developer Enterprise Data Services www.eds.mu Please consider the environment before printing this mail note. -Original Message- From: Robert Cummings [mailto:[EMAIL PROTECTED] Sent: mercredi 13 février 2008 00:57 To: Shawn McKenzie Cc: php-general@lists.php.net Subject: Re: [PHP] Template system in PHP On Tue, 2008-02-12 at 14:22 -0600, Shawn McKenzie wrote: Ryan A wrote: Add my vote too for Smarty HTH, -R Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping I like smarty and it's very powerful, however what you find is that it's just a less capable replacement for PHP. If I want conditional statements to display HTML and/or loop through arrays, why would I want to do it in smarty tags? Instead of moving display away from logic, it just replaces the logic with a different language. When I use templates I pretty much want variable substitution. My next project I'll probably use HTML files with little bits of PHP echos etc... sprinkled throughout. I prefer content formatting encapsulation as provided by custom tags. Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- 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] Template system in PHP
Hi, I suggest you to use a framework. Lots of them implements template system and more. You'll don't have to reinvent the wheel. My favorit is Copix http://www.copix.org/ Email me if you need help. Brice On Feb 12, 2008 11:01 AM, Xavier de Lapeyre [EMAIL PROTECTED] wrote: Hi, I need to develop a website, but my management is rather unstable in his vision for the layout. I'm thinking of developing the components as classes and functions, and then use a template system to render the layout. If the management wishes to change the layout, I'll just have to modify my template and the jobs' done. Do any of you guys gurls know of a way to implement that template system. (The best one I know of is that of Wordpress) Regards, Xavier de Lapeyre Web Developer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template system in PHP
Xavier de Lapeyre wrote: Do any of you guys gurls know of a way to implement that template system. Smarty ? (The best one I know of is that of Wordpress) Regards, Xavier de Lapeyre Web Developer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template system in PHP
eval() is my favorite templating engine. http://php.net/eval Ditto on Eval() PHP is already a templating system. Why go the long way around? eval()? Man, you guys have some seriously large cajones. :p thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template system in PHP
Because its painful and fun at the same time :) Aleksandar Quoting Nate Tallman [EMAIL PROTECTED]: Ditto on Eval() PHP is already a templating system. Why go the long way around? On Feb 12, 2008 10:13 AM, Greg Donald [EMAIL PROTECTED] wrote: On 2/12/08, Xavier de Lapeyre [EMAIL PROTECTED] wrote: Do any of you guys gurls know of a way to implement that template system. eval() is my favorite templating engine. http://php.net/eval -- Greg Donald http://destiney.com/ -- 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] Template system in PHP
On Tue, 2008-02-12 at 14:22 -0600, Shawn McKenzie wrote: Ryan A wrote: Add my vote too for Smarty HTH, -R Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping I like smarty and it's very powerful, however what you find is that it's just a less capable replacement for PHP. If I want conditional statements to display HTML and/or loop through arrays, why would I want to do it in smarty tags? Instead of moving display away from logic, it just replaces the logic with a different language. When I use templates I pretty much want variable substitution. My next project I'll probably use HTML files with little bits of PHP echos etc... sprinkled throughout. I prefer content formatting encapsulation as provided by custom tags. Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template system in PHP
*sigh* as always, firefox obeys, ie7 goes huh what? Nathan Rixham wrote: Are you creating custom DTD's or 1.1 XHTML Mods then? I'd like to see that, it's something I'd toyed with a few times in the past but found it far too time consuming (even for me), and opted for the ol' redefine everything in CSS *lightbulb* :: runs off to try css on custom tags why have i never tried that before :: ponders accessibility.. :: wanders off to waste time researching anyways Robert Cummings wrote: On Tue, 2008-02-12 at 15:02 -0600, Greg Donald wrote: On Feb 12, 2008 2:57 PM, Robert Cummings [EMAIL PROTECTED] wrote: I prefer content formatting encapsulation as provided by custom tags. Decorators? Custom tags (XML style ones anyways) provide support for arbitrary ordering and omission of optional attributes. They nest nicer than function calls, and they have the same general formatting as the HTML with which you are working. Additionally, they provide the opportunity to punt anything not necessary at run-time to pre-compiled HTML. Cheers, Rob. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template system in PHP
Are you creating custom DTD's or 1.1 XHTML Mods then? I'd like to see that, it's something I'd toyed with a few times in the past but found it far too time consuming (even for me), and opted for the ol' redefine everything in CSS *lightbulb* :: runs off to try css on custom tags why have i never tried that before :: ponders accessibility.. :: wanders off to waste time researching anyways Robert Cummings wrote: On Tue, 2008-02-12 at 15:02 -0600, Greg Donald wrote: On Feb 12, 2008 2:57 PM, Robert Cummings [EMAIL PROTECTED] wrote: I prefer content formatting encapsulation as provided by custom tags. Decorators? Custom tags (XML style ones anyways) provide support for arbitrary ordering and omission of optional attributes. They nest nicer than function calls, and they have the same general formatting as the HTML with which you are working. Additionally, they provide the opportunity to punt anything not necessary at run-time to pre-compiled HTML. Cheers, Rob. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template system in PHP
On Feb 12, 2008 3:15 PM, Robert Cummings [EMAIL PROTECTED] wrote: Custom tags (XML style ones anyways) provide support for arbitrary ordering and omission of optional attributes. They nest nicer than function calls, and they have the same general formatting as the HTML with which you are working. Additionally, they provide the opportunity to punt anything not necessary at run-time to pre-compiled HTML. Your solution to templating is XML? -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template system in PHP
On Tue, 2008-02-12 at 15:02 -0600, Greg Donald wrote: On Feb 12, 2008 2:57 PM, Robert Cummings [EMAIL PROTECTED] wrote: I prefer content formatting encapsulation as provided by custom tags. Decorators? Custom tags (XML style ones anyways) provide support for arbitrary ordering and omission of optional attributes. They nest nicer than function calls, and they have the same general formatting as the HTML with which you are working. Additionally, they provide the opportunity to punt anything not necessary at run-time to pre-compiled HTML. Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template system in PHP
REST is the new SOAP. Yaml is the new XML. I'm guessing this news just hasn't made it into any PHP frameworks yet. REST is fine for small communications but really isn't a very good solution for large and complex communication. SOAP is the 600 pound gorilla. Usually I use XML-RPC because it's sort of the middle ground. I usually use REST mostly for simple services that just need a simple trigger and response - often stuff I want to run from cron jobs. I save SOAP for the rare job that REST or XML-RPC can't do although in those cases I usually stop to consider if I'm making the problem more complex than it needs to be. YAML doesn't seem significantly easier (faster less intensive) to parse than XML, it doesn't seem as flexible as XML, and it's less familiar for developers to work with so I don't really see the benefit. It seems to exist entirely because some people didn't like the way XML looked. It might be slightly smaller than XML but that's hardly an issue since you can always compress your data. YAML fits in the same boat as people pushing binary XML. It doesn't really make a lot of sense. It's almost always cheaper to throw more CPU time at a problem than man hours and YAML is less obvious to work with than XML so it doesn't make business sense. If you really want something fast and non-intensive to parse then use tab-separated values or something similar. -- Michael McGlothlin Southwest Plumbing Supply smime.p7s Description: S/MIME Cryptographic Signature
Re: [PHP] Template system in PHP
On Feb 12, 2008 6:27 PM, Greg Donald [EMAIL PROTECTED] wrote: On Feb 12, 2008 4:23 PM, Nathan Nobbe [EMAIL PROTECTED] wrote: well thats what xslt is, which is pretty nice. /\ is a statement, not a question ;) Wow dude, you're a rock. I meant my question was rhetorical, not your statement about my question. well, my bad then; im just not clever like that i guess :D /me point Nathan to http://en.wikipedia.org/wiki/Rhetorical_question XSLT sucks, complete overkill. the best part about xslt is its a standard, not some new contrivance from Creation does not prove usefulness. some other corner of the galaxy like smarty. Well I certainly agree with that. Smarty is like the fat cousin you hope doesn't show up to the 4th of July cookout. But there's always some n00b developer who brings it up.. next thing you know the project manager thinks it's a good idea because his designers will love to use it (rofl) and then you're screwed. haha; i took a look at it when i was doing my initial research for a templating solution roughly a year ago, but settled on xsl at that time. i had done some previous research on xsl before then and it made sense. since then i think its still pretty solid, but im working on my own little template library where hopefully i wont have to deal with escaping in and out of php, eg ?php ? more template ?php ? the main issue ive run into with it is my templates will be so small it just will be too much overhead to splice them all together on a given page load. furthermore i dont think it overkill at all. so lets see, what are you rendering, o, a subset of xml, xhmtl. so its actually quite concise. beyond that its well suited to target the output from an application to other potential clients such as programmatic ones eg. web service clients or mobile devices. REST is the new SOAP. Yaml is the new XML. I'm guessing this news just hasn't made it into any PHP frameworks yet. rest has its advantages, but it is by far a complete replacement for soap. as per yaml, i dont know that i ever heard of it until you mentioned it on the ruby thread. but that doctrine framework does apparently use it. and if yaml does take off, ill be sure to tell everyone i discuss it w/ that greg donald from php-general was on the yaml tip back in the day ;) -nathan
Re: [PHP] Template system in PHP
Michael McGlothlin wrote: REST is the new SOAP. Yaml is the new XML. I'm guessing this news just hasn't made it into any PHP frameworks yet. REST is fine for small communications but really isn't a very good solution for large and complex communication. SOAP is the 600 pound gorilla. Usually I use XML-RPC because it's sort of the middle ground. I usually use REST mostly for simple services that just need a simple trigger and response - often stuff I want to run from cron jobs. I save SOAP for the rare job that REST or XML-RPC can't do although in those cases I usually stop to consider if I'm making the problem more complex than it needs to be. YAML doesn't seem significantly easier (faster less intensive) to parse than XML, it doesn't seem as flexible as XML, and it's less familiar for developers to work with so I don't really see the benefit. It seems to exist entirely because some people didn't like the way XML looked. It might be slightly smaller than XML but that's hardly an issue since you can always compress your data. YAML fits in the same boat as people pushing binary XML. It doesn't really make a lot of sense. It's almost always cheaper to throw more CPU time at a problem than man hours and YAML is less obvious to work with than XML so it doesn't make business sense. If you really want something fast and non-intensive to parse then use tab-separated values or something similar. -- Michael McGlothlin Southwest Plumbing Supply *wades in* XML is by far superior to anything else out there for one reason and one reason only; the DOM API. Concider a node or an element compared to an array or a typical variable, no contest in terms of functionality at all; attributes alone win it hands down, without taking into account parent/child nodes, namespaces, nodeNames nodeTypes, pervious, next.. not to mention the associated methods for inserting, appending, searching by tagname namespace. More than this, DOM functionality is available both server and client side, with exactly the same value names and function names. XML is the perfect transport for DOM objects between servers, programs and clients; it's already widespread and not used properly nearly enough. The only drawback I can find is the lack of storage support, unless somebody out there knows a way to full text a specific node type in 10k xml documents as wuick as you could query a column on 10k db rows? *ducks out* -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template system in PHP
Nathan Nobbe wrote: On Feb 12, 2008 7:42 PM, Michael McGlothlin [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: REST is the new SOAP. Yaml is the new XML. I'm guessing this news just hasn't made it into any PHP frameworks yet. YAML doesn't seem significantly easier (faster less intensive) to parse than XML, it doesn't seem as flexible as XML, and it's less familiar for developers to work with so I don't really see the benefit. It seems to exist entirely because some people didn't like the way XML looked. It might be slightly smaller than XML but that's hardly an issue since you can always compress your data. YAML fits in the same boat as people pushing binary XML. It doesn't really make a lot of sense. It's almost always cheaper to throw more CPU time at a problem than man hours and YAML is less obvious to work with than XML so it doesn't make business sense. If you really want something fast and non-intensive to parse then use tab-separated values or something similar. damn dude, i couldnt have put it better myself if i tried. i whole-heartedly agree. this is one situation where i feel throwing some hardware at it is totally appropriate. the only place you wont escape is the cost on the network, but you could always get more bandwidth too, right ? :) Compression is a good choice for abusing your CPU more to free up network resources. So network resources shouldn't be much of an issue. btw. if there are schemas or dtds out there for what im working on, i will always run my xml against them and that makes it pretty damn easy to track down problems. and if there isnt a dtd or schema file, its usually some syntax i whipped up for a little project. and yes, i know yaml has support for validation.. Validation is handy although my experience is that often vendors don't bother making sure their stuff validates against their own schemas. Sort off annoying if you have no choice but to work with them. Usually the same vendors have crappy documentation too. -- Michael McGlothlin Southwest Plumbing Supply smime.p7s Description: S/MIME Cryptographic Signature
Re: [PHP] Template system in PHP
On Feb 12, 2008 7:42 PM, Michael McGlothlin [EMAIL PROTECTED] wrote: REST is the new SOAP. Yaml is the new XML. I'm guessing this news just hasn't made it into any PHP frameworks yet. YAML doesn't seem significantly easier (faster less intensive) to parse than XML, it doesn't seem as flexible as XML, and it's less familiar for developers to work with so I don't really see the benefit. It seems to exist entirely because some people didn't like the way XML looked. It might be slightly smaller than XML but that's hardly an issue since you can always compress your data. YAML fits in the same boat as people pushing binary XML. It doesn't really make a lot of sense. It's almost always cheaper to throw more CPU time at a problem than man hours and YAML is less obvious to work with than XML so it doesn't make business sense. If you really want something fast and non-intensive to parse then use tab-separated values or something similar. damn dude, i couldnt have put it better myself if i tried. i whole-heartedly agree. this is one situation where i feel throwing some hardware at it is totally appropriate. the only place you wont escape is the cost on the network, but you could always get more bandwidth too, right ? :) btw. if there are schemas or dtds out there for what im working on, i will always run my xml against them and that makes it pretty damn easy to track down problems. and if there isnt a dtd or schema file, its usually some syntax i whipped up for a little project. and yes, i know yaml has support for validation.. -nathan
Re: [PHP] Template system in PHP
On Feb 12, 2008 4:23 PM, Nathan Nobbe [EMAIL PROTECTED] wrote: well thats what xslt is, which is pretty nice. /\ is a statement, not a question ;) Wow dude, you're a rock. I meant my question was rhetorical, not your statement about my question. /me point Nathan to http://en.wikipedia.org/wiki/Rhetorical_question XSLT sucks, complete overkill. the best part about xslt is its a standard, not some new contrivance from Creation does not prove usefulness. some other corner of the galaxy like smarty. Well I certainly agree with that. Smarty is like the fat cousin you hope doesn't show up to the 4th of July cookout. But there's always some n00b developer who brings it up.. next thing you know the project manager thinks it's a good idea because his designers will love to use it (rofl) and then you're screwed. furthermore i dont think it overkill at all. so lets see, what are you rendering, o, a subset of xml, xhmtl. so its actually quite concise. beyond that its well suited to target the output from an application to other potential clients such as programmatic ones eg. web service clients or mobile devices. REST is the new SOAP. Yaml is the new XML. I'm guessing this news just hasn't made it into any PHP frameworks yet. -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template system in PHP
On Feb 12, 2008 5:10 PM, Greg Donald [EMAIL PROTECTED] wrote: On Feb 12, 2008 3:37 PM, Nathan Nobbe [EMAIL PROTECTED] wrote: well thats what xslt is, which is pretty nice. /\ is a statement, not a question ;) /me point Nathan to http://en.wikipedia.org/wiki/Rhetorical_question XSLT sucks, complete overkill. the best part about xslt is its a standard, not some new contrivance from some other corner of the galaxy like smarty. furthermore i dont think it overkill at all. so lets see, what are you rendering, o, a subset of xml, xhmtl. so its actually quite concise. beyond that its well suited to target the output from an application to other potential clients such as programmatic ones eg. web service clients or mobile devices. -nathan
Re: [PHP] Template system in PHP
Nathan Rixham wrote: Shawn McKenzie wrote: Ryan A wrote: Add my vote too for Smarty HTH, -R Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping I like smarty and it's very powerful, however what you find is that it's just a less capable replacement for PHP. If I want conditional statements to display HTML and/or loop through arrays, why would I want to do it in smarty tags? Instead of moving display away from logic, it just replaces the logic with a different language. When I use templates I pretty much want variable substitution. My next project I'll probably use HTML files with little bits of PHP echos etc... sprinkled throughout. -Shawn re: If I want conditional statements to display HTML and/or loop through arrays, why would I want to do it in smarty tags? Things are very different when there are a team of varyingly skilled people on the job, do you really want a junior designer going in and changing bits of a php application, when you could limit the damage to a smarty template? further; the font end smarty language is definately needed; concider {if $articles} {*loop through articles and show in table *} {else} {* show no articles message *} {/if} in my opinion, being able to dump that kind of ultra simple logic onto the designers makes: 1: my life much easier 2: my php files much neater 3: my code my own domain without worrying about random comments and breakages from designers 4: the designers happier as they have more freedom and power to control the display, without having to worry final note: personally I output every script to a suitably named .tpl file with a single line {debug} - job done I understand, but my point that I didn't make earlier is that I know PHP so I use that. Designers that I work with don't know PHP and don't know smarty and have no desire to know. They know graphic design and HTML. So I would rather give them some meaningful tags to insert somewhere in their HTML. Actually moving the logic out of the presentation/design. So instead of article.tpl: {if $articles} {*loop through articles and show in table *} {else} {* show no articles message *} {/if} I prefer to do this in my article.php: if($articles) { include('article.html'); //or optionally file_get_contents() and do replace on tags }else{ return; } And let the designer have his article.html: table tr td?php echo $something; ?/td !-- or {something} that is replaced with echo $something; -- /tr /table -Shawn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template system in PHP
On Feb 12, 2008 3:37 PM, Nathan Nobbe [EMAIL PROTECTED] wrote: well thats what xslt is, which is pretty nice. /me point Nathan to http://en.wikipedia.org/wiki/Rhetorical_question XSLT sucks, complete overkill. -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template system in PHP
On Feb 12, 2008 4:45 PM, Robert Cummings [EMAIL PROTECTED] wrote: well thats what xslt is, which is pretty nice. Nah, I don't bother with XSLT. i know, i just thought id mention it, since xml was brought up and nobodys even mentioned xslt yet. i will likely move away from xslt, but i will be doing something different than the straight php based templating, like in code igniter. thats great for simple projects, but the thing i hate the most is escaping in and out of php, bleh! im still experimenting w/ my solution so i wont bother to share it until its worth looking at, but for the meantime the basic php mechanism is suitable. and i certainly dont use eval()! its slow and it opens holes to attacks. the most simple, way to template w/ php is w/ php, very simply, you will have a file, blah.php and watch how i include another 'template' after the data portion, (the second template is blah2.php someHtmlTag ?=$someDataFromPhp? ?php include('blah2.php'); ? /someOtherHtmlTag and there you have it, that is the most direct way to template w/ php, backed by the language itself. there is no need for eval either. i have my reasons for not liking it, but as i said, my system is far from ready and well this is cleaner than writing functions with strings, thats just horrid, imho. whwe, rant finished :) -nathan
Re: [PHP] Template system in PHP
guys, you all know you can F5 in the view source bit of firefox yeah.. save's all the pre's and loads of time! right click : view source : F5 till your done debugging. :) Christoph Boget wrote: I agree. I usually add a little function like this to my PHP projects: function debug( $var ) { echo 'pre'; print_r( $var ); echo '/pre'; } As an aside, you can save lines when debugging by doing: echo 'pre' . print_r( $var, TRUE ) . '/pre'; thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template system in PHP
On Tue, 2008-02-12 at 16:37 -0500, Nathan Nobbe wrote: On Feb 12, 2008 4:18 PM, Greg Donald [EMAIL PROTECTED] wrote: On Feb 12, 2008 3:15 PM, Robert Cummings [EMAIL PROTECTED] wrote: Custom tags (XML style ones anyways) provide support for arbitrary ordering and omission of optional attributes. They nest nicer than function calls, and they have the same general formatting as the HTML with which you are working. Additionally, they provide the opportunity to punt anything not necessary at run-time to pre-compiled HTML. Your solution to templating is XML? well thats what xslt is, which is pretty nice. Nah, I don't bother with XSLT. Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template system in PHP
On Tue, 2008-02-12 at 21:19 +, Nathan Rixham wrote: Are you creating custom DTD's or 1.1 XHTML Mods then? I'd like to see that, it's something I'd toyed with a few times in the past but found it far too time consuming (even for me), and opted for the ol' redefine everything in CSS *lightbulb* :: runs off to try css on custom tags why have i never tried that before :: ponders accessibility.. :: wanders off to waste time researching anyways I don't muck with DTDs and I don't bother with XSL. I could I guess, but they're more hassle than I care to work with. The tag lib hooks to PHP handlers that do what you want in good old PHP. The link below (if you're interested) is a basic example site that illustrates the custom tag system and various other InterJinn stuff. http://www.interjinn.com/download/exampleSite.tar.gz Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template system in PHP
On Tue, 2008-02-12 at 15:18 -0600, Greg Donald wrote: On Feb 12, 2008 3:15 PM, Robert Cummings [EMAIL PROTECTED] wrote: Custom tags (XML style ones anyways) provide support for arbitrary ordering and omission of optional attributes. They nest nicer than function calls, and they have the same general formatting as the HTML with which you are working. Additionally, they provide the opportunity to punt anything not necessary at run-time to pre-compiled HTML. Your solution to templating is XML? Not quite. My template engine allows arbitrary template types to be defined that are applied in a configured order. One such template type is similar to XML, but not quite. Specifically, the tags mostly conform to XML semantics, but they do not require a root nor do they require that the content in which they are embedded be well formed-- although they themselves must be well-formed. This allows the use of XML style custom tags to be used in any kind of document, whether it be HTML, XHTML, XML, plaintext, whatever. For most projects I work on the compiler is run to produce the documents requested. As such there is no cache overhead. In fact, if all you want is HTML, you can compile so that PHP is eliminated from the final result. I do this for CSS files (and others) that I have in multiple files that indicate specific CSS applicability. These are combined to a single CSS file by the template compiler and require no PHP overhead when requested. In cases of actual PHP empowered pages, in development I set a configuration variable to enable detection of changes to any of the dependency template files which invokes automatic recompilation. In production, auto recompilation is disabled for better performance. Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template system in PHP
On Feb 12, 2008 4:18 PM, Greg Donald [EMAIL PROTECTED] wrote: On Feb 12, 2008 3:15 PM, Robert Cummings [EMAIL PROTECTED] wrote: Custom tags (XML style ones anyways) provide support for arbitrary ordering and omission of optional attributes. They nest nicer than function calls, and they have the same general formatting as the HTML with which you are working. Additionally, they provide the opportunity to punt anything not necessary at run-time to pre-compiled HTML. Your solution to templating is XML? well thats what xslt is, which is pretty nice. -nathan
Re: [PHP] Template system in PHP
I agree. I usually add a little function like this to my PHP projects: function debug( $var ) { echo 'pre'; print_r( $var ); echo '/pre'; } As an aside, you can save lines when debugging by doing: echo 'pre' . print_r( $var, TRUE ) . '/pre'; thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template system in PHP
2008/2/12, Xavier de Lapeyre [EMAIL PROTECTED]: Hi, I need to develop a website, but my management is rather unstable in his vision for the layout. I'm thinking of developing the components as classes and functions, and then use a template system to render the layout. If the management wishes to change the layout, I'll just have to modify my template and the jobs' done. Do any of you guys gurls know of a way to implement that template system. (The best one I know of is that of Wordpress) Regards, Xavier de Lapeyre Web Developer Hi Xavier! I think you need a framework and i suggest the Zend Framework. Good. -- - - -- Csanyi Andras -- http://sayusi.hu -- Sayusi Ando -- Bízzál Istenben és tartsd szárazon a puskaport!.-- Cromwell
Re: [PHP] Template system in PHP
I used Smarty for long time but now switched to two-step-rendering. It's way more comfortable (for me). I suggest Zend_Layout + Zend_View at the moment (framework.zend.com) -- Łukasz Wojciechowski
Re: [PHP] Template system in PHP
On Feb 12, 2008 3:32 PM, Christoph Boget [EMAIL PROTECTED] wrote: As an aside, you can save lines when debugging by doing: echo 'pre' . print_r( $var, TRUE ) . '/pre'; OMG, thanks for that. Lines are so expensive nowadays and all. -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template system in PHP
On Feb 12, 2008 1:58 PM, Nathan Rixham [EMAIL PROTECTED] wrote: I still don't understand why general net users don't just like to see print_r output; it's got all the info they could want, ordered and structured *shrugs* vote: text/plain I agree. I usually add a little function like this to my PHP projects: function debug( $var ) { echo 'pre'; print_r( $var ); echo '/pre'; } -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template system in PHP
Shawn McKenzie wrote: Ryan A wrote: Add my vote too for Smarty HTH, -R Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping I like smarty and it's very powerful, however what you find is that it's just a less capable replacement for PHP. If I want conditional statements to display HTML and/or loop through arrays, why would I want to do it in smarty tags? Instead of moving display away from logic, it just replaces the logic with a different language. When I use templates I pretty much want variable substitution. My next project I'll probably use HTML files with little bits of PHP echos etc... sprinkled throughout. -Shawn re: If I want conditional statements to display HTML and/or loop through arrays, why would I want to do it in smarty tags? Things are very different when there are a team of varyingly skilled people on the job, do you really want a junior designer going in and changing bits of a php application, when you could limit the damage to a smarty template? further; the font end smarty language is definately needed; concider {if $articles} {*loop through articles and show in table *} {else} {* show no articles message *} {/if} in my opinion, being able to dump that kind of ultra simple logic onto the designers makes: 1: my life much easier 2: my php files much neater 3: my code my own domain without worrying about random comments and breakages from designers 4: the designers happier as they have more freedom and power to control the display, without having to worry final note: personally I output every script to a suitably named .tpl file with a single line {debug} - job done -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template system in PHP
On Feb 12, 2008 2:57 PM, Robert Cummings [EMAIL PROTECTED] wrote: I prefer content formatting encapsulation as provided by custom tags. Decorators? -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template system in PHP
Ryan A wrote: Add my vote too for Smarty HTH, -R Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping I like smarty and it's very powerful, however what you find is that it's just a less capable replacement for PHP. If I want conditional statements to display HTML and/or loop through arrays, why would I want to do it in smarty tags? Instead of moving display away from logic, it just replaces the logic with a different language. When I use templates I pretty much want variable substitution. My next project I'll probably use HTML files with little bits of PHP echos etc... sprinkled throughout. -Shawn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template system in PHP
Add my vote too for Smarty HTH, -R Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template system in PHP
I still don't understand why general net users don't just like to see print_r output; it's got all the info they could want, ordered and structured *shrugs* vote: text/plain Aleksandar Vojnovic wrote: Because its painful and fun at the same time :) Aleksandar Quoting Nate Tallman [EMAIL PROTECTED]: Ditto on Eval() PHP is already a templating system. Why go the long way around? On Feb 12, 2008 10:13 AM, Greg Donald [EMAIL PROTECTED] wrote: On 2/12/08, Xavier de Lapeyre [EMAIL PROTECTED] wrote: Do any of you guys gurls know of a way to implement that template system. eval() is my favorite templating engine. http://php.net/eval -- Greg Donald http://destiney.com/ -- 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] Template system in PHP
I don't suggest the use of a template system unless you do need something as complex as XSLT. PHP itself works very well for templating. Just write your code so that the UI code is sepperate from the logic and everything is neat and tidy without adding a layer of complexity. If you want a really clean interface then break out your logic into a service that is connected with your UI layer by XML-RPC, SOAP, or whatever you're comfortable with. At least that extra complexity benefits by making scaling easier and making alternate interfaces easier. -- Michael McGlothlin Southwest Plumbing Supply smime.p7s Description: S/MIME Cryptographic Signature
Re: [PHP] Template system in PHP
Ditto on Eval() PHP is already a templating system. Why go the long way around? On Feb 12, 2008 10:13 AM, Greg Donald [EMAIL PROTECTED] wrote: On 2/12/08, Xavier de Lapeyre [EMAIL PROTECTED] wrote: Do any of you guys gurls know of a way to implement that template system. eval() is my favorite templating engine. http://php.net/eval -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template system in PHP
On 2/12/08, Xavier de Lapeyre [EMAIL PROTECTED] wrote: Do any of you guys gurls know of a way to implement that template system. eval() is my favorite templating engine. http://php.net/eval -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template system in PHP
Xavier de Lapeyre schreef: Hi, I need to develop a website, but my management is rather unstable in his vision for the layout. I'm thinking of developing the components as classes and functions, and then use a template system to render the layout. If the management wishes to change the layout, I'll just have to modify my template and the jobs' done. Do any of you guys gurls know of a way to implement that template system. (The best one I know of is that of Wordpress) you can do better. don't bother to create your own template system, using something that already exists. there are plenty of 'php template engines' out there. one of the most well known is Smarty (http://smarty.net/) which is a good one to start with, they have quite extensive docs and a decent mailing list (things which I feel are worth taking into consideration beyond the purely technical pros and cons when deciding which one to use). googling for php+template+engine will get you a stack of possible candidates. also consider that the way you write your HTML heavily influences how much you have to change when management decides on a visual change. if you go the route of writing very functional HTML (i.e. HTML that makes next to no attempt to provide layout/styling) and use CSS as much as possible to provide the actually layout/design then you might consider not bothering with a template and just using CSS to implement UI design changes. to get an idea of exactly how different a single page of HTML can look depending on the CSS that is applied take a look at csszengarden Regards, Xavier de Lapeyre Web Developer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template system in PHP
another vote here for smarty - it's pretty much standard issue nowadays and means should the need ever arise you can easily bring in a web designer to do the html without having to worry about them learning some new system. Nathan clive wrote: Xavier de Lapeyre wrote: Do any of you guys gurls know of a way to implement that template system. Smarty ? (The best one I know of is that of Wordpress) Regards, Xavier de Lapeyre Web Developer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Template system in PHP
smarty? bastien Date: Tue, 12 Feb 2008 14:01:11 +0400 From: [EMAIL PROTECTED] To: php-general@lists.php.net Subject: [PHP] Template system in PHP Hi, I need to develop a website, but my management is rather unstable in his vision for the layout. I'm thinking of developing the components as classes and functions, and then use a template system to render the layout. If the management wishes to change the layout, I'll just have to modify my template and the jobs' done. Do any of you guys gurls know of a way to implement that template system. (The best one I know of is that of Wordpress) Regards, Xavier de Lapeyre Web Developer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _
Re: [PHP] Template system in PHP
On 2/12/08, Greg Donald [EMAIL PROTECTED] wrote: REST is the new SOAP. Yaml is the new XML. I'm guessing this news just hasn't made it into any PHP frameworks yet. REST for the win. SOAP is best left for the bathtub. as far as templating engines go, a while back i wanted to see if i could find the best template engine to suit all my needs. what i wind up finding was 100's of PHP-based templating engines, a LOT of them related to each other in some way. what you wind up doing is learning a proprietary language that is basically mimicing the constructs of PHP... and in theory, PHP -is- a templating language already. so after lots of digging and reading, i've come to the conclusion that packages like wordpress have it best: just let people write PHP. the whole designers shouldn't have to learn PHP is bunk, because they'll have to learn Smarty, or XSL, or some other proprietary language. i would say though that as far as template languages go, XSL/XML seems to be a decent fit. although XSL can be annoying (and processor intensive), it's a perfect fit of data in XML that can be validated and a template in XSL that can be validated and has presentation logic, variables and is a standard (published by W3C) which is a lot farther than any of these other templating languages can go. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template system
Smarty? smarty.php.net -- http://www.web-buddha.co.uk
Re: [PHP] Template system
Thats what i use... and no complaints so far. Cheers, Ryan Dave Goodchild [EMAIL PROTECTED] wrote: Smarty? smarty.php.net -- http://www.web-buddha.co.uk -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) - Do you Yahoo!? Next-gen email? Have it all with the all-new Yahoo! Mail.
Re: [PHP] Template system
Actually, I tried Fast Template when trying to decide on a templating solution, ran into some errors from the main class file/s and didnt get any help on it... so dumped it. The forums/lists for SMARTY are really good, very very helpful folks... I daresay as helpful and great as this php list. No regrets in my SMARTY choice. Cheers! Jônata Tyska Carvalho [EMAIL PROTECTED] wrote: think it is the better class of template: www.thewebmasters.net/php/FastTemplate.phtml On 10/5/06, Ryan A [EMAIL PROTECTED] wrote: Thats what i use... and no complaints so far. Cheers, Ryan Dave Goodchild [EMAIL PROTECTED] wrote: Smarty? smarty.php.net -- http://www.web-buddha.co.uk -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) - Do you Yahoo!? Next-gen email? Have it all with the all-new Yahoo! Mail. -- Jônata Tyska Carvalho - -- Técnico em Informática pelo Colégio Técnico Industrial (CTI) -- Graduando em Engenharia de Computação Fundação Universidade Federal de Rio Grande (FURG) -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) - Do you Yahoo!? Next-gen email? Have it all with the all-new Yahoo! Mail.
RE: [PHP] Template system
I haven't even read all replies, but the first one caught my love :-) /Peter www.lauri.se http://www.lauri.se/ - personal web site www.dwsasia.com http://www.dwsasia.com/ - company web site _ From: Dave Goodchild [mailto:[EMAIL PROTECTED] Sent: Thursday, October 05, 2006 5:59 PM To: Peter Lauri Cc: PHP Subject: Re: [PHP] Template system Smarty? smarty.php.net -- http://www.web-buddha.co.uk