 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Fabien Potencier's Blog: Templating Engines in PHP
by Chris Cornutt 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.
voice your opinion now!
template engine language twig
Vid Luther's Blog: Changing MySQL storage engine for one table in your Propel/Symfony project
by Chris Cornutt September 29, 2009 @ 08:26:15
Vid Luther has a new post to his blog showing how to switch the storage engine only one (or any number of individual tables) in your MySQL-backed Propel/Symfony project.
I need one MyISAM table in my schema, I'm using Symfony 1.2 and Propel 1.3. As flexible as Symfony and it's YAML files are, Propel currently doesn't allow you to change the storage engine on the fly. [...] So, the next best thing to do now is to have it so that when Symfony runs propel:insert-sql, I can piggyback my own SQL to it. Luckily, this is possible, and it's explained here.
He gives an example of how he's doing it - making a simple alter table script, putting it into a SQL file and pushing it out into the project's setup via a "propel:insert:sql" command.
voice your opinion now!
symfony storage engine mysql change tip
Enterprise PHP Magazine: How Many Perl, PHP, Python and Ruby Developers Are There?
by Chris Cornutt June 22, 2009 @ 07:57:54
The Enterprise PHP Magazine has pointed out some facts (slightly skewed, it seems) about the availability of a few different types of programmers, PHP included, according to several search engines.
I updated the estimation so we can have most accurate results. The table below illustrates the results found, I have just truncated Bing results to 1M to have more readable chart, after all I don't believe there are 50M resumes indexed by Microsoft - and that's another topic.
The results show about 780,000 PHP-related resumes on Google, 541,000 on Yahoo and the (obviously incorrect) 59,700,000 from Bing.com. There are a lot of PHP developers out there, but I can't imagine quite that many. Either way, even the numbers from the other search engines come in over the counts of the other three languages.
voice your opinion now!
engine search developer ruby python perl
Antony Dovgal's Blog: locating bottlenecks in PHP code with Pinba
by Chris Cornutt May 05, 2009 @ 08:47:21
Antony Dovgal has announced a tool that can help you find out where issues are in your code - specifically places where too much work is being done and gumming up the works. The Pinba statistics server for PHP that gathers UDP data from the PHP processes and makes it available for parsing/graphing.
What is it? It's a daemon gathering information sent by PHP processes by UDP. In the same time Pinba acts as a read-only storage engine for MySQL, so you can use good ol' SQL to access the data. [...] There is no need to store that information for further analysis, therefore Pinba doesn't actually store the data - it keeps it only for 15 minutes (you can change that, of course), which is more than enough to update graphs.
You can find out more about the project on its (wiki) site including links to the latest downloads (version 0.0.3 at the time of this post).
voice your opinion now!
bottleneck pinba statistics server mysql storage engine report graph
Kae Verens' Blog: Hosting multiple sites from the same CMS engine
by Chris Cornutt January 21, 2009 @ 10:21:33
Kae Verens has a few tips to help simplify your life with your current content management system by using one code base to run multiple sites.
I haven't studied how other engines do it, but here's how I do it. First off, some benefits to sharing the CMS across separate sites: reduced resource usage, easier upgrades, easier bug-fixing. Convinced yet? Of course you are. Here's how you do it.
There's four steps to his process:
- Separate out the site-specific files from one another
- Serve all site-specific files out through a "proxy" script that can intelligently grab the needed ones based on the site
- Override the default configuration at request time (forcing it to use that "proxy" script)
- Create that proxy file that the web server can funnel the requests through (his example is included).
voice your opinion now!
host multiple website cms engine site specific configure proxy
Jani Hartikainen's Blog: What would make template engines actually useful?
by Chris Cornutt January 19, 2009 @ 08:44:10
In a recent blog post, Jani Hartikainen looks at a two things that might make templating tools a bit more useful - better than just dropping data into a template.
Most template engines simply wrap PHP (or some other language's) syntax into their own syntax, and maybe they look a little bit cleaner when mixed with HTML. Some may even provide useful features like automatic variable escaping to prevent XSS vulnerabilities. But does this actually significantly reduce the amount of code needed to write some common scenarios, or make it easier to read/manage the code?
His two things revolve some bits of more advanced functionality - automatic table display (given whatever data) and automatic filtering of the data to make of less hassle on the developer/template designer. He even mentions an interesting idea of putting callbacks or validation checks into the actual XML definition tags for forms.
voice your opinion now!
template engine useful filter table generte attribute callback
|
Community Events
Don't see your event here? Let us know!
|