Re: [PHP] Template engines
On Thu, 11 Nov 2010, Robert Cummings wrote: On 10-11-11 02:20 AM, David Robley wrote: Daniel P. Brown wrote: On Wed, Nov 10, 2010 at 20:59, Nathan Rixhamnrix...@gmail.com wrote: I went back to using a pre hypertext processor, seemed like a really powerful templating engine that was v familiar to use :p Pre-hypertext preprocessor? Perl? Pre Hypertext Processor - the acronym sounds familiar :-) I think I saw something about that on someone's Personal Home Page! Cheers, Rob. Perchance they were talking about a Form Interpreter ? Cheers -- David Robley Here's someone who can't speak! exclaimed Tom dumbfoundedly. Today is Setting Orange, the 23rd day of The Aftermath in the YOLD 3176. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
On 10-11-11 03:49 AM, David Robley wrote: On Thu, 11 Nov 2010, Robert Cummings wrote: On 10-11-11 02:20 AM, David Robley wrote: Daniel P. Brown wrote: On Wed, Nov 10, 2010 at 20:59, Nathan Rixhamnrix...@gmail.com wrote: I went back to using a pre hypertext processor, seemed like a really powerful templating engine that was v familiar to use :p Pre-hypertext preprocessor? Perl? Pre Hypertext Processor - the acronym sounds familiar :-) I think I saw something about that on someone's Personal Home Page! Cheers, Rob. Perchance they were talking about a Form Interpreter ? Yeah, that and some Gateway with a Common Interface. Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
On Thu, Nov 11, 2010 at 08:51, Robert Cummings rob...@interjinn.com wrote: Yeah, that and some Gateway with a Common Interface. My point was that there is now and never was any such PHP project known as pre-hypertext preprocessor. It originated as Personal Home Page Tools (PHP Tools) and Forms Interpreter (FI) --- the former was a series of C binaries, the latter was a CGI wrapper that actually preprocessed straight HTML by hopping in and out of !--HTML Comments-- using SSI. For a short while, if memory serves me correctly, a version of the package was also named Personal Home Page Construction Kit. Eventually the packages merged into PHP/FI, and a rewrite was done sometime during 1997, I believe, which became PHP/FI 2.0. I first started using it back in 1996 for quick and simple tasks where Perl would be a bit overkill. The part I can't remember clearly is whether PHP/FI2 was done in 1996 or 1997, though, because I do remember it was the fall of 1997 when PHP3 came out, and it blew me away. It sucked a bit having to now learn how to use the new PHP to build a page, but damned if it wasn't a trillion times easier to work with than Perl, right from the get-go. I remember being excited by the fact that I could rewrite a simple flat-file database Perl program I originally wrote in about three days in under two hours with PHP. From that point on, I was hooked on it, despite its quirky recursive-acronym name --- PHP: Hypertext Preprocessor. So when I asked if pre-hypertext preprocessor meant Perl, it could well have been Python, C/C++ on SSI, Tcl/Tk, or anything anything, that is, that came pre- PHP. That said, I have seen references to PHP being named Pre-Hypertext Preprocessor, but that would be incorrect anyway. The HTML (HyperText Markup Language) could be preprocessed, so that much is fine but pre-hypertext would be truly amusing. Any request to a web page is presently made via HTTP (HyperText Transfer Protocol), and any text displayed on any electronic device with embedded references (also known as hyperlinks). So any language that could pre-process pre-hypertext would either have the unique ability to foresee the future, the mundane ability to pre-process plain text (or request headers or anything prior to the data being classified as hypertext), or the disconcerting ability to modify reality as we know it. And why bother to do that when you could just %= go elsewhere. %? ;-P (It's felt like Friday all day.) -- /Daniel P. Brown Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting (866-) 725-4321 http://www.parasane.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
Not to discredit this long post but the media here is now calling kids who text often hypertexting teens which really irked me even more... I bet some non-technical news guy thinks he is awesome for coming up with that one. On Nov 11, 2010, at 9:54 AM, Daniel P. Brown daniel.br...@parasane.net wrote: On Thu, Nov 11, 2010 at 08:51, Robert Cummings rob...@interjinn.com wrote: Yeah, that and some Gateway with a Common Interface. My point was that there is now and never was any such PHP project known as pre-hypertext preprocessor. It originated as Personal Home Page Tools (PHP Tools) and Forms Interpreter (FI) --- the former was a series of C binaries, the latter was a CGI wrapper that actually preprocessed straight HTML by hopping in and out of !--HTML Comments-- using SSI. For a short while, if memory serves me correctly, a version of the package was also named Personal Home Page Construction Kit. Eventually the packages merged into PHP/FI, and a rewrite was done sometime during 1997, I believe, which became PHP/FI 2.0. I first started using it back in 1996 for quick and simple tasks where Perl would be a bit overkill. The part I can't remember clearly is whether PHP/FI2 was done in 1996 or 1997, though, because I do remember it was the fall of 1997 when PHP3 came out, and it blew me away. It sucked a bit having to now learn how to use the new PHP to build a page, but damned if it wasn't a trillion times easier to work with than Perl, right from the get-go. I remember being excited by the fact that I could rewrite a simple flat-file database Perl program I originally wrote in about three days in under two hours with PHP. From that point on, I was hooked on it, despite its quirky recursive-acronym name --- PHP: Hypertext Preprocessor. So when I asked if pre-hypertext preprocessor meant Perl, it could well have been Python, C/C++ on SSI, Tcl/Tk, or anything anything, that is, that came pre- PHP. That said, I have seen references to PHP being named Pre-Hypertext Preprocessor, but that would be incorrect anyway. The HTML (HyperText Markup Language) could be preprocessed, so that much is fine but pre-hypertext would be truly amusing. Any request to a web page is presently made via HTTP (HyperText Transfer Protocol), and any text displayed on any electronic device with embedded references (also known as hyperlinks). So any language that could pre-process pre-hypertext would either have the unique ability to foresee the future, the mundane ability to pre-process plain text (or request headers or anything prior to the data being classified as hypertext), or the disconcerting ability to modify reality as we know it. And why bother to do that when you could just %= go elsewhere. %? ;-P (It's felt like Friday all day.) -- /Daniel P. Brown Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting (866-) 725-4321 http://www.parasane.net/ -- 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 engines
On 11/11/10 12:04 PM, Michael Shadle wrote: Not to discredit this long post but the media here is now calling kids who text often hypertexting teens which really irked me even more...I bet some non-technical news guy thinks he is awesome for coming up with that one. LOL! I too thought those kids were going around creating HTML pages with their phones! -- Dante -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Template engines
From: Daniel P. Brown On Thu, Nov 11, 2010 at 08:51, Robert Cummings rob...@interjinn.com wrote: Yeah, that and some Gateway with a Common Interface. So any language that could pre-process pre-hypertext would either have the unique ability to foresee the future, the mundane ability to pre-process plain text (or request headers or anything prior to the data being classified as hypertext), or the disconcerting ability to modify reality as we know it. And why bother to do that when you could just %= go elsewhere. %? ;-P One of the items at the top of our wish list for over two decades has been a pre-causal response generator. Processing time for transactions on point of sale systems has always been an issue for us, so we wanted to have the response message ready before the transaction arrived. The next item on that list is a neural interface specifically designed for developers. Unfortunately, neither of those technologies has materialized. (It's felt like Friday all day.) It still feels like Monday here. Bob McConnell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
At 11:38 AM -0500 11/9/10, Robert Cummings wrote: On 10-11-09 11:18 AM, tedd wrote: At 10:57 AM -0500 11/9/10, Robert Cummings wrote: On 10-11-09 10:42 AM, tedd wrote: I don't have to try them all, just the most popular. If the most popular doesn't work for me, then I don't need to try any others. That's all well and good, but the argument being used is a generalization which at best is wrong. I don't care what you use, but FUD doesn't help anything. Cheers, Rob. I disagree and what I said is not FUD. If we took the time to *not* generalize, then we would be up to our collective butts in evaluations of everything, while getting nothing accomplished. Generalization is a way to navigate the massive amounts of data we are bombarded with each day. Do I want to spend/waste time evaluating all templates to the nth degree? I think not. Instead, I research ideas and see if they meet with my way of doing things. If they do, then I incorporate them into my method -- if not, then I pass. I have changed my methods many times to accommodate new technologies and new ways of doing things, but that does not mean that I always incorporate everything that comes along. Templates are one of those things that do not fit in my way of doing things and I do not need to investigate all template systems to arrive at that conclusion. As such, there is nothing wrong with my evaluation method for it works for me. I think the key quote here is your way. Others will certainly have different mileage (as has already been expressed), thus your generalization still rings false. It's only a generalization for you and others of like mind... which is terribly partisan :) Cheers, Rob. And, in this case, your way is to disagree with my way. :-) In the end, we all have our methods of navigating information. If we didn't we wouldn't be as far along as we are. Cheers, tedd -- --- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
Daniel P. Brown wrote: On Mon, Nov 8, 2010 at 16:41, Hansen, Mike mike.han...@atmel.com wrote: I really like the idea of using a templating engine. Which one do you use? Why? For those that don't use templating engines, why don't you use them? I chose to write two of my own over the years: one procedural, one OOP. That said, the most common is likely still to be Smarty, and by far. I went back to using a pre hypertext processor, seemed like a really powerful templating engine that was v familiar to use :p -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
On Wed, Nov 10, 2010 at 20:59, Nathan Rixham nrix...@gmail.com wrote: I went back to using a pre hypertext processor, seemed like a really powerful templating engine that was v familiar to use :p Pre-hypertext preprocessor? Perl? -- /Daniel P. Brown Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting (866-) 725-4321 http://www.parasane.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
Daniel P. Brown wrote: On Wed, Nov 10, 2010 at 20:59, Nathan Rixham nrix...@gmail.com wrote: I went back to using a pre hypertext processor, seemed like a really powerful templating engine that was v familiar to use :p Pre-hypertext preprocessor? Perl? Pre Hypertext Processor - the acronym sounds familiar :-) Cheers -- David Robley Coming Soon!! Mouse Support for Edlin!! Today is Setting Orange, the 23rd day of The Aftermath in the YOLD 3176. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
On 10-11-11 02:20 AM, David Robley wrote: Daniel P. Brown wrote: On Wed, Nov 10, 2010 at 20:59, Nathan Rixhamnrix...@gmail.com wrote: I went back to using a pre hypertext processor, seemed like a really powerful templating engine that was v familiar to use :p Pre-hypertext preprocessor? Perl? Pre Hypertext Processor - the acronym sounds familiar :-) I think I saw something about that on someone's Personal Home Page! Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
At 10:00 PM -0500 11/8/10, David McGlone wrote: On Mon, 2010-11-08 at 23:36 +0100, k...@bitflop.com wrote: IMHO - If you have to jump in and out of HTML and template syntax you might as well jump in and out of HTML and PHP. There is truth to this, but for me, its helping me learn in a much clearer way. I can't explain how or why, but it make me feel like everything is neat and tidy and where it should be. Where PHP and HTML mixed and mingled gives me the feeling that everything is a disaster. -- Blessings, David M. It can be a disaster, but that's your choice -- and that's the point. You can dig as deep a hole as you like, or make it simple for yourself. I don't use template engines. I simply place php echo()s where I need them while maintaining a strict division between content and presentation using best practices between html and css. Additionally, I believe that one also has to consider how JavaScript fits into the needs of the application and thus adherence to progressive enhancement is also a must. Templates and DOM operations can become very involved and problematic. In all, you must consider content, presentation, function, and data. Granted those boundaries become blurred when viewing both client and server side operations, but I don't find any template engines that make it any easier in design and implementation. While a cursory review of smarty (et al) may appear to solve minor problems, the more involved an application becomes, the more I find templates don't fit and are often more trouble than they are worth. YMMV. Cheers, tedd -- --- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
At 10:24 PM -0500 11/8/10, Matt Giddings wrote: I have to agree with David here. Smarty may be an added layer to the whole mix, but it makes maintaining the template and application much simpler. Much better than mixing html/php all together in a single file. That and a single template is easily used in multiple applications if needed, ore in multiple files within the same application. IMHO the benefits far out way the negatives of using a template engine. -1 To each their own. Cheers, tedd -- --- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
At 12:20 AM -0500 11/9/10, Paul M Foster wrote: On Mon, Nov 08, 2010 at 02:41:12PM -0700, Hansen, Mike wrote: I really like the idea of using a templating engine. Which one do you use? Why? For those that don't use templating engines, why don't you use them? Here's why I don't use a templating engine. First, You're taking an embedded language and writing a templating engine in it. Seriously? Second, you're painting a single page, maybe 10-15K worth of information, and you're dragging 100K of code around just to paint a single page. Seriously? Third, you're creating a page on the fly, thrashing the server's CPU in order to generate a page which could be built statically, or at least with minimally embedded PHP. Seriously? Fourth, you could achieve the same end result with carefully crafted PHP embedded in your static HTML file, with actually very little more work. I know, everyone's heard this before. But just because you *can* do something doesn't mean you *should*. Paul +1 Cheers, tedd -- --- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
At 12:23 AM -0500 11/9/10, Robert Cummings wrote: On 10-11-09 12:20 AM, Paul M Foster wrote: On Mon, Nov 08, 2010 at 02:41:12PM -0700, Hansen, Mike wrote: I really like the idea of using a templating engine. Which one do you use? Why? For those that don't use templating engines, why don't you use them? Here's why I don't use a templating engine. First, You're taking an embedded language and writing a templating engine in it. Seriously? Second, you're painting a single page, maybe 10-15K worth of information, and you're dragging 100K of code around just to paint a single page. Seriously? Third, you're creating a page on the fly, thrashing the server's CPU in order to generate a page which could be built statically, or at least with minimally embedded PHP. Seriously? Fourth, you could achieve the same end result with carefully crafted PHP embedded in your static HTML file, with actually very little more work. I know, everyone's heard this before. But just because you *can* do something doesn't mean you *should*. Aaaah, the great argument that uses a single brush to paint all template engines into one corner because if you've used one, you've used them all... Seriously? Cheers, Rob. I don't have to try them all, just the most popular. If the most popular doesn't work for me, then I don't need to try any others. Cheers, tedd -- --- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
On 10-11-09 11:18 AM, tedd wrote: At 10:57 AM -0500 11/9/10, Robert Cummings wrote: On 10-11-09 10:42 AM, tedd wrote: I don't have to try them all, just the most popular. If the most popular doesn't work for me, then I don't need to try any others. That's all well and good, but the argument being used is a generalization which at best is wrong. I don't care what you use, but FUD doesn't help anything. Cheers, Rob. I disagree and what I said is not FUD. If we took the time to *not* generalize, then we would be up to our collective butts in evaluations of everything, while getting nothing accomplished. Generalization is a way to navigate the massive amounts of data we are bombarded with each day. Do I want to spend/waste time evaluating all templates to the nth degree? I think not. Instead, I research ideas and see if they meet with my way of doing things. If they do, then I incorporate them into my method -- if not, then I pass. I have changed my methods many times to accommodate new technologies and new ways of doing things, but that does not mean that I always incorporate everything that comes along. Templates are one of those things that do not fit in my way of doing things and I do not need to investigate all template systems to arrive at that conclusion. As such, there is nothing wrong with my evaluation method for it works for me. I think the key quote here is your way. Others will certainly have different mileage (as has already been expressed), thus your generalization still rings false. It's only a generalization for you and others of like mind... which is terribly partisan :) Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
At 10:57 AM -0500 11/9/10, Robert Cummings wrote: On 10-11-09 10:42 AM, tedd wrote: I don't have to try them all, just the most popular. If the most popular doesn't work for me, then I don't need to try any others. That's all well and good, but the argument being used is a generalization which at best is wrong. I don't care what you use, but FUD doesn't help anything. Cheers, Rob. I disagree and what I said is not FUD. If we took the time to *not* generalize, then we would be up to our collective butts in evaluations of everything, while getting nothing accomplished. Generalization is a way to navigate the massive amounts of data we are bombarded with each day. Do I want to spend/waste time evaluating all templates to the nth degree? I think not. Instead, I research ideas and see if they meet with my way of doing things. If they do, then I incorporate them into my method -- if not, then I pass. I have changed my methods many times to accommodate new technologies and new ways of doing things, but that does not mean that I always incorporate everything that comes along. Templates are one of those things that do not fit in my way of doing things and I do not need to investigate all template systems to arrive at that conclusion. As such, there is nothing wrong with my evaluation method for it works for me. Cheers, tedd -- --- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
On 10-11-09 10:42 AM, tedd wrote: At 12:23 AM -0500 11/9/10, Robert Cummings wrote: On 10-11-09 12:20 AM, Paul M Foster wrote: On Mon, Nov 08, 2010 at 02:41:12PM -0700, Hansen, Mike wrote: I really like the idea of using a templating engine. Which one do you use? Why? For those that don't use templating engines, why don't you use them? Here's why I don't use a templating engine. First, You're taking an embedded language and writing a templating engine in it. Seriously? Second, you're painting a single page, maybe 10-15K worth of information, and you're dragging 100K of code around just to paint a single page. Seriously? Third, you're creating a page on the fly, thrashing the server's CPU in order to generate a page which could be built statically, or at least with minimally embedded PHP. Seriously? Fourth, you could achieve the same end result with carefully crafted PHP embedded in your static HTML file, with actually very little more work. I know, everyone's heard this before. But just because you *can* do something doesn't mean you *should*. Aaaah, the great argument that uses a single brush to paint all template engines into one corner because if you've used one, you've used them all... Seriously? Cheers, Rob. I don't have to try them all, just the most popular. If the most popular doesn't work for me, then I don't need to try any others. That's all well and good, but the argument being used is a generalization which at best is wrong. I don't care what you use, but FUD doesn't help anything. Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
On Tue, 9 Nov 2010 00:20:52 -0500 Paul M Foster pa...@quillandmouse.com wrote: On Mon, Nov 08, 2010 at 02:41:12PM -0700, Hansen, Mike wrote: Here's why I don't use a templating engine. First, You're taking an embedded language and writing a templating engine in it. Seriously? Second, you're painting a single page, maybe 10-15K worth of information, and you're dragging 100K of code around just to paint a single page. Seriously? Third, you're creating a page on the fly, thrashing the server's CPU in order to generate a page which could be built statically, or at least with minimally embedded PHP. Seriously? Fourth, you could achieve the same end result with carefully crafted PHP embedded in your static HTML file, with actually very little more work. I know, everyone's heard this before. But just because you *can* do something doesn't mean you *should*. Beautiful put! --- Mange venlige hilsner/Best regards Kim N. Lesmer Programmer/Unix systemadministrator Web: www.bitflop.com E-mail : k...@bitflop.com Paul -- Paul M. Foster -- 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 engines
On Mon, Nov 8, 2010 at 4:41 PM, Hansen, Mike mike.han...@atmel.com wrote: I really like the idea of using a templating engine. Which one do you use? Why? For those that don't use templating engines, why don't you use them? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I prefer using what essentially amounts to a templating engine, my web framework, Nephtali. It's markup conventions can be found at the link below: http://nephtaliproject.com/documentation/markup/ It helps me easily get things right, for example: 1. Appropriate escaping of output, automatically examining the context to determine the appropriate form of escaping (html, attribute, or url), or I can manually declare escaping in the markup to improve performance. 2. When an error occurs in one dynamic region of the page, I don't always want to show a generic error page (I'd rather just show an error message for that particular region that experienced an error and show the rest of the page normally.) 3. I like to progressively enhance pages, and sometimes this involves grabbing the content of one particular dynamic region of a page. Nephtali builds in a restful API that allows you to retrieve the content of a dynamic region instead of retrieving the whole page (the processing short-circuits to improve performance), for example: http://nephtaliproject.com/php53hosts/index.php?nmode=htmlfragnpipe=hosts 4. I like to work on projects with many others of various skill levels and backgrounds, and the xml comments are easily understood and play nicely with a broad range of editors/IDE's. 5. Nephtali plays nicely with legacy PHP code, so you can add it to existing sites without issue (as long as turning on output buffering isn't an issue.) So, if you want to add some PHP to the page, no problem, you can have the best of both worlds. 6. Nephtali offers more features (input validation, PDO wrappers, etc.) and fits within one file, so I get a lot without much ado. Now, I framed this in terms of my web framework because it's what I know best. That said, my documentation isn't up to par yet, so it would likely be frustrating getting up to speed (I did build a code generator to help out, though.) Smarty, PHPTAL (I especially appreciate its syntax), and other templating engines are well documented and offer many of the same features and qualities, and those features are what compel me to use them as opposed to just using PHP. That doesn't mean I always use a templating engine/framework, but I use one much more frequently than not. Adam -- Nephtali: PHP web framework that functions beautifully http://nephtaliproject.com
[PHP] Template engines
I really like the idea of using a templating engine. Which one do you use? Why? For those that don't use templating engines, why don't you use them? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
On Mon, Nov 8, 2010 at 16:41, Hansen, Mike mike.han...@atmel.com wrote: I really like the idea of using a templating engine. Which one do you use? Why? For those that don't use templating engines, why don't you use them? I chose to write two of my own over the years: one procedural, one OOP. That said, the most common is likely still to be Smarty, and by far. -- /Daniel P. Brown Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting (866-) 725-4321 http://www.parasane.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
On Mon, 2010-11-08 at 14:41 -0700, Hansen, Mike wrote: I really like the idea of using a templating engine. Which one do you use? Why? For those that don't use templating engines, why don't you use them? for the longest time, i didn't know about them, and was breaking in and out of php, as well as didn't use ANY classes... then i was starting to play with phpbb, and found out a little about templates... so i borrowed the template engine from them for a personal project... and was pretty impressed. then shortly after that, i got a job with a company who used smarty templates... and was VERY impressed with them :) ever since then, i've been using smarty, and have been very happy since. I dont know of any others out there, but that is mostly becuase i am content with what smarty does for me (and prolly becuase i am too lazy to change now ;) ) all of my projects now consist of smarty, pear mdb2, phpmailer, jquery, fpdf (if needed), and pchart (again, if needed). these are my personal choices, and I have been happy with them so far ;) Steve -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
On 10-11-08 04:51 PM, Steve Staples wrote: all of my projects now consist of smarty, pear mdb2, phpmailer, jquery, fpdf (if needed), and pchart (again, if needed). these are my personal choices, and I have been happy with them so far ;) pchart... *shudder*. I recently had to add support for variable line types (dots, dashes, combinations thereof)... I did a beautiful hackjob *lol*. Interesting to see others use it... the project seems to be dead. Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
On Mon, Nov 8, 2010 at 1:41 PM, Hansen, Mike mike.han...@atmel.com wrote: I really like the idea of using a templating engine. Which one do you use? Why? For those that don't use templating engines, why don't you use them? smarty is everyone's favorite usually but i find it a bit annoying. not to mention php itself is already a templating language... the only benefit is trying to separate content and presentation. however, for that to happen people create DSLs for templating that all have their own little syntaxes and glitches and annoyances. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
On Mon, Nov 8, 2010 at 4:58 PM, Robert Cummings rob...@interjinn.com wrote: On 10-11-08 04:51 PM, Steve Staples wrote: all of my projects now consist of smarty, pear mdb2, phpmailer, jquery, fpdf (if needed), and pchart (again, if needed). these are my personal choices, and I have been happy with them so far ;) pchart... *shudder*. I recently had to add support for variable line types (dots, dashes, combinations thereof)... I did a beautiful hackjob *lol*. Interesting to see others use it... the project seems to be dead. Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php We are using some flex components for charting. Very cool with lots of flexibility. Just pass in xml datasets -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
On 10-11-08 05:02 PM, Bastien Koert wrote: On Mon, Nov 8, 2010 at 4:58 PM, Robert Cummingsrob...@interjinn.com wrote: On 10-11-08 04:51 PM, Steve Staples wrote: all of my projects now consist of smarty, pear mdb2, phpmailer, jquery, fpdf (if needed), and pchart (again, if needed). these are my personal choices, and I have been happy with them so far ;) pchart... *shudder*. I recently had to add support for variable line types (dots, dashes, combinations thereof)... I did a beautiful hackjob *lol*. Interesting to see others use it... the project seems to be dead. We are using some flex components for charting. Very cool with lots of flexibility. Just pass in xml datasets There was a sans flash requirement :) Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
On 8 November 2010 22:59, Michael Shadle mike...@gmail.com wrote: On Mon, Nov 8, 2010 at 1:41 PM, Hansen, Mike mike.han...@atmel.com wrote: I really like the idea of using a templating engine. Which one do you use? Why? For those that don't use templating engines, why don't you use them? smarty is everyone's favorite usually but i find it a bit annoying. not to mention php itself is already a templating language... the only benefit is trying to separate content and presentation. however, for that to happen people create DSLs for templating that all have their own little syntaxes and glitches and annoyances. PHPTal is an alternative to smarty: http://phptal.org/ - it's got a nice syntax, I find. However, whether one should bother with a templating system like smarty or phptal very much depends upon how intricate your front-end system needs to be and what it needs to do. For smaller projects. smarty or phptal will get in the way and will likely get very annoying. For bigger projects they can be of great use. Regards Peter -- hype WWW: plphp.dk / plind.dk LinkedIn: plind BeWelcome/Couchsurfing: Fake51 Twitter: kafe15 /hype -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
i would point someone in the direction of XHP too if they really wanted to https://github.com/facebook/xhp/wiki/ On Mon, Nov 8, 2010 at 2:10 PM, Peter Lind peter.e.l...@gmail.com wrote: On 8 November 2010 22:59, Michael Shadle mike...@gmail.com wrote: On Mon, Nov 8, 2010 at 1:41 PM, Hansen, Mike mike.han...@atmel.com wrote: I really like the idea of using a templating engine. Which one do you use? Why? For those that don't use templating engines, why don't you use them? smarty is everyone's favorite usually but i find it a bit annoying. not to mention php itself is already a templating language... the only benefit is trying to separate content and presentation. however, for that to happen people create DSLs for templating that all have their own little syntaxes and glitches and annoyances. PHPTal is an alternative to smarty: http://phptal.org/ - it's got a nice syntax, I find. However, whether one should bother with a templating system like smarty or phptal very much depends upon how intricate your front-end system needs to be and what it needs to do. For smaller projects. smarty or phptal will get in the way and will likely get very annoying. For bigger projects they can be of great use. Regards Peter -- hype WWW: plphp.dk / plind.dk LinkedIn: plind BeWelcome/Couchsurfing: Fake51 Twitter: kafe15 /hype -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
On Mon, 8 Nov 2010 14:41:12 -0700 Hansen, Mike mike.han...@atmel.com wrote: I really like the idea of using a templating engine. Which one do you use? Why? For those that don't use templating engines, why don't you use them? PHP is in itself a template language and I find that the template engines just get in the way. Why learn a template language when you can just concentrate on PHP? Also you can easily become dependable on a third party template system which needs to be upgraded. You never know when such an upgrade is necessary for your system and when it might break something. I always use homemade template systems and try to keep things very simple. If designers are working on the project as well they almost always benefit from a little insight into PHP rather than having to learn some template language they can't use for anything else. IMHO - If you have to jump in and out of HTML and template syntax you might as well jump in and out of HTML and PHP. --- Mange venlige hilsner/Best regards Kim N. Lesmer Programmer/Unix systemadministrator Web: www.bitflop.com E-mail : k...@bitflop.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 engines
On Mon, 2010-11-08 at 16:51 -0500, Steve Staples wrote: On Mon, 2010-11-08 at 14:41 -0700, Hansen, Mike wrote: I really like the idea of using a templating engine. Which one do you use? Why? For those that don't use templating engines, why don't you use them? for the longest time, i didn't know about them, and was breaking in and out of php, as well as didn't use ANY classes... then i was starting to play with phpbb, and found out a little about templates... so i borrowed the template engine from them for a personal project... and was pretty impressed. then shortly after that, i got a job with a company who used smarty templates... and was VERY impressed with them :) ever since then, i've been using smarty, and have been very happy since. I dont know of any others out there, but that is mostly becuase i am content with what smarty does for me (and prolly becuase i am too lazy to change now ;) ) all of my projects now consist of smarty, pear mdb2, phpmailer, jquery, fpdf (if needed), and pchart (again, if needed). these are my personal choices, and I have been happy with them so far ;) I agree 100%!! Everyone here pretty much knows how much I've ranted about smarty :-) IMHO it's smart to use smarty! ;-) -- Blessings, David M. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
On Mon, 2010-11-08 at 23:36 +0100, k...@bitflop.com wrote: On Mon, 8 Nov 2010 14:41:12 -0700 Hansen, Mike mike.han...@atmel.com wrote: I really like the idea of using a templating engine. Which one do you use? Why? For those that don't use templating engines, why don't you use them? PHP is in itself a template language and I find that the template engines just get in the way. Why learn a template language when you can just concentrate on PHP? Also you can easily become dependable on a third party template system which needs to be upgraded. You never know when such an upgrade is necessary for your system and when it might break something. I always use homemade template systems and try to keep things very simple. If designers are working on the project as well they almost always benefit from a little insight into PHP rather than having to learn some template language they can't use for anything else. IMHO - If you have to jump in and out of HTML and template syntax you might as well jump in and out of HTML and PHP. There is truth to this, but for me, its helping me learn in a much clearer way. I can't explain how or why, but it make me feel like everything is neat and tidy and where it should be. Where PHP and HTML mixed and mingled gives me the feeling that everything is a disaster. -- Blessings, David M. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
On Mon, Nov 8, 2010 at 9:39 PM, David McGlone da...@dmcentral.net wrote: On Mon, 2010-11-08 at 16:51 -0500, Steve Staples wrote: On Mon, 2010-11-08 at 14:41 -0700, Hansen, Mike wrote: I really like the idea of using a templating engine. Which one do you use? Why? For those that don't use templating engines, why don't you use them? for the longest time, i didn't know about them, and was breaking in and out of php, as well as didn't use ANY classes... then i was starting to play with phpbb, and found out a little about templates... so i borrowed the template engine from them for a personal project... and was pretty impressed. then shortly after that, i got a job with a company who used smarty templates... and was VERY impressed with them :) ever since then, i've been using smarty, and have been very happy since. I dont know of any others out there, but that is mostly becuase i am content with what smarty does for me (and prolly becuase i am too lazy to change now ;) ) all of my projects now consist of smarty, pear mdb2, phpmailer, jquery, fpdf (if needed), and pchart (again, if needed). these are my personal choices, and I have been happy with them so far ;) I agree 100%!! Everyone here pretty much knows how much I've ranted about smarty :-) IMHO it's smart to use smarty! ;-) -- Blessings, David M. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I have to agree with David here. Smarty may be an added layer to the whole mix, but it makes maintaining the template and application much simpler. Much better than mixing html/php all together in a single file. That and a single template is easily used in multiple applications if needed, ore in multiple files within the same application. IMHO the benefits far out way the negatives of using a template engine.
Re: [PHP] Template engines
On Mon, Nov 08, 2010 at 02:41:12PM -0700, Hansen, Mike wrote: I really like the idea of using a templating engine. Which one do you use? Why? For those that don't use templating engines, why don't you use them? Here's why I don't use a templating engine. First, You're taking an embedded language and writing a templating engine in it. Seriously? Second, you're painting a single page, maybe 10-15K worth of information, and you're dragging 100K of code around just to paint a single page. Seriously? Third, you're creating a page on the fly, thrashing the server's CPU in order to generate a page which could be built statically, or at least with minimally embedded PHP. Seriously? Fourth, you could achieve the same end result with carefully crafted PHP embedded in your static HTML file, with actually very little more work. I know, everyone's heard this before. But just because you *can* do something doesn't mean you *should*. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
On 10-11-09 12:20 AM, Paul M Foster wrote: On Mon, Nov 08, 2010 at 02:41:12PM -0700, Hansen, Mike wrote: I really like the idea of using a templating engine. Which one do you use? Why? For those that don't use templating engines, why don't you use them? Here's why I don't use a templating engine. First, You're taking an embedded language and writing a templating engine in it. Seriously? Second, you're painting a single page, maybe 10-15K worth of information, and you're dragging 100K of code around just to paint a single page. Seriously? Third, you're creating a page on the fly, thrashing the server's CPU in order to generate a page which could be built statically, or at least with minimally embedded PHP. Seriously? Fourth, you could achieve the same end result with carefully crafted PHP embedded in your static HTML file, with actually very little more work. I know, everyone's heard this before. But just because you *can* do something doesn't mean you *should*. Aaaah, the great argument that uses a single brush to paint all template engines into one corner because if you've used one, you've used them all... Seriously? Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
On 9 November 2010 06:20, Paul M Foster pa...@quillandmouse.com wrote: On Mon, Nov 08, 2010 at 02:41:12PM -0700, Hansen, Mike wrote: I really like the idea of using a templating engine. Which one do you use? Why? For those that don't use templating engines, why don't you use them? Here's why I don't use a templating engine. First, You're taking an embedded language and writing a templating engine in it. Seriously? Second, you're painting a single page, maybe 10-15K worth of information, and you're dragging 100K of code around just to paint a single page. Seriously? Third, you're creating a page on the fly, thrashing the server's CPU in order to generate a page which could be built statically, or at least with minimally embedded PHP. Seriously? You assume that the OP will either make static pages (yet posts on the PHP mailing list) or makes pages that aren't very dynamic in any sense. Seriously? -- hype WWW: plphp.dk / plind.dk LinkedIn: plind BeWelcome/Couchsurfing: Fake51 Twitter: kafe15 /hype -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php