Home     Publications     Articles and Projects     PhD Thesis     Links    


Rapidly Developing Web Applications in PHP

To develop database applications quickly it’s useful to have a framework library to do the routine stuff like displaying forms and reports. For my work with Vinyl Matt Media, I developed a library from scratch, and it has turned out to be useful. We have used it to develop our two main products - “Fast Reach”, which is an application for content management in hotel websites, and “Book Serve”, which is a booking engine.

These applications all have a common structure - a public facing website, with pluggable components for display of data from the database, and a configuration and content management system, for maintaining the data.

The framework library has the following components:

Forms - For displaying tabular data, adding, editing and deleting records

Input handlers - For inputting and validating data of various types - strings, money, dates and times, colours etc

Database abstraction layer - PHP doesn’t seem to provide this, so we have an abstraction layer allowing us to plug in either a MySQL or sqllite or any other SQL database

Multilingual functions - Many of our public websites, especially those in the hotel industry, appeal to people all over the world. Our forms library can handle multilingual input, while we fall back to machine translation whenever a translation is not available for a particular input field. We use a web service to provide the translations to our translation cache.

Reports - Given a set of field descriptions, we can automatically generate queries for reports and display the report data

Login and session management - login screen, check password, initialise and end session, permission verification for each page.

Menu - menu and submenu items are stored in an array for easy maintenance. These are rendered at the top of the screen as a menu to access the various form and report pages in the application.

One interesting example of our reuse of this library has been the Gallery Access website for the Irish Museum of Modern Art. For this website, we were given a large set of data about artworks and rooms in the museum and were asked to make a virtual gallery, allowing anyone to take a virtual tour of the gallery and read about the artworks. We build the database and forms for the artworks and rooms and made a public website for navigating the rooms and artworks.