Main Content

Not just a PHP program - a good web application

Archive - Originally posted on "The Horse's Mouth" - 2009-09-29 23:46:20 - Graham Ellis

A very busy week so far ... station pickups, a PHP course, hosting an external luncheon meeting and hotel guests at Well House Manor, and providing a venue for, and attending, a meeting of the presidents of some of the local chambers of commerce to discuss towns working together. And it's only just the end on Tuesday. Wednesday will bring ... well, you'll read some of it here.

On Monday, I "tunnelled" through PHP, producing a piece of code that worked for a benign user who put in sensible data. It coughed slightly with 'silly' values - it was obvious it had failed, and it looked really crappy - but it wasn't actually an injection attack risk. ("No - It's not nice - I will NOT publish it here"). And on Tuesday morning, I took that code and I said DESIGN MATTERS - for the user, and for the maintenance programmer ... and I came up with the following list which I chose to implement to a lesser or greater extent - at least to an illustrative degree:

1. Code should be commented for programmer
2. Page should include instructions for the user
3. Forms should include a submit button, even if they only have a single input box which submits on "enter"
4. Code should echo user inputs
5. First page should not perform submission actions on nothing
6. Fields should usually be sticky
7. Data should be validated
8. Data should be secure against injection attacks
9. Common code should be grouped into functions
10. Generated HTML should conform to selected standard (XHTML?)
11. Program and design elements should be separated
12. Error messages should be good 'uns

You see - it's not JUST about making the algorithms accessible and workable - it's much MUCH more. Come to think of it ... as I write this note, I see that there are a few more things I should have done / documented. Some have been done already - second nature - others aren't actually present in my demo.

13. Help window
14. Search Engine Optimisation
15. Make it interesting
16. Should look good and be corporate branded!
17. Should provide support contact
18. Should provide links back to the calling ap / rest of site

Have a look at the running application. Have a look at the source code. See if you can work out which of those extras I have done something towards, and which are on my potential "to do" list.

There's a huge difference between a PHP script and a good web based application!


P.S. - part built program / source [here]