Welcome to the Byte Blog where we share our thoughts on design, technology, and occasionally, cats.
Flexibility is the key to resilience. The era of COVID-19 is showing us all how resilience is needed to adapt to real problems. With health guidelines changing week to week, we all need to be able to adapt quickly. For our friends at Villa Terrace and Charles Allis Art Museums we needed to help them reopen their doors in a way to ensure the safety of staff and visitors alike.
Luckily for the museums (and this developer in particular) Byte’s longstanding commitment to uncomplicated code ensured the quickest and cleanest path. Byte continues to search for clean, straightforward tech solutions even in the face of an uncertain world that is anything but uncomplicated. From uncovering the requirements of this project to searching for the perfect solutions, Byte’s previous investment in simplicity saw this project completed affordably and on time.
Villa Terrace Arts Museum - Milwaukee, WI
Re-opening the museum doors
At the onset, the scope of this project seemed simple: build a system that would help ensure the safety of guests and staff alike. The reservation system would include a form where a guest could select a date, time, and number of tickets. They would receive a ticket with a QR code to be scanned at the entrance. The idea was to keep contact between staff and guests to a minimum while ensuring that there was a limited number of people inside each museum at any one time. Like most things, what seems simple on the surface can quickly grow in complexity once you dive in. As the museum’s business rules continued to be discovered, so too did the intricacy required of the interface. Some of the basic questions that needed to be answered included:
- What days would the museum be open?
- How are we handling blackout dates and times?
- Is the date selected the first Wednesday of the month and therefore free all day?
- How are we ensuring that there are less than forty people in the museums at any one time?
- Is payment required and if so, how are we processing payment?
- What kind of tickets are being purchased?
The answers to these questions turned to business rules. What was required was a way to channel and funnel these rules to guarantee that they were being applied. We built a custom API (Application Programming Interface) that connected the front-end reservation form to our back-end server and then used existing code to help control and validate the data. We chose Square to help process our transactions, ensuring contactless payment. Thanks to a simple and clean infrastructure already in place, we were able to adapt the code, create a filter and take payment in a way that ensured each and every reservation is valid and, most importantly, safe.
Being able to easily adapt and connect into previous code was even more crucial as there was a time component associated with this project as well. With most businesses looking to be as agile as possible, it was important that we completed this project quickly and efficiently in order to get the museum doors open. By not having to build from the ground up, we cut massive amounts of time off this project, keeping cost low and ensuring timely delivery.
A modern ticketing system
Libraries we considered:
As developers creating a new application, interface, or element we are often faced with a choice: do we look for a library already written, tested, and implemented or do we build it ourselves? Obviously, both choices have their pros and cons. We knew we were going to need libraries for creating and reading QR codes. With the time component in the forefront of our decision making process, we decided to try and source a trusted library to plug into our code to generate the QR codes.
As always, the name of the game was simplicity. It seemed like every library we found was anything but simple, they all included dependencies and so many files that an “autoload” was needed to even run. This presented a major problem for us. We prefer simple includes whenever possible and we weren’t about to allow one of these dependency injectors to autoload unknown files into our production websites. We needed to find a library that was simple enough to allow us to manually inspect and drop those files where they needed to be.
Additionally, we wanted to add an extra layer of security by generating the QR codes on the server side, never accessible to prying eyes. Eventually we used a library called PHP QR Code as it is reliable, well documented and easy to include.
With the reservation system plugged into our API, the front-end reservation form was talking to our back-end server, validating reservations, processing payment as needed, and generating QR code. All that was left was to create the interface for checking guests in.
Contactless museum gates
With a library in place and a tutorial for getting everybody playing nice followed, we were scanning tickets. We again built an API to take the data scanned from the QR code and referenced it with existing reservations in our database. If and when the API found a match, we could check our guest in, all without any contact or exchanging of tickets. After the search for the QR Generator, it was great to find such an easy to implement, straightforward, complication-free solution to our problem.
Turning uncertainty into opportunities
This process of finding and making simplified tools was a perfect example of what we do at Byte. As a Junior Developer, it was an opportunity for me to see how the guiding philosophies of our past helped ensure a new solution was able to be implemented quick, cleanly, and with minimal fuss. For our friends at Villa Terrace and Charles Allis art museums, this translated to an affordable, timely, and safe reopening of their doors.
Interior of The Charles Allis Art Museum - Milwaukee, WI