logo
logo

Get in touch

Awesome Image Awesome Image

Development May 19, 2014

How to be a good php programmer

Writen by Taeyaar Support

comments 0

There are some very powerful tactics that make the php programming very easy! But some people don’t even know about the basics of these tactics. If you want to be a good php developer then you must meet every requirement given in this article. Yeah, a good php developer will have all these requirements in their skills. Alright, here is some of that requirement to be a good PHP developer:

Use A Good Editor

Using a good editor will help you by consuming less time writing the codes, making the error detection easy allow you to offer some sort of side-help while developing a php application. Some of those good editors are:

  • Dreamweaver [Adobe Product, also supports database connection directly from the editor].
  • Notepad++
  • Alleycode HTML editor [ To highlight syntax of php ]
  • WebMatrix
  • phpStorm
  • phpDesigner
  • Jedit

All these editors are best for php IDE. Some of these are free and others are paid and available for trial.

Commenting

Commenting is much recommended while developing a PHP application. You should always comment with the coding and never think like this” I’ll remember this “. You can’t remember that bunch of codes in all scripts. The comment is a good habit in PHP. But over-commenting is a bad habit. Yeah, over-commenting. Someone people define every single line while developing a PHP web application [I do but only in tutorials]. A good example of commenting:

?

 

 

 

 

 

 

 

 

 

<?php//Mysql connection;

$host = “localhost”;

$pass = “password”;

$user = “root”;

$db = “Database”;

mysql_connect($host,$user,$pass);

mysql_select_db($db);

//End of Mysql connection

?>

This is an example of over-commenting while developing a php script:

?

 

 

 

 

 

 

 

<?php//<span id=”IL_AD11″>Starting</span> Mysql connection;

$host = “localhost”;//hostname

$pass = “password”;//mysql password

$user = “root”;// mysql username

$db = “Database”;//mysql database

mysql_connect($host,$user,$pass);// mysql connection

mysql_select_db($db);// select a database

//End of Mysql connection

?>

Create A Global File

A good php developer always makes a config file for the configuration of all php webpages, like mysql connections, sftp connections, etc. also a logo, navigation bar and footer should be made in a separate.

File for all php web pages, I mean one file for all web pages which can be included in the web pages using require_once or include command. This reduces the efforts to be made while updating the whole website’s navigation, logo or footer detail. In most of open source internet software, you might see that there is a config file, with different names like config.php etc. where you have adjust your database or server details. If the developer didn’t make that config.php, you have to open each web page and edit it one by one. So this requirement has made a configuration file.

 

 

Stay Connected With Other PHP Developers

If you say, you know everything about PHP; you can’t get success in the field of PHP. You need to stay connected with other PHP developer, then you might find that what you are doing right now can be done in a good manner and with less code. That’s how the world actually works. You can join various web development forums; join their pages on social media networks to stay connected. There are lots of ways to get connected. All you need is a good attitude, which shouldn’t be an obstacle while learning from others.

First Plan Second Code:

70% php developers do not plan before coding. They just start coding and they think they are cool doing their coding with any planning. But that thing, don’t let them be a good PHP developer. A good php developer, first plan that what he/she is going to code and then make an algorithm in his mind or digitally and at last he/she starts to code.

Share Your Coding!

Most people do not share their coding, I don’t know why, but maybe they think others will get your ideas or script. But that’s a good choice for a web developer. If there is an error and you don’t have answers for that, you should share your coding with other PHP developers. They won’t eat your script, but they’ll help you in solving your problem. Take it easy, nobody can harm your project, if you share a little piece of work.

Never Say ‘I Quit’

A good PHP developer never says ‘I quit’ while developing a complex php application. Practice is the key to success, keep practicing and everything will be fine. If you are quitting your project now, you won’t be able to do that thing again in your life. So be brave keep practicing and try to meet all the requirements I’ve discussed.

Tags :