Monthly Archives: May 2010

PHP: Conditionals Coding Style

Just to continue with PHP coding style, let me suggest a conditional statement coding standard. Just don’t use large three operands conditions like that: condition ? if_true : if_false If it’s too long it will be difficult to read and … Continue reading

Posted in PHP | Tagged , , , , , , , , | Leave a comment

Download Files with Zend Framework

Download a File The title may sound unclear enough, but the task is simple. You’ve to make a file download process within a Zend Framework’s controller. Let’s assume we’ve the DownloadController setup: <?php   class DownloadController extends Zend_Controller_Action { public … Continue reading

Posted in micro tutorial, PHP, zend framework | Tagged , , , , , , , , , | 4 Comments

PHP Coding Style: Large IF Statements

Have you ever seen some PHP code like that: 1 2 3 if ($condition1 && $condition2 && $string1 == $string2 . $string3 && $string4 != $string5 . $string6) { // write some code here!? } It is ugly, isn’t it? … Continue reading

Posted in micro tutorial, PHP | Tagged , , , , , , , , | Leave a comment

JavaScript Objects Coding Style

JavaScript vs. PHP Continuing from my post about PHP arrays coding style and following the comments of that post, I’d like to write a bit about JavaScript objects’ coding style. You perhaps know that the term object is quite undefined … Continue reading

Posted in javascript, micro tutorial, PHP, web development | Tagged , , , , , , , , , , , , | 1 Comment

The Difference Between .live() and .delegate and Which One Should be Used

There are so many posts about that topic out there, but I’d like to be rather breve! The delegate() method comes with the last major version of the jQuery – 1.4 and it gives a context to the event. So … Continue reading

Posted in javascript, web development | Tagged , , , , , | Leave a comment