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

IBM Speaks:
Building Rock-Solid Code in PHP
Sep 18, 2002 @ 12:50:41

Over on LinuxToday.com this morning, they have a two new pieces in a series about programming good, solid PHP code rather than the off-the-cuff, haphazard scripts that so many developers start off with. Originally written for IBM, the two parts of this article offer some great tips and programming suggestions for everyone, even you gurus out there.

The first part of this series was posted here a while back, and offers tips like "Never think in pages" and "Separate code, content and presentation". They also talk about securing your code (a bit easier since the whole "register globals" thing happened), and the ever-popular "build for speed. nobody likes waiting."

In the second part of the series, they get more into the actual code, rather than the concepts, giving you correct and incorrect ways to create and use variables. They also talk about the proper way to create a config file for your application, and give you the code to parse it. Obviously, these "standards" aren't written down anywhere, but they are commonly used and do help with readability and functionality.

tagged:

Link:


Trending Topics: