Laravel: the best framework out there?
Within the developer community, one of the most frequently discussed and most used backend frameworks out there is Laravel. Here at Dotbite, we use Laravel in projects such as timebite and LEAD Horizon. It’s become our go-to-tool, so we decided to write down our favorite benefits of using the PHP framework. This list of features and advantages will hopefully benefit you in deciding whether Laravel is the right framework to use for your next project, or it might just give you a brief insight into how we work and why we do what we do.
Lara-what?
Before diving into the benefits of Laravel, let’s first discuss what Laravel is. This section is for anyone unfamiliar with the development jargon and the vast amount of technical knowledge needed to understand it. If you are a developer, and already familiar with Laravel, you can skip ahead to the next section on why we love using Laravel.
When creating a website or web application, the process can be split into two main projects: frontend and backend, or: client and server. While the former concerns the design and overall look of the website, meaning everything the end-user will see while browsing the site, the latter regards the technical background of any website or web application. Laravel’s core features revolve around developing a clean, secure, and healthy backend while also providing the tools to create a frontend that works in union with the backend.
Building a website or a web application from scratch can take hundreds of hours. At some point, frameworks come in handy to save some time in the development process. Frameworks are collections of modules, packages, and so-called design patterns, providing developers with an easy and standardized way to build their projects upon. There’s no need to reinvent the wheel for every project and spend many hours writing the code for frequently used functions, e.g., automatically sending emails, storing files, encrypting data, or checking user data for security. To save time, the basic codes for them are collected within a framework. One such framework is Laravel.
To conclude, Laravel is an open-source (meaning free to access for anyone) PHP backend framework used to develop dynamic websites and web applications.
Easy as ABC
Ok, maybe not that easy. However, the development process is comparatively logical because the framework strictly follows the model-view-controller (MVC) pattern. Thus, data, presentation, and logic are separate entities and can be modified individually. Following the MVC design pattern means that the architecture of the software is structured very logically. Therefore, new developers can quickly take over working on a project without encountering a chaos of code that only its creator could ever understand.
Another aspect that drastically facilitates the development process with Laravel is its very extensive documentation. It offers developers a guide on the purpose of each tool within the framework and how to use it. We especially appreciate Laravel’s documentation because it is very wide-ranging, offers excellent examples, and is updated with every new version while still supporting older versions.
Batteries Included
One of the main advantages we see in working with Laravel is its extensive ecosystem. No matter the project you’re working on, Laravel most likely already has the necessary tools and packages you need. Even better, most of them are developed by Laravel, so you don’t have to rely on third-party tools but get them right at the source. So, for example, you could use Laravel Scout for full-text search and combine it with Socialite for logins using One-Authenticator services like Facebook or Google.
Some of our favorite tools to use in this regard are the pre-built authentication services, Forge, and Laravel Vapor. Authentication services make it a breeze to handle user sessions. This can be extended to create user roles and manage permissions. The user services are done in a singleton pattern to run as efficiently as possible, reducing the database interactions per request to a minimum. Forge facilitates the deployment and management of data on several servers, which came in very handy for us in our project with LEAD Horizon. Lastly, we use Laravel Vapor as a serverless platform for the Laravel application. This allows for scaling projects without actually managing the underlying infrastructure ourselves. All this saves us valuable time.
The Artisan Console allows us to work very efficiently. To put it simply, this is a command line interface that includes many useful shortcuts. Moreover, since it is easily accessible at any given moment, the Artisan Console significantly simplifies any side tasks such as database migration or creating models. Besides these already built-in commands, you can also extend the Artisan Console with self-made commands. Some of our favorites are the project setup command, which brings the database to a ready-to-use state and seeds any needed data, or the local export command, which prepares the localization files to be used in JavaScript and saves us valuable time.
Finally, another reason we hold Laravel high in regard is Eloquent, “an object-relational mapper (ORM) that makes it enjoyable to interact with your database.” When using this module, all data within the database is assigned a class, which is an abstraction of the code. The database can then be modified very easily as the module introduces a clear and logical way of interacting with the database through classes instead of continuously bothering with MySQL queries. Thus, Eloquent, and you might sense a theme here, saves us valuable time.
Integrations
As we have already mentioned above, Laravel is mainly a backend framework. Developers can create a basic frontend using Laravel’s Blade templates, HTML, and CSS. However, for more complicated requirements, integrations to frontend frameworks are vital. Laravel offers a significant advantage here as it allows a seamless integration into JavaScript frontend frameworks such as Vue.js, which we like to use.
Besides frontend framework integrations, Laravel also seamlessly integrates with various data storage systems and cloud storage services such as Amazon S3. You can imagine these cloud storage services like Dropbox for developers. All necessary data is not stored on an individual server somewhere but in the cloud, meaning that the data is accessible with the click of a button from anywhere in the world. Moreover, Laravel also offers integrations to intermediate storage that are set up in no time. This memory storage (e.g., Redis or memcached) allows us to store data directly into the RAM, which enables us to cache data that must be highly available.
Laravel also offers easy-to-use integrations to cross-platform messaging systems such as Amazon SES. Using them, developers can automate sending emails and other messages to users. We find that the prioritizing function makes the tool especially useful. It allows queuing messages with lower priority to send out higher priority ones first, which comes in very handy when sending a high number of messages.
How Laravel Changed timebite
After working with Laravel on some projects and recognizing its advantages, we decided to use it for most new projects and even switched our oldest project, the student platform timebite, completely to Laravel. Besides the above-mentioned ease of use of the framework, we could finish the newest version of the platform in a much shorter time. However, our main reason for using the framework for timebite was its out-of-the-box data security management, which stores our users’ data securely while streamlining data security management tasks for us. On another note, we love the sheer amount of Laravel packages and seamless integrations. Spatie, for example, allows us to easily manage a rather complex role system with various permission levels.
Listen to Your Gut
If you’re reading this blog article to decide whether Laravel is the right framework to use for your next project, we want to give you one piece of advice: use whatever framework you feel most comfortable with. If there’s one thing you take away from this blog article, it should be this.
Use whatever framework you feel most comfortable with!
After all, even if you used the best framework that exists out there (which is not something that exists), you won’t unleash the framework’s and your own full potential if you don’t feel comfortable handling it and don’t have fun working with it.
Ready to connect the dots?
Hi, I’m Emir, CEO and Co-Founder of Dotbite.
You have an interesting idea for a digital project and are looking for a sparring partner pushing the challenge through with you?
You’ve come to the right place.