Following on from my previous post I wanted to highlight some of the other things I am attempting to do with this site.
The events “system” was implemented over a year ago now, originally it was a way for me and Lloyd to keep track of the various events that we wanted to attend and get photographs of - a web version was the preferred way of doing it rather than the simple spreadsheet that we used for a few weeks but soon got frustrated with.
The original version of the events system was just a single table with the basic information about the events we were interested in and was then simply displayed on a page, the information was merely things like name, location, date / time and URL.
Soon enough more and more things were added, the most notable additions were an email notification system (which emails us when the event is 7 days away) and more recently the integration with my main site. The data being held in the table grew and the system is currently split into 2 different areas, a “public” view, which shows only the events I want to make public on the Events page and only displays basic information about the event, and a “private” version that shows every event and all of the information associated with it, for example if there are tickets required or any notes that I have added about it for personal use - This is of course integrated with my new login system depending on what user level your account is.
As with before, this system was built in stages over time and with differing techniques as I learnt more and more about PHP development (It was a mix of procedural PHP and functional PHP so there was business logic and other code all over the place), this became a problem when I needed to integrate the system with other projects rather than just my site, because there was no common structure and without recreating the system on a different server (which wouldn’t be a very manageable solution to the problem, and would only have served to negate the issue) it was practically impossible to use for anything else, in short it wasn’t written in a reusable way.
So with this in mind it became my aim to bring the whole thing into the Object Orientated world and from there create an API for my own use (and others if they wanted) to pull data out by creating a REST Web Service and returning the data using standard XML.

An example of the XML output
Now that I have created the API I am free to use the data on any system simply by calling the API and parsing the XML data returned, and all in a very easy and manageable way, this means that not only can I use the data for other sites I make if required but I can also use it for my final year project, a double bonus if you will.
A bit more information about the API can be found at www.mylesnoton.com/services/api/ documentation will be added in the near future.
It is unlikely that anyone apart from me will want to use the API, but it will help me a huge amount and if one person finds it as useful as I will then it was worth it!























