Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: PHP Development Best Practices: PHP Coding Style Tutorial

This article by Tim Perdue at PHPBuilder.com offers helpful guide to some of the best practices in PHP coding style. Topics covered: Indenting, Control Structures, Function Calls, Using Comments, PHP Tags, and Strings.

Tutorial Details:

Best Practices: PHP Coding Style Tim Perdue

One of PHP's greatest strengths can also be a great weakness in the wrong hands. I'm talking about its forgiving nature. One of the reasons why PHP has become so wildly popular is because it lets very inexperienced web developers build powerful applications without much planning, consistency, or documentation.

Unfortunately, that means an awful lot of PHP code out there is sloppy, hard to read and impossible to maintain. I know because I've written a lot of it ;-).

To address this and a lot of other issues, a number of the core PHP developers and community members got together and started the PEAR Project, which stands for PHP Extension and Add-on Repository. To date, the docs and other fruit from the PEAR project have been pretty sparse and difficult to follow, so this article is an attempt to shed some light on what they're doing.

A pretty huge part of maintainability of code is how it is formatted and commented. All code throughout a given project should be formatted the same way. I'm a pretty big stickler about this in the SourceForge codebase and you should be too.


 

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
PHP Development Best Practices: PHP Coding Style Tutorial

View Tutorial:
PHP Development Best Practices: PHP Coding Style Tutorial

Related Tutorials:

GNU offers a new kind of Java IDE - JavaWorld - July 1998
GNU offers a new kind of Java IDE - JavaWorld - July 1998
 
Smarter Java development - JavaWorld August 1999
Smarter Java development - JavaWorld August 1999
 
Performance books put to the test - JavaWorld March 2001
Performance books put to the test - JavaWorld March 2001
 
Encapsulation is not information hiding - JavaWorld May 2001
Encapsulation is not information hiding - JavaWorld May 2001
 
Make bad code good - JavaWorld March 2001
Make bad code good - JavaWorld March 2001
 
Boost Struts with
Boost Struts with XSLT and XML
 
The J2EE 1.4 Tutorial
The J2EE 1.4 Tutorial is a guide to developing enterprise applications for the Java 2 Platform, Enterprise Edition (J2EE) version 1.4. Here we cover all the things you need to know to make the best use of this tutorial.
 
Bug patrol
Bug patrol
 
Java theory and practice: Kill bugs dead
Inspection tools like FindBugs provide a second layer of defense against common coding errors.
 
Java Servlets: Design Issues
This article covers the principal concepts associated with servlets. This article examines some of the design issues, and offers some guidelines on the applicability of Java servlets for web based application development.
 
The JavaTM Web Services Tutorial
A beginner's guide to developing Web services and Web applications on the Java Web Services Developer Pack
 
JSP Tutorial
This Tutorial is for beginners in the Java Server Pages Technology
 
Strut your stuff with JSP tags
Learn how to use the custom tags from the open source Struts library and create extensions that ease the coding of properties associated with field values and user input validation. The Struts package is part of the open source Jakarta project.
 
Welcome to the Apache Struts Tutorial
This is the complete Struts Tutorial. Explains ActionForm Action Class Validation Framework.
 
Develop MIDlets using the J2ME MIDP Development for NetBeans IDE 4.0
This release integrates with the J2ME Wireless Toolkit 2.2 to create a powerful environment for developing MIDP 2.0 applications.
 
Struts and Tiles aid component-based development
In the Java world, Struts is one of the best-known and most talked about open source embodiments of MVC.
 
Open Source Web Frameworks in Java
Open Source Web Frameworks in Java Open Source Web Frameworks in Java Struts Struts Frame work is the implementation of Model-View-Controller (MVC) design pattern for the JSP. Struts is maintained as a part of Apache Jakarta project and is open
 
We are providing Downloadable Version of Mandrake 10.1 Power Pack Linux CD's.
We are providing Downloadable Version of Mandrake 10.1 Power Pack Linux CD's. Mandrake 10.1 Power Pack Linux Now Available Mandrake 10.1 Power Pack CD's Power Pack is a Linux system that will appeal to all advanced users. It's great for Office
 
Building Search Engine Applications Using Servlets !
Building Search Engine Applications Using Servlets ! Building Search Engine Applications Using Servlets Please visit http://www.webappcabaret.com/javadevelopers/search to see running copy of our search engine. Introduction This tutorial takes
 
What is Web Hosting
What is Web Hosting What is Web Hosting? What is Web Hosting? If you have a company and want web presence than you need a website. With the website any one from the world must be able to view your pages, images etc. Website is actually a
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.