Archive for June, 2009

Developing the Backend of veerMe

June 29, 2009

The development of veerMe required not only the writing of client-side Javascript fo the more obvious funtionality and communication with the Google Maps API but splatterings of server-side code in the form of PHP to save and retrieve different types of data.

This post is just a quick reflection on the methods used to achieve the necessary functionality.

Saving Routes

Once a user has created their journey they can save it as a link to then access again at a later date.

Click here to view commented PHP for this action.

Viewing Routes

eg. http://veer.me.uk/r/?route=pneakv

To retrieve the route information I use the GET super global variable function to retrieve the ref value from the URL the user entered then et up a database query to get the information before feeding it into JS. This page was rushed (it was close to hand-in!) otherwise the JS would not be inline. I’m unsure as to whether or not there might be a better way of dynamically setting JS variables using PHP, if there is please let me know.

Click here to view commented PHP for this action.

Rating Suggested Locations

I previously blogged about finding a solution for a discreet location ranking system. My solution was to generate a rating for each location that was essentially just a percentage of times a place was added to a route compared to how many times it was suggested.

For example, once a user decides to add a point of interest to a route a JQuery AJAX function posts to a seperate PHP page the id of the point of interest and a boolean indicating whether or not it has been used.

Click here to view commented PHP for this action and see how it then deals with the posted information.

Third Party APIs

Because of security restrictions it is not possible to connect to XML files on different domains. The easy workaround for this is to use curl. Click here to see code.

———————————————

That’s all for now, its probably the most interesting PHP use from veerMe but there are a few more examples.

Screengrab 09

June 23, 2009

Hello fans/casual readers (ha ha ha),

This is my first blog post in quite a while, there is a lot to talk about. To summarise here are some things that have happened to me in the last few months:

  • I completed and submitted my dissertation. Huzzah!
  • Ditto with regards to my major project.
  • I helped to organise the Interactive Media Production graduation showcase at Free Range (London) and at the Un (Bournemouth).
  • The Modern Beardsmiths (of which I am a part of) completed their first festival appearance at BeachBreak Live 2009 (well, there wasn’t a beach but nevermind). This involved talking to a lot of people and selling face-painted-beards. A lot of fun and a bit of a tan is the result of this. A couple of other beardsmiths are doing a similar thing at Glastonbury this year, unfortunately I am not, so go check them out at the Shangri La area and GROW A BEARD!

Now, I am looking for a job so if anyone knows of any front end web developer roles going free please do get in touch!

Expect more indepth blog posts covering each of the above bullet points at a later date.

Peace out, enjoy the sun and festival season (if you’re going to any!).