After doing mobile development professionally for two years, I decided it was time to remove the rust in my web development skills. For that, I built flytogether.hitnail.net. It solves a problem I recently ran into when looking for travel destinations for me and a friend living in another country in Europe. None of the most services I looked into (Skyscanner, Kayak, Google Flights) provide the functionality required for this kind of query: finding flights from multiple origin locations to any destination on a given date.
I developed the whole thing using Clojure(Script) and the Skyscanner API. Those are some of my learnings, from the point of view of someone with previous PHP and Rails experience:
- There are many choices in libraries in parts of the stack, and they are fairly independent from each other. In my case I chose Compojure as the routing library, Stencil as the templating library (mustache) and plain JDBC for database access, as I didn't need an ORM. There's no canned solution like Rails, where all of that functionality is already provided.
- Sharing code between front-end and back-end is very easy. I created a
src/cljcfolder and specified on the project file where it was located. No crazy setup.
- Packaging the app is as simple as running the uberjar task in leiningen, and making sure that it's using the AOT compiler. The resulting archive is rather big (91.5 Mb), but it has only one dependency: the JVM.
- flexbox is awesome!!! For the first time in my life I was doing CSS and not raging. It allows you to easily implement very modern webdesign techniques such as vertical centering and sticky footers without anger and deep frustration.