News Feed
Sections




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

Shawn Straton's Blog:
Code Readability Part 2, Code Structure
January 19, 2009 @ 12:59:41

Shawn Straton has posted the second part of his look at code readability today. This time the focus is on the structure of the code - file structure, code layout, etc.

I've had the pleasure of maintaining a legacy application developed by people who were past deadline the second they had their assignment handed to them in the past and it can get really interesting rather quickly when you see how sloppy you can get when you are in such a hurry. Here are some guidelines I've given myself to ensure that the structure is correct at the end of the day.

Some of his suggestions include:

  • Breaking larger files apart into smaller, easier to maintain pieces
  • Correctly naming functions/variables/etc
  • Tabbing/spacing in to indent code blocks
  • Input validation and error checking should always be included
0 comments voice your opinion now!
readable maintain structure naming convention


blog comments powered by Disqus

Similar Posts

Yet Another Web Development Blog: Dear PHP, I think it's time we broke up.

Rafael Dohms' Blog: Book Review: The Art of Readable Code

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

Kevin van Zonneveld's Blog: Convert anything to Tree Structures in PHP

PHPMaster.com: Practical Refactoring, Part 1 - What is Good Code?


Community Events





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


unittest api release interview language podcast series list configure threedevsandamaybe laravel community version conference introduction opinion symfony composer framework voicesoftheelephpant

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