PHP Resources

Dynamic Web Development

return to home page

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

Installation & Configuration

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 tools

MySQL databases can be maintained with the MySQL client that gets installed with MySQL. However, a GUI interface can often make life easier...

Tutorials

Web Application Structure

MVC - Model-View-Controller is a pattern often used to define the architecture of a web-site:

Web-sites

Web-sites that I have found useful for ideas, reference, forums, etc:

Magazines

Books

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.

  • Rees, D; (2015); PHP Pandas (PHP7!); LeanPub
  • Welling L & Thomson L; (2008); PHP and MySQL Web Development (Developer's Library); 978-0672329166; Addison Wesley (NB 4th Edition - 5th Edition due out March 2016)
  • Shiflett C; (2005); Essential PHP Security; 978-0596006563; O'Reilly (NB also available via Safari - access via the DMU library)
  • Alshanetsky I; (2005); php|architect's Guide to PHP Security; 978-0973862102; Marco Tabini & Associates
  • Zandstra M; (2008); PHPObjects, Patterns, & Practice 2nd Edition; 978-1590599099; APRESS
  • Ballard T & Ballad W; (2008); Securing PHP Web Applications (For Mere Mortals); 978-0321534347; Addison Wesley
  • Sweat JE; (2005); php|architect's Guide to PHP Design Patterns; 978-0973589825; Marco Tabini & Associates
  • Jansch I; (2008); php|architect's Guide to Enterprise PHP Development; 978-0-9738621-8-8; Marco Tabini & Associates
  • Shafik D, et al; (2007); The PHP Anthology: 101 Essential Tips, Tricks and Hacks, 2nd Edition; 978-0975841990; Sitepoint
  • Yank K; (2004); Build Your Own Database Driven Website Using PHP & MySQL; 978-0975240212; Sitepoint
  • Allen R, et al; (2008); Zend Framework in Action; 978-1933988320; Manning Publications

Security

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.

Frameworks

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.

PHP User Groups

User Groups meet on a regular basis for talks, demonstrations, beer, socialising, etc. UK-based user groups include:

Blogs & web sites

  • Anthony Ferrara: Blog
  • Lornajane Mitchell: Web site
  • Derick Rethans: Blog
  • Chris Shiflett: Blog

On-line Support and Mentoring Groups

PHP Developer Conferences

Podcasts & Presentations

  • PHP Podcasts: Voices of the Elephant
  • De Montfort (09/12/14).  Title: Next Steps in Software Engineering.  Presentation given by Kiel Goodman of VivaIT: Powerpoint Slides
  • De Montfort (26/3/09).  Title: PHP in the Real World.  Presentation given by Ivo Jansch of Ibuildings: Powerpoint Slides