Maps and Parking Tickets

hereit.is and iwillpayyourparkingticket.com

Over the last few months, I've been kicking around a couple of little spare-time projects, and I've finally got round to writing a blog post about them. Both are fairly simple, but each represents a stepping stone in my efforts to bootstrap my brain into understanding the architecture and design of web applications.

hereit.is logo

First, http://hereit.is, a service for creating short urls for geographical locations. The idea is that you use the map on the homepage to find a location, and then create a short url to represent that location (such as http://hereit.is/brighton). You can then share this url by email, on the phone, on Twitter, etc. When the recipient(s) of the link visits the url, they are shown a simple landing page containing the map, with a link to Google Maps from where they can plan routes, see satellite imagery, and so on.

Despite its simplicity, hereit.is is built using modern web application principles. It has an MVC architecture and its design is quite closely based on that of Django. I decided to implement it in PHP (which I spend all day using at work), partly to prove to myself that it is at least possible to construct well-architected applications with this badly-assembled mess of a language. I now know that if I had used Django itself, the whole project would probably have taken me about half an hour - but the project itself wasn't really the point. The point was to learn how frameworks are put together, and I have definitely succeeded at that.

I also wanted to get my head around REST, so hereit.is has simple API which you can use to create locations, and retrieve GeoJSON and KML representations of places. See the API documentation for more information.

For the front-end design, I took advantage nifty CSS3 tricks, such as border-radius and box-shadow. The main page of the site uses no images at all in its design, the idea of which appeals to the minimalist in me (of course, the map itself uses images). Even the logo is a Unicode character, inserted into the heading text with the :before pseudo-element.

I was invited to give a talk about hereit.is at £5 App, the brilliant monthly-ish meeting organised by Ian Ozsvald and John Montgomery. I gave a fairly high-level overview of how hereit.is works, and the talk should be fairly accessible (I hope) to the less technical types. You can see the talk on Vimeo here: http://vimeo.com/5664789

£5 App #18 - Jamie on HereIt.Is from Ian Ozsvald on Vimeo.

i will pay your parking ticket logo

The second project is I Will Pay Your Parking Ticket. This is the brainchild of my friend Seb Lee-Delisle, who explains the idea much better himself.

He asked me to help out with the server-side implementation, which we decided to do with Django. It's fairly straightforward for the most part, with one or two interesting details, such as the method we use to select which tweets to show on the homepage (simple randomness turned out to be quite inadequate), and the Twitter search API integration. Fortunately, you can see how it all works for yourself, because we decided to make the whole project open source. You can follow or fork it at Github.

This experience has completely sold me on the benefits of Django. At one stage, we more-or-less completely tore the application apart and rebuilt it from scratch in a few hours. There's simply no way that would be possible with almost anything else. I've loved Python for years, so the ability to work on Web projects with it is fantastic.

Because of Seb's rock-star status in the Flash world, and his thousand-plus followers on Twitter, I Will Pay Your Parking Ticket has been pretty popular. We already have nearly six thousand votes in the database. Deciding whether or not random strangers deserve your sympathy is a strangely addictive experience, and a good way to waste your lunch hour.

Again, Seb gave a talk about the idea at £5 App, which you can see below:

£5 App #19 Seb and Jamie with I Will Pay Your Parking Ticket from IanProCastsCoUk on Vimeo.

So, that's a quick update on what I've been doing over the past few weeks. I'm trying to keep myself busy, with regular attendance at FlashBrighton and other events, as well as getting involved with the brand-new Brighton Hackerspace, BuildBrighton. I also managed to grab a ticket for BarCampBrighton 4 at the beginning of September. Hmm, I should probably decide what I'm going to talk about...

Comments

blog comments powered by Disqus