News Feed
Jobs Feed
Sections




Recent Jobs

News Archive
feed this:

Ivo Jansch's Blog:
PHP as a template language
February 15, 2010 @ 08:12:04

Ivo Jansch has a recent post to his blog talking about one of the great debates in the world of PHP - is the language by itself a good templating language (versus using something like Smarty)?

I think I've said it before. The tool you use should depend on the job you're trying to do. So to say that Smarty is wrong just because it is, does not feel right. I agree that in many cases PHP can be used as a template language just fine, but there are situations where a Smarty template (or any other templating engine) is just that more pleasant.

He's comparing them on aesthetics alone, showing two snippets of code - one templated via PHP and the other in the format that Smarty uses to generate a simple chunk of XML. For more examples of the Smarty format, check out their documentation.

0 comments voice your opinion now!
template language opinion smarty



Java.Sys-con.com:
Why Do 'Cool Kids' Choose Ruby or PHP to Build Websites Instead of Java?
January 26, 2010 @ 13:13:05

On the Java section of the Sys-con.com site today there's an interesting perspective from the Java side of things as to why people (the "cool kids") choose Ruby or PHP over Java despite some of the things it has to offer.

Here is a question that I have been pondering on and off for quite a while: Why do "cool kids" choose Ruby or PHP to build websites instead of Java? I have to admit that I do not have an answer. Why do I even care? Because I am a Java developer.

He wonders why, when the Java community, toolset and user base seems so strong, would developers opt for PHP/Ruby to build their "middleware logic". He suggests that maybe Java is more difficult to use so developers shy away from it. He does mention one things that could cause a the sway more towards these simpler languages - that Java could be overkill for a good number of the smaller sites out there.

Check out the comments on the post for more thoughts and ideas from both the PHP/Ruby and Java sides of the discussion.

0 comments voice your opinion now!
java language choice ruby opinion


Hernani Cerqueira's Blog:
XSLT as a templating engine for PHP
January 05, 2010 @ 10:12:57

Hernani Cerqueira has posted a quick introduction to using XSLT (an XML-based markup for styling XML documents) as a templating engine for PHP.

One thing that I miss is a good unobtrusive template engine for PHP. Of course there is smarty, and a bunch of pear packages as well as some other free or commercial projects, and I'm honest to say that I'd never tried none of these, simply because I still see XSLT as a perfectly valid and powerful solution This post is a small tutorial about using XSLT as a templating engine for PHP.

He takes some time to explain what XSLT is and why it's a good choice (from his opinion) for templating your site. A code example is included where he builds a simple XML document (with the DOMDocument functionality of PHP) and creates a XSLT style sheet to take that information and change it into a formatted HTML document. Outputting the result is easy with the creation of a new XSLTProcessor object and a push out the other side with a transformToXML method call.

0 comments voice your opinion now!
xslt template language tutorial


Padraic Brady's Blog:
Is PHP A Worthy Template Language? Well, of course it is...
October 13, 2009 @ 08:29:26

Padraic Brady has posted his own response to the post from Fabien Potencier about templating in PHP applications and disagrees by saying that PHP is most definitely a worthy template language.

Fabien's article triggered the urge once again to challenge the status quo, the continued view of something in PHP being necessary when in truth it simply isn't. The article takes that view to extremes, going to some effort arguing against the recent slide towards templating with PHP with arguments which are so biased as to misinform readers.

Padraic rants a bit on both the content of Fabien's article and his approach to the topic (more of a debate tactic than anything) and looks at a few return arguments against Fabien's comments:

  • The PHP language is verbose
  • The PHP language is not very readable
  • The PHP language is less secure than a templating language
  • The PHP language does not offer template inheritance

He also briefly looks at Twig's performance numbers based on a set of benchmarks he's created.

0 comments voice your opinion now!
template language twig


Wes Shell's Blog:
Quicky 1 PHP is Loosely Typed '" What does that Mean?
October 09, 2009 @ 12:30:11

Wes Shell has posted a "PHP quicky" to his blog today looking at something at the core of the PHP language - its loosely-typed nature.

A loosely typed language such as PHP is a language that does not require you to declare a variable type when declaring a variable. What does that mean? In PHP when you declare a variable, you can with no need to worry about what kind of data will be stored in that variable.

He compares it to some of the other strictly-typed languages where the variable must be set up and cast to the type and the flexibility that having looser types can have over it. He also looks at some of the drawbacks (ex. can lead to bad code) and advantages (ex. highly dynamic, flexible applications) of this method.

0 comments voice your opinion now!
loosely typed language opinion


Fabien Potencier's Blog:
Templating Engines in PHP
October 08, 2009 @ 07:51:37

New on his blog today Fabien Potencier tackles a tough topic for the PHP community - templating languages and whether or not their that useful/good after all.

So, you think PHP is a templating engine? So did I... for a very long time. But recently, I changed my mind. Even if PHP can be used as a templating engine, the syntax is just plain ugly as a template language. [...] So, when I asked a few days ago about the best and popular templating engines in PHP on Twitter, some people naturally answered "PHP" itself. I was not even surprised as that would probably have been my answer some weeks ago too.

He suggests that PHP, by itself, just isn't good enough any more and that truly robust templating languages (no, not like that one) can make a huge improvement in the quality of your application. He touches on a few related points including reusability, security and some of the current templating tools for PHP - Smarty, PHPTAL, eZ Components templates, Dwoo, Calypso and his own incarnation - Twig. He also includes some stats on rendering times and memory usage for each.

UPDATE: After all of the response that the PHP gave back to this article, Fabien also posted a follow-up with a bit more information on Twig.

0 comments voice your opinion now!
template engine language twig


Mark van der Velden's Blog:
PHP Quiz - Part 3
September 24, 2009 @ 10:40:54

Mark van der Velden has posted the third part of his "PHP Quiz" series to test your mental muscles on various PHP-related questions.

Welcome to another part of the PHP Quiz series, again some interesting questions to crack your brain about. If you have some nice additions or questions, be sure to leave a comment. Enjoy part three!

Questions in this edition cover unset, form output, working with strings, references, globals and working with class inheritance. You can check out part one and part two for more brain teasing fun.

1 comment voice your opinion now!
quiz language series


IBuildings Blog:
PHP enters top 3 of most popular programming languages
September 21, 2009 @ 07:57:26

On the IBuildings bog today Ivo Jansch looks at a new step in PHP's evolution - its jump up into the top three on the TIOBE programming index (language popularity):

In their latest analysis PHP has entered the top 3 of most popular programming languages, and that is something that both makes us proud and provides further proof that PHP is still growing and here to stay. [...] What makes PHP's number 3 position remarkable is that the numbers 1 and 2 are very much general purpose languages. Java and C are pretty much used from anywhere from low level processes to desktop applications.

Some of the other languages in their top ten (according to their indexing tools) include Perl, Python, Ruby and Javascript.

1 comment voice your opinion now!
tiobe third place language popularity


TechRadar.com:
How PHP became such a huge success
September 16, 2009 @ 13:49:19

On the TechRadar site, there's a new article posted with an interview with Rasmus Lerdorf about how and why PHP has become such a huge success in the online development world.

Rasmus Lerdorf is undoubtedly the most famous Greenlandic geek alive. [...] Linux Format magazine caught up with him to find out more about his position in the PHP camp today and the decisions he made early on that made the project a whopping success.

Topics mentioned in the interview include his current involvement in the project, his role in any "final decisions" about the language and its future, what languages inspired him and his opinions on a few others that occupy some of the same space as PHP.

0 comments voice your opinion now!
success language interview rasmuslerdorf


KnowledgeTree Blog:
Why PHP Doesn't Suck
September 09, 2009 @ 12:54:16

With the number of "PHP sucks" opinions articles out there, it's nice to see one claiming the opposite. In this new article on the KnowledgeTree blog Daniel Chalef covers a few reasons he thinks the language doesn't deserve the bad press it sometimes gets.

From its original design as a way to create dynamic web pages, PHP has evolved into a language (and supporting environment) that is particularly well suited to rapidly developing web-scale applications. Examples of these include Facebook and Wikipedia. Unfortunately, its genesis prevented it from being taken seriously as an enterprise-grade language and environment, especially when compared to the incumbent 800 pound gorilla, Java. [...] Over the last two years much has changed.

He mentions the improvements in the language itself like a better object model and the encouragement of more structured development practices. Frameworks like the Zend Framework, CakePHP and CodeIgniter have gone a long way to help the language grow into the enterprise-level, powerful language it's become.

0 comments voice your opinion now!
opinion language



Community Events









Don't see your event here?
Let us know!


developer feature version codeigniter framework wordpress microsoft zendframework symfony joomla job performance sqlserver facebook hiphop release opinion extension windows conference

All content copyright, 2010 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework