Page last updated on
Maintained by cfi@dmu.ac.uk
Hopefully this page will become a useful resource for developing dynamic web applications in PHP, using MariaDb for persistent storage and Apache as the web-server. The intention is to refer mainly to Open Source tools.
Contents
Downloading & Installing the XAMP stack
You will need to start by downloading the latest versions of the AMP stack software from the web-sites below. This software is free to download and use, although if you are developing a commercial application you will need to read the specific licensing requirements of MySQL.
The WAMP alternative; downloading and installing this software will create a complete (configured) AMP development environment on your machine with a user-friendly interface for eg starting and stopping the various components, a MySQL GUI interface, etc.
If you have issues installing or running WAMP then XAMPP or EasyPHP are worth trying.
Other databases are available: Firebird, Oracle, MariaDB
If you prefer to use Linux, then this is useful: Creating the AMP stack on a Ubunto server
Now you have downloaded the individual components of the AMP stack, they need to be installed. I tend to install all this software in a dedicated partition on the HD, but keeping it together in a folder on the C drive works fine.
Once the AMP stack has been installed, there are a couple of files (php.ini & httpd.conf) that require editing to configure Apache and PHP.
No self-respecting PHP developer would be without Xdebug
Integrated Development Environments
You will need some form of text editor to create and debug your PHP scripts. This could be Notepad, VI (for the NIX users, although I think you have to be a masochist to enjoy using this!), but it makes sense to use a PHP-aware application which will colour your code for you, and may give specific debugging assistance. Read reviews and comparisons of the available choices.
MySQL databases can be maintained with the MySQL client that gets installed with MySQL. However, a GUI interface can often make life easier...
MVC - Model-View-Controller is a pattern often used to define the architecture of a web-site:
Web-sites that I have found useful for ideas, reference, forums, etc:
Books are sometimes out of date almost as they are published. If you are seeking a book to teach you how to code PHP, then be careful to only use texts that refer to the latest version of the software. They should include sections on using objects, security issues and hopefully the MVC pattern
This list is by no means exhaustive, and is not given in any particular order. However, I particularly like the PHP books from Apress, Sitepoint, php|architect and O'Reilly.
Security is a topic that is often ignored or overlooked by PHP developers. Poorly implemented web-applications have given PHP a bad (and unjustified) reputation.
Security is a relative rather than absolute concept. It is not a case of if your web-server will be probed by a malicious user, but rather, sadly, when. As a web-developer, it is your responsibility to make your application as secure as possible. The most common mistake is to trust input; remember - all input is evil until proven otherwise!
Listed here are web-sites that discuss securing your PHP application.
A framework is typically a series of coherent classes typically organised into a Model-View-Controller (MVC) structure to give a tool kit that enables developers to rapidly implement a web-application. The MVC pattern promotes structure and re-usability of component classes. There can be a steep learning curve, and each framework has it's own advantages and disadvantages, but web developers would normally be expected to be familiar with at least one of these.
A PHP Frameworks tutorial discussing the use of Symfony, Zend and CakePHP. At the time of writing, these were probably the three most popular frameworks.
A comparative list of PHP frameworks
Content Management Systems (CMS)
A CMS is an application that allows a user to create and edit content. A developer will be able to use a standard set of modules (eg blogs, wikis, forums, etc); missing functionality can be added by developing further modules.
User Groups meet on a regular basis for talks, demonstrations, beer, socialising, etc. UK-based user groups include:
On-line Support and Mentoring Groups
There are many other conferences, and new ones are regularly appearing...