PHP is general purpose web development technology. It’s around for roughly 20 years and the framework has seen many major updates/changes in years. PHP 7 is the latest release with many bug fixes and performance improvements. The report from BuiltWith and w3techs says PHP is most popular and widely used web technology.
My ideal setup is consists of tools that help me develop stuff efficiently.
- Manually installed Apache, PHP and MySQL
- Browser & extensions
Integrated Development Environment is a piece of software that helps programmers with auto code completion, syntax highlighting, debugging and profiling. I use NetBeans for many years. Well, I’m aware of PhpStrom IDE and its strengths over NetBeans. A survey suggests PhpStrom is preferred IDE choice of 38.3% business users.
Here is why I prefer NetBeans and why it’s good for any starter PHP developer programs:
- Free and OpenSource alternative
- Powerful IDE with code completion & syntax highlight
- Version control tools (GIT, Mercurial, and SVN) available out of box
- Debugging support (via XDebug)
- Code tempting support
- Cross platform availability
- Testing and code analysis
- Built-in Database explorer & SQL Editor
- Built-in Composer support
- FTP and remote debugging support
Manually installed Apache, PHP and MySQL
Many novice developers on windows machine use AMP stacks like XAMPP and WAMP for PHP development. I would rather prefer installing these elements manually. Especially MySQL gets a major performance boost by installing MySQL community server on a development machine.
The manual installation offers x64 bit setup for Apache, PHP and MySQL. You can take advantage of your x64 machine and help your boost performance a bit.
The other way would be to use a virtual machine and installing your preferred Linux flavor. Now install Apache, PHP and MySQL on top of it. You may replicate deployment like experience on your development machine. This might be bit complex if you are novice developer.
You may need to debug your code while working on complex logic. XDebug comes handy for debugging PHP projects. Kudos to Derick Rethans developer of the plugin. You can even configure your sublime text and notepad++ editor for debugging using XDebug. NetBeans provide seamless support for XDebug debugging. Below is the image how debugging window looks like.
A short note on how to install XDebug on windows:
1. Download XDebug appropriate for your PHP version.
2. Place the downloaded XDebug file: Path-To-PHP/ext/XDebug file
3. Write following to php.ini file
zend_extension = php_xdebug-your-downloaded-version.dll xdebug.remote_enable=1 xdebug.remote_handler=dbgp xdebug.remote_host=127.0.0.1 xdebug.remote_port=9000 xdebug.remote_autostart=0 xdebug.remote_connect_back=0
4. Restart your apache service. Debugging should work now.
GIT is a distributed version control system. It’s always a good idea to manage the versions of your code files. It would help you maintain more organized production releases. You will always have a way to get back to previous working/previous featured version of the code.
Install GIT on your system if you have already installed. While using GIT, you may also need GIT hosting service. Github is good for public repositories and it’s free for the public repository as well. But if you are a small team and looking for free private GIT hosting, then you can have a look at Bitbucket.
Browser & extensions:
I prefer to use Firefox as I’m big fan of firebug plugin. I use firebug for the console, NET, cookie lookup, element & style inspection and script debugging.
I also use REST client addon on Firefox which helps during REST API creation for any of my projects. This plugin is being used by over 148k users.
Additionally, I use the ySlow add-on which is available for both Firefox and Chrome. On a side note, if you are planning to use it under Firefox, you may first need to install Firebug. It gives important feedback about the website you open. It would be worth following the suggestion it gives after analyzing the website. It helps website load faster.
After deployment of the website, I check test with Pingdom for speed test. After a test, it shows the result and fixes that you can apply to your website to improve the load speed. Here is the snapshot how it looks like and how it shows results:
FileZilla is a free piece of FTP client application. It’s one of the best and popular FTP client applications available across the different platforms.
You can have multiple website entries into it, which you can connect with a single click. It also offers multiple FTP connections in a tabbed manner.
The application main area is divided into two sections. The left section is for your local resource and right section is for the remote resource. It allows sync between local and remote resources. Especially this is helpful with a large website with many directories. Opening any directory on local(left) will open the same directory on remote(right) and vice versa.
It’s very handy, featured and free editor for windows. It supports many different languages and syntax highlighting. It also offers code suggestion, spell checker, macro recording and FTP connection. It supports many plugins to satisfy your needs. It can also replace your need for IDE for smaller tasks on programming. It’s faster to load and provide way more features than any ordinary editors. For more information about features refer original guide.
It has been very helpful to me while editing code file, apache and PHP configuration file changes on the go. It would be very helpful to make it default editor/application for unknown file types with Filezilla. Once you set that, you can edit any files on the remote website on the go and save them back (Not ideal way indeed).
To fine tune and optimize your development experience you need a right choice of tools. If you are a novice or finding a way to start your development journey following these tools would be a good choice.
NetBeans, AMP(Apache-MySQL-PHP), XDebug, GIT, Browsers & extensions and Notepad++ software would fulfill all your development needs. You can always try tools and change them according to your need.
This article is written by Darshan Joshi. He is founder and CTO of AlphansoTech, a web - mobile app development and I.T consulting company. He writes technical and programming stuffs. He loves to help novice programmers by sharing how to guides, tutorials and personal programming experiences. Follow him on Twitter.