Looking Forward: Why You Should Look at Laravel for your Next Big Application

Authored by Bob Marchman, Senior Architect at Plan Left

“Fast. Cheap. Quality. Pick any two.”

Undoubtedly, you have heard this phrase uttered more than once – ironically or not – in this industry. There’s a reason for that: it holds up, mostly. It’s difficult to churn out quality products fast. It’s difficult to make quality products cheaply. For actual decades now (wow), web development frameworks have aimed to hit that lofty goal, or at least provide the tools to help developers hit it. And, an unspoken truth in our industry is that it is all too often our tools that make or break an otherwise successful project. Little more is frustrating [to me, at least] than totally having my head wrapped around a project’s scope and business requirements only to have my tools start working against me and the project (and the client’s budget). Let’s not even get started on how much productivity is lost simply debugging our tools or figuring out why our tools won’t or can’t do XYZ. This is akin to spending a sizable portion of a new home construction project working on your hammer and not the house.

Thankfully, web development has come a long way and so have our tools. Having been a web developer for nearly 20 years now [I was there, Gandalf…3000 years ago when we used html tables for layout and flash failed men], having built many enterprise applications with many frameworks and tools, I can say without any hesitation that the greatest joy I have found in creating PHP applications for the web has been with the framework Laravel. I receive nothing to say that, too. And I have been hyper-critical of frameworks in the past. Sometimes it’s done right, though, and it has to be shared. For me, it’s the difference between wrestling with clunky tools like a grease-covered mechanic with sparks and fire flying everywhere, or crafting a marble sculpture in a Renaissance workshop surrounded by other pieces of art.

Laravel is an object-oriented MVC framework written in PHP that was developed and first released in 2011 by Taylor Otwell when he needed some features that another framework from the same era, CodeIgniter, was lacking. Today we are 8 major releases and Laravel enjoys a sizable market share in the industry in addition to very high accolades from developers.

Here are just a few of the features we love about Laravel:

MVC

Laravel is an MVC framework or Model-View-Controller. This simply means that our application’s data, the logic behind that data, and the display of that data are all decoupled and independent from one another. This keeps code focused and less prone to bugs. Developers have been following this best practice for years now and Laravel doesn’t disappoint.

Eloquent ORM

Traditionally, in web development, working with databases was a bit cumbersome. Database-related code was often the source of performance issues, data integrity bugs, and hacks. There were numerous engines, dialects, and flavors to learn and each has their quirks. Eloquent ORM abstracts these database operations into a singularly clean, simple, and fluent interface that takes much of the aforementioned headaches away for good. The result is code that’s more secure and reliable and the need for less of it.

Middleware

Middleware helps keep your app secure and makes it a cinch to *gate* access for sections of your app to only the users you wish. Checking for user authentication, permissions, email verification, or maybe just a simple landing page that only subscribed users can see – middleware keeps these use-cases simple to meet and reliable in practice using a convenient mechanism to inspect and filter requests. Combine middleware with Laravel’s built-in logging and notifications and you have enterprise-level application features right out of the box.

Artisan and Tinker

Laravel Artisan isn’t something your users and customers are ever going to see, but for developers of web applications it is an indispensable tool that is as powerful as it is a pleasure to use. Artisan is Laravel’s command-line interface used for interacting with your application at the server level that runs as a series of scripts executed from the root of your project. There’s a bevy of commands for managing, administering, and inspecting your application. Artisan includes Tinker, a powerful REPL built with the PsySH package. Tinker allows us to delve deeper into our application from the command-line by allowing us to execute code *inside* in our application from the shell. Factory up some models with different field values, test database queries out, broadcast events and send notifications all from inside your application, all from the command-line!

Frontend Flexibility

Frontend devs also love Laravel for its flexibility and simplicity. Laravel, by default, uses the powerful and extensible *Blade* templating engine. Additionally, developers can choose which Javascript framework flavor they prefer such as ReactJS or Vue. Laravel even provides custom applications starter kits that use Tailwind CSS, InertiaJS, and Livewire frontend stacks. All this opens up a world of possibilities for creating rich, modern user interfaces and experiences.

Conclusion

In conclusion, Laravel is a framework that has truly earned its reputation as a powerful and flexible tool for web development. Its user-friendly features, such as the MVC framework, Eloquent ORM, middleware, Artisan and Tinker, and frontend flexibility, make it an excellent choice for building complex and secure web applications. Laravel has come a long way since its initial release in 2011, and has established itself as a market leader in the industry. With Laravel, developers can focus on the creative aspects of their projects rather than being bogged down by the tools they use. If you haven’t tried Laravel yet, it’s definitely worth considering for your next big application.

Explore Latest Posts