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?

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

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

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

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

Listen to Your Gut

Dotbite | Connecting the dots