News Feed
Sections
News Archive


Community Events






feed this:

Debuggable Blog:
Make your life easier with these five CakePHP Quicktips
0 comments :: posted Thursday May 29, 2008 @ 15:23:48
voice your opinion now!

Tim Koschutzki has five quick tips for the CakePHP users out there to help make your lives just a bit easier:

  • The prd() convenience function
  • How to debug your CakePHP emails?
  • Use elements where possible and make them belong to the controller
  • Combine your h1 titles with Cake's page title
  • Avoid long parameter lists

Each tip comes complete with code and a brief explanation of its use.

tagged with: cakephp framework tip prd email element titles parameter list


Tim Koschuetzki's Blog:
Composing Methods Remove Assignments to Parameters
0 comments :: posted Friday July 06, 2007 @ 10:21:00
voice your opinion now!

In another part of his "Composing Methods" series, Tim Koschuetzki posts about removing assignments to parameters today - working with a temporary variable inside a method rather than the actual passed in value.

When your code assigns to a parameter in a function/method, use a temporary variable instead. [...] It will make your code much more readable and prevents by-reference confusion and therefore big problems in the future.

His example code uses the illustration of calling a price() method in a class to modify the inputVal value based on other inputted information. His suggestion is to not work with the actual inputVal value passed in (so as to avoid issues if it happens to be passed my reference later), but to work with a temporary variable - $result - inside the method.

tagged with: method compose remove assignment parameter temporary variable method compose remove assignment parameter temporary variable


database mysql zend PHP5 conference package pecl job zendframework cakephp security release application book releases code framework ajax developer PEAR

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