May 21, 2013
Vikas

A Guide to a Become a Better Developer

PHP is perhaps the most accepted and admired web development language right now. According to a study approx 20 million domains are using PHP including popular websites like Wikipedia, Facebook and some of the biggest open source projects like WordPress and Drupal.

In this article we will discuss on some of the points that makes a good developers. All these points were chanted by my professors during the course study. If you are just taking a step in PHP, hope these points will help you in taking a stand.

  • PHP Core Functions and Classes: PHP core function and classes will help you to take advantage if you are trying something general. There are PHP manuals for the help of young developers. You can check it before creating your own functions. For example you don’t need to create a function to remove the white space. There is trim () function for it. Similarly you do not require building an XML parser for RSS feeds when you have PHP’s XML Parser functions.
  • Creating a Configuration File: The database connection setting should be well configured. You just need to create one master file containing all the setting. Later include the file in your PHP script. It is also suggested that you should bring in amendments in the master file when required. This file will also help you in using other constants and functions throughout multiple scripts.
  • You should always sanitize your database inputs. It is necessary to avoid SQL injection. You should learn about popular ways to compromise your app. Secondly you should have good knowledge of SQL injection. Read several examples of SQL injection and quite often check SQL injection cheat sheet.
  • In the initial stage of php web development you should leave error reporting turned On. It will allows you to see run time errors that will assist you in quickly identifying the origin of the errors. The run-time configuration can be set up in server’s php.ini file or you can also set them on top of your PHP scripts (using the ini_set () function to set display_errors to 1.
  • The sooner you will know about your errors, the faster you will be able to fix them. And when you’re done building your application, turn error_reporting and display_errors off.
  • Avoid over commenting your code. It is recommended that proper documentation of code through comments should be maintained. However avoid commenting on every single line, only comment the complex parts of source code so that you are aware about the happenings in every next visit you make.
  • Being a developer you will get several chances to code same thing throughout your career as a PHP developer. To save your lot of time it is suggested to keep a code snippet. You can take the help of several applications to synchronize the code snippet collection. Some IDEs like Eclipse may have built in features for storing code snippets.
  • It is your editor where you will spend most of your time. Using good source of editor will help you save lot of time. You must try as one of the software feature. Other advantages include code hinting, code navigation and built-in debugging tools. All these features end up saving lot of time.
  • Apart using MySql administration tool and a PHP Framework is sure to help you out in your entire career of PHP developer.

Share and connect with experience PHP developers and seniors in your industry. They are sure to help you out in php web development at the hard time of developing code.

Leave a comment