This article or section is in the process of an expansion or major restructuring. You are welcome to assist in its construction by editing it as well. If this article or section
This article provides detailed instructions for setting up your workstation as a PHP development environment, not only for Joomla! it also should work fine for PHP development in general.
Note There are many possible configurations for doing PHP development environments. Any environment that supports the basic AMP stack (Apache, MySql, PHP), Subversion and/or Git should be fine.
The PHP language code represented just by plain text that can be edited with simple text editors like:
But when you are about to work in more advanced and complex projects and need some coding assistance there is a handful of development tools called IDEs (Integrated Development Environment) these are some of them:
As new emerging technologies we got other kind of editors available as an alternative to the traditional simple editors or desktop IDEs applications, among them we got:
To empathize some of the advantages of the use of IDEs over simple text editors we got:
Some of the advantages of simple text editors are:
All these advanced tools facilitate the development of PHP code, debugging, and the integration of other tools like SVN or GIT clients for source code version control under the same IDE, but for this article we are going to focus on how to configure Eclipse IDE for our PHP development environment, feel free to add more editors and document them in the following list.
To develop and test our PHP projects we need to execute the code in a web server capable of interpret PHP code and send the output to our browser, is good to know that we have a nice range of opensource tools to deploy a PHP webservers for our development environment such as:
Also there is other commercial closed-source options such as:
All these options for web services can be used for the development of PHP projects, but for this article we are going to focus on how to configure a XAMPP server for our PHP development environment, feel free to add more web servers configuration and document them in the following list.
Debugging tools are quite useful when you are developing a PHP project and you want to study how your code behave step by step on each line execution of your code, also these debugging tools let you see the real values of variables and objects and set new values on the fly for testing purposes, you can also create expression to check the outcome without modify your code.
Old school and hardcore PHP programmers don't fraternize much with these kind of visual tools and they prefer to debug their code the old way using php:var_dump and other methods to display and analyze the output of the PHP code, is up to you what kind of tools you want to implement in your development workflow.
There is several alternatives for PHP debugging, some of these are:
To empathize some of the advantages of the use of this kind of debugging tools we got:
All these options for PHP debugging can be used for the development of PHP projects, but for this article we are going to focus on how to configure Xdebug for our PHP development environment, feel free to add more debugging alternatives and document them in the following list.
Don't you hate when you are coding and suddenly by accident you just deleted a big chunk of text and there is no backups of that file to restore those important lines of code?, don't you hate when you are working with 2 or more developers in a project and everyone have a different copy of the project then comes the day of merge all those changes in one final project but everything goes wrong or the project does not want to run properly because some one just overwrite your work?, for all this problems and many more exist some nice tools to bring you the solutions you just need, some of these tools are:
All these options for software versioning and revision control can be used for the development of PHP projects, but for this article we are going to focus on how to configure GIT for our PHP development environment, feel free to add more software versioning and revision control alternatives and document them in the following list.
To read the full definition of a project build system you can go here but in short, the project build systems help you to automatize those tedious and repetitive tasks that developers got to do in several stages of the development of a project, some of this tasks are:
Looking at project build systems from another point of view we can say they are a tool to automate complex tasks or little tasks such as:
A simple thing like the development of a Joomla! extensions such as a simple module could need the use of a project build system to gather all the information dispersed about the module in the Joomla! folder structure and put it back to the typical package structure of a module package with a simple build command, this could save you several minutes and headaches when you try to build a module or any extension manually and misplace a file or skip one of then in the final package. Consider your self some time to learn the proper use of project build systems and make them part of your regular development workflow.
Exist several options for project build systems out there, some of those are:
All these options for project build systems can be used for the development of PHP projects, but for this article we are going to focus on how to configure Phing for our PHP development environment, feel free to add more project build systems alternatives and document them in the following list.
Any decent project is complete without a project management system, this applications helps the developers, users and community to the planning, organization and administration of the resources of the project such as time, developers, goals. Mores sophisticated and complete project management systems comes with issue tracking, documents & files management, wiki, forums, blogs, SCM integration and more, some of those tools are
When you work in a project in a project with other developers is a good idea to define a strategy and define a development protocol to a have a well defined workflow among the different states of a project. Whiting the strategies needed to have a pleasant work journey is choose the right tools for the right task, some of these tools are freely available on Internet such as: