This is the example code from my Web Script Programming unit.
This repository illustrates the steps taken in the creation of the 2012 Web Script programming example code. For 'realism' Kit and I purposefully worked in a loosely-coupled fashion: Kit telling me roughly what was needed for his project, and me implementing it. I started my code (which is what you see here) and then integrated it with Kits' code when he made it available. The steps taken can be seen in the the Commit history and the issue log.
Our aim is to provide an example of how to work effectively within a brown-field environment, where you cannot control all the options and invent things from scratch to suit all your desires. All this whilst introducing everything that you need to have seen examples of before you start planning your coursework.
It's necessarily rough-and-ready. Customer work is so very rarely a green-field building expereince, and this unit aims to provide a level of realism.
It is worth pointing out that despite the aim for realism, this is a solution to a problem that has already been solved many times, and a solution that is designed backwards: i.e. it is a tool to introduce JavaScript, PHP and MySQL concepts. These concepts are discussed in the lectures. Hopefully the milestones and the order of checkins will provide some insight, but they need to be taken together with the lectures (twice daily with water) to make sense.
In summary, a real world solution would look different because we have an unwritten requirement of communicating how and why some very basic stuff works first, and then growing from there.
When possible, before being pushed here:
- HTML should be valid (HTML5)
- CSS should be valid (CSS level 3)
- JavaScript should:
- work (i.e. nothing is funamentally broken and stubs are used for capabilities that are in-development)
- give no errors in the console
- give no errors in jslint.com (with browser assumed and console allowed)
Students are encouraged to adopt a similar approach to managing their work. Rregularly checking code validity and operational capability results in writing better code from the outset.