Disclaimer: This blog post is going to be very boring for most people, but for those who dabble in web development it might perhaps provide a little interesting insight.
HallsHire.com has been running for over 12 years now, and version 3 of the site has just been launched.
To give you a bit of history, the original version was actually written in Perl, but that was replaced about 7 years ago with a custom built PHP version. Now that version too was terribly out of date. (It was probably the last site I built completely on my own PHP framework in fact.) Up until a couple of months ago CodeIgniter was my framework of choice (and I do still really love it), then I started dabbling with the next big thing in PHP MVC frameworks, Laravel, and I've been massively impressed with Laravel over the past few months, so thought I'd bite the bullet and embark on the long overdue re-build of HallsHire on the framework.
And it really was a big task. As with any site that's been added to over the years, the old cobbled together version of HallsHire had a lot of features and would take a great time of time to re-write them all, not to mention porting all the hall and user data across to a new format, and of course - keeping Google happy in the process.
Laravel is many things, but quick to work with isn't really one of them. I mean it is quick in many ways, but things like database migrations do slow you down initially. Although in the long run they make the code much more manageable and maintainable.
So as I said, the new site is built on Laravel 5.3, and makes use of the following:
Whilst much of the thinking behind the database schema had been done already, the process of actually re-creating and re-importing all the data across was a bit of a project in itself. There were about 4k users and the same number of halls to move, all with associated data spread across numerous related MySQL pivot tables. I wrote numerous scripts to loop through the old halls and user data, re-generate all the images and save them in a new location on the new site. All the time needing to maintain the same unique IDs (keys) that are required to link everything together in the database.
Keeping Google happy is essential for any established website whose traffic relies on organic search. So keeping URLs the same (or adding 301 redirects for those that needed to change) was essential.
When you do a keyword search on the site now the site uses the Google Maps Geocoding service to get lat/lng values for the destination in order to find halls in the vicinity. The API allows you to do 2.5k API requests a day for free, and when the site launched it quickly used in the daily allowance, rendering the search fairly useless for a couple of hours until the news days allocation was available. To combat this I implemented a local cache of lat/lng looks which solved the problem as many of the requests were for county and town names often repeated.
This was a bit of a challenge. The old site made quite heavy use of file caches and being custom built, was actually quite "light". When I first launched the new site I found the number of MySQL queries being used to load the pages was a little insane. However the Laravel Debugbar helped me improve my eager loading and reduce the number of SQL queries considerably. I then implemented initially a file cache, followed by a redis cache for storing full cached page results which really helped to take load off MySQL. I also got a little carried away with Google's pagespeed Insights suggestions and installed Mozjpeg on the server which losslessly compresses the uploaded images and saved in total about 29MB in disk space in the process. The process runs as a cronjob every hour, compressing any new hall images that have been uploaded.
The site already ran off an Amazon EC2 instance, but I also made use of another of the AWS resources and offloaded as much as possible to a CloudFront CDN in an attempt to further lessen the load on the web server. I've had to revert to loading the CSS files from the webserver for the time being, as the fonts were causing issues when loaded from a different domain than HallsHire.com, but I'll move the CSS across at some point too.
Today I've installed Mod Pagespeed which is something I've been meaning to try for ages, along with installing a Redis server and configuring it for use with my Laravel application. Both were super easy to do thanks to the kind people who wrote the great articles linked to previously.
I have a long list of things I'd like to build onto the site now I've updated the codebase of the old version. High on my list is providing statistics for halls, so you can see more information about who's visiting your page. Whether this includes using the Google Analytics API or custom stats remains to be investigated. I'm also interested in pursuing some kind of booking system for halls and incorporating this with the new calendar. One thing that might be quite quick to add is bigger and better pictures for spotlight and featured listings, and possibly even video-walkthroughs or Google Street view to really help potential hirers explore halls and their surroundings. Finally a bulk enquiry system, making it easier for people to submit the same message to lots of halls at once, perhaps with a 'favourites list' interface.
It's been 5 solid weeks of work, including late nights and weekends, (thanks to my day-job for giving me the time off), but HallsHire.com now has a great technical platform upon which to build new features and hopefully take the site to new heights and audiences. This version of the site really is a massive technical leap over the last one and despite a couple of bumps along the way is now super fast to use and the server is purring like a kitten.
Its vastly improved admin area also makes managing the site much quicker and easier; for even non-technical personnel. The search is better, the design is nicer. It's been built on top of a CSS framework with mobile responsive design in mind - this version works very nicely on a whole range of screen sizes and devices.
But aside from personal satisfaction, what I think of the site doesn't really matter a great deal. It's the users opinions that count, and hopefully you like the site too, and find it quick and easy to use; whether you're advertising your hall or looking for a venue for hire.
If you have any questions or comments on the new site or the technical blurb or ideas about new features you'd like to see on HallsHire, I'd love to hear them, so drop me a line.
It's been reported by one of our members that they have received very dubious enquiries from someone twice this year.
Sometimes people add listings to HallsHire.com, then move to a new area and nobody can update details for their hall.
You can now add Christmas promotions or discounts available to hirers of your venue. This can be anything from limited time discounts or offers, to special discount codes. For example, if you w...