News Feed

News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

ZendCon 2006 Notes:
Best Practices for PHP Development
October 30, 2006 @ 15:26:55

Matthew Weier O'Phinney & Mike Naberezny, did a great job on this session. The talk went very smoothly, each of the speakers traded off on presenting the various sections.

The session also dealt with other collaboration topics (commincation using IM, wiki etc) however I with the PHP/Development issues.

Source Documentation

  • PHPDoc is the defacto documentation standard, it can be parsed by PHPDocumentor and Doxygen
  • Use @category and @package to manage your documentation
  • Using PHPDoc allows all developers to immediately understand your code

Unit Testing
  • Focusing on PHPUnit
  • Test religiously
  • Without tests, code is fragile and will regress - there is nothing to tell you when you break your code.
  • You are not wasting time by creating tests, you're wasting time by peppering your code with var_dump() and trying to debug code manually.
  • Learning to write good object oriented code that is testable takes practice and discipline. Learn to design for usability.
  • Test-First methodology allows the tests to become the specification of code you are writing.
  • Using Classes is not Object Oriented Design

Source Control
  • Source control was on the benefits of using SVN to manage your code.
  • Learn to use tagging and branching instead of committing everything to HEAD
  • Trac is cool (I caught up on emails during this section - great wifi)

  • Never edit code on the server
  • Check out tagged branches from your svc software
  • Deploy to a staging server on your production server, test first then modify the symlink.
  • Write acceptance and integration tests:
  • Monitor Health of Servers:
  • Store schema of your database by committing the schema into your svc server - suggestion: and pre-commit hooks
0 comments voice your opinion now!
security zendcon06 session notes shifflet security zendcon06 session notes shifflet

blog comments powered by Disqus

Similar Posts

International PHP Magazine: Poll Question: What Do You Look for in Frameworks?

Gareth Heyes' Blog: Exploiting PHP SELF

Zend Developer Zone: The ZendCon Sessions Episode 25: (In)secure Ajax-y Websites with PHP

Justin Silverton's Blog: 5 reasons why oscommerce is a nightmare

Zend Developer Zone: Move That Bus!

Community Events

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

podcast voicesoftheelephpant version opinion api extension php7 community library laravel security unittest language series interview release framework introduction laravel5 example

All content copyright, 2015 :: - Powered by the Solar PHP Framework