Sep
18
2008

Zendcon Day 2 – Terry “the PHP terrorist” Chay

Terry Chay’s talk at the unConference was about ways to make frameworks suck less, this was an interesting topic because alot of Zendcon’s sessions are centered around their opensource flagship Zend Framework. The key point he made was that using a framework has consequences. If you decide to use a framework you’re stuck with all the decisions the creators of that framework made.

He also feels that the downfall of frameworks will be the pareto principle that says that 90% of your time will go into 10% of your work, this translates to 90% of edits will handle 10% of your code. Frameworks inherently live in the 10%/90% region, which means that the 90% of your code that usually takes 10% of your time will be handled by the framework. The pareto principle also dictates that the longer your site stays up the less of the work your framework will handle.

Frameworks fit between downloading solutions (like wordpress for example) or writing your own code and as such need to balance themselves between these two.

Another intersting point he made, that I agree with, is that in PHP, your bottleneck will be your database. Optimizing the database queries and connections can help ease this bottleneck but the thing is, frameworks abstract you from the database you want to optimize. The reason given by most frameworks to abstract you from a database is database independence. Which isn’t really neccesary in the real world because few companies switch databases anyhow. You should however write your code so that when your application needs to talk to the database it’ll use a single point in your architecture (models?) which allows you to have that database specific code as a single point of auditing and optimization, if you do ever need to change databases you only need to change that code.

It wasn’t all bad for the frameworks though, the areas where frameworks rock are small sites (small development investment), enterprises that typically don’t have the web as a main source of revenue so they can suffer waste there. Also, enterprises hire and lose people all the time, if you’ve got a developer that’s trained in a framework he can hit the ground running.

Finally the challenges that Terry sees for PHP are AJAX (RIA’s) and memcached. As far as AJAX goes, it handles most of the GUI coding, and with the AJAX frameworks that are becoming better by the day the 90% of code that used to go into your PHP views now can go to AJAX where you can save time. PHP will loose it’s place as a view and will merely be a data access layer. For memcache, currently the database is the slowest part of your application, with memcache this changes and it makes PHP the bottleneck.

Very intersting talk, loved it as usual.

Written by admin in: zendcon08 | Tags: ,

No Comments »

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress | Aeros Theme | TheBuckmaker.com WordPress Themes