This weekend I took a day and a half and built Abbreviate, an URL shortening service1 on the CodeIgniter (PHP) framework I’ve been building for the next generation of Crowd Favorite web applications. Why build yet another URL shortening service? A couple of reasons:
- Exercise the application framework and see how well it works for rapid development.
- I needed a URL shortening library for several features in different web apps.
- As Corey puts it: The problem with URL shortening services is other people use up the good abbreviations.
So my service is an anti-social URL shortening service. To create a short URL, you have to log in – and I do not have registration enabled. 🙂 While you have to be logged in to create a short URL, anyone can use the created short URLs. This makes them useful for a number of things – for personal use or for distribution (if desired).
I grabbed abrv.me for the domain – 7 letters is short enough and the .me extension seemed appropriate. For the user interface I took an extreme minimalist approach, removing just about everything that I could while still providing some indications of functionality.
Abbreviate supports vanity URLs as well as auto-generated URLs that are as short as possible using standard base 36 shortening techniques (and some basic checking to avoid duplication).
An URL shortening service is a pretty good web application building exercise. It’s a small problem set so you can easily wrap your head around it and you can also expand it in various interesting ways if you let your mind explore the possibilities that are presented to you. Technology-wise, you get a chance to play with authentication, mod_rewrite, data validation, process and data optimization, etc. I recommend it as an app to build for beginning developers who aren’t already working on an app/project of interest.
There are a bunch of open source packages out there if you want something like this yourself. Or if you really love the Abbreviate interface and want to purchase your own version to use, let me know and we can set something up.