Part 1 | Part 2
Table of Contents
- A bit of background
- Advantages of Laravel
Laslo Horvath (Senior Laravel Developer at Tag1) joined Fabian Franz (Senior Technical Architect and Performance Lead at Tag1), Michael Meyers (Managing Director at Tag1), and me (Preston So, Editor in Chief at Tag1; Senior Director, Product Strategy at Oracle; and author of Decoupled Drupal in Practice) for a Tag1 Team Talks episode that explored a Tag1 project for a large enterprise website having millions of active members and thousands of local affiliate chapters. We talked at length about how leveraging Laravel led to unexpected benefits in developer experience. In this two-part blog series, we'll cover some of the most salient conclusions from our discussion and why you should consider Laravel for your next enterprise-grade website project.
A bit of background
Tag1 recently completed a substantial implementation for a large United States-based client that manages memberships for millions of people across the country. The organization is made up of over three thousand affiliate chapters that are managed by local groups, which in turn roll up into state and regional groups. As readers can imagine, such a massive organization inevitably requires complex workflows, and in this case, local affiliates could be managed by volunteers or individuals designated by the umbrella entity, thus obligating a system that could be used by a diverse range of users aiming to complete a diverse range of tasks.
Key project features
Some of the most important features included the ability to change personal information and update key data such as your residential address, in order for the organization to accept fees and dues and for the organization's members to track and receive the benefits they are promised through their dues. As such, one of the key considerations for this project was user experience, as Michael eloquently stated during our conversation: "Every click we can save them, every minute that we can bring back to the organization is something they can use to apply to other areas and functionality."
Some of the major technical challenges confronted by this project included a limited technology team that was often unable to handle the large volume of requests from other functions in the organization. Thanks to a more robust, modernized implementation, this organization can now manage this architecture long-term. Tag1 worked with this client to train and mentor their resources and oversee their development work to ensure effective maintenance many years down the road. Laravel was chosen not only because of its ability to abstract much of the complexity behind the scenes for day-to-day needs but also due to the sheer amount of data that needed to be synthesized into a single interface.
Advantages of Laravel
The Laravel developer experience
Besides its higher-level benefits, Laravel is also an excellent choice due to its lack of a steep learning curve, as opposed to Symfony or, more notoriously, Drupal. On our Tag1 Team Talks episode, Fabian mentions that Laravel's success is due to its emphasis on a great developer experience. For instance, features that are integral to web development frameworks like the availability of dependency injection containers is something that is more straightforward in the Laravel context.
Fabian goes further to describe one of the key examples of how Laravel makes the developer experience as simple as possible. Consider a scenario in which you need to set up an API that includes authentication. Not only is the provisioning of the API itself complex; so is the challenge of providing authentication and the need to provide an authentication token factory. In Laravel, however, an authenticated API with access tokens requires just one line to implement, and any integrated Vue.js front end can communicate with Laravel "like magic," to use Fabian's turn of phrase.
Leveraging Laravel for single-page applications
Challenges of leveraging Laravel
Though Laravel has clear benefits when it comes to developer experience, it is not necessarily the best choice for a full-featured solution, as Fabian mentions during our Tag1 Team Talks episode. He stresses the fact that Laravel is "much more bare-bones than what we're used to from Drupal." For those coming from the Drupal universe, Laravel has an element akin to Drupal entities known as models which also serve as editable tables. In order to access information from other models, developers must define a relationship in Laravel that enables them to build a complex structure mirroring that relationship in the database and describe that same logic in an application. Therefore, developers needing to work with highly custom data models will find Laravel to be a breath of fresh air.
For this particular client, the Tag1 team needed to use Microsoft SQL Server due to project requirements, despite the unusual nature of leveraging PHP in conjunction with a Microsoft database product. Thanks to the existing data structures provided by Microsoft SQL Server, the team was able to use Eloquent, a Laravel object-relational mapping (ORM) library, to abstract a data model without altering the underlying database. This approach was required due to the substantial amount of legacy data present in existing databases. As Fabian noted during our conversation, for this particular client it was essential not only to migrate data to a more modern database system but also to design a database structure that would remain resilient for years to come.
In this blog post, we covered some of the key issues in implementing large-scale Laravel, particularly for an organization with a bevy of requirements, a throng of users, and a variety of specific needs. We explored some of the ways in which Laravel enables a more favorable developer experience thanks to its API-based and extensible approaches, as well as its deep and rich integration with Vue.js. In the second installment in this two-part blog series, we turn to some of the back-end and front-end development challenges that characterized this project, particularly when it comes to avoiding reinvention of the wheel and working with Vue.js and Laravel, two sometimes highly different approaches to business logic on the web. In the process we will apply our learnings to the case study in question and dig deeper into how Tag1 enabled millions of users and hundreds of affiliates to migrate onto a more modern and robust architecture ready for anything the future may bring.
Special thanks to Jeremy Andrews, Fabian Franz, Laslo Horváth, and Michael Meyers for their feedback during the writing process.
Part 1 | Part 2
For all of our Laravel content, click here.
Photo by Pedro Lastra on Unsplash