What’s So Special About Laravel?

So what is it that sets Laravel apart? Why is it worth having more than one PHP framework at
any time? They all use components from Symfony anyway, right? Let’s talk a bit about what
makes Laravel “tick.”

The Philosophy of Laravel


You only need to read through the Laravel marketing materials and READMEs to start seeing
its values. Taylor uses light-related words like “Illuminate” and “Spark.” And then there are
these: “Artisans.” “Elegant.” Also, these: “Breath of fresh air.” “Fresh start.” And finally:
“Rapid.” “Warp speed.”
The two most strongly communicated values of the framework are to increase developer
speed and developer happiness. Taylor has described the “Artisan” language as intentionally
contrasting against more utilitarian values. You can see the genesis of this sort of thinking in
his 2011 question on StackExchange in which he stated, “Sometimes I spend ridiculous
amounts of time (hours) agonizing over making code look pretty” — just for the sake of a
better experience of looking at the code itself. And he’s often talked about the value of making
it easier and quicker for developers to take their ideas to fruition, getting rid of unnecessary
barriers to creating great products.
Laravel is, at its core, about equipping and enabling developers. Its goal is to provide clear,
simple, and beautiful code and features that help developers quickly learn, start, and develop,
and write code that’s simple, clear, and will last.
The concept of targeting developers is clear across Laravel materials. “Happy developers
make the best code” is written in the documentation. “Developer happiness from download to
deploy” was the unofficial slogan for a while. Of course, any tool or framework will say it
wants developers to be happy. But having developer happiness as a primary concern, rather
than secondary, has had a huge impact on Laravel’s style and decision-making progress.
Where other frameworks may target architectural purity as their primary goal, or
compatibility with the goals and values of enterprise development teams, Laravel’s primary
focus is on serving the individual developer.

How Laravel Achieves Developer Happiness


Just saying you want to make developers happy is one thing. Doing it is another, and it
requires you to question what in a framework is most likely to make developers unhappy and
what is most likely to make them happy. There are a few ways Laravel tries to make
developers’ lives easier.
First, Laravel is a rapid application development framework. That means it focuses on a
shallow (easy) learning curve and on minimizing the steps between starting a new app and
publishing it. All of the most common tasks in building web applications, from database
interactions to authentication to queues to email to caching, are made simpler by the
components Laravel provides. But Laravel’s components aren’t just great on their own; they
provide a consistent API and predictable structures across the entire framework. That means
that, when you’re trying something new in Laravel, you’re more than likely going to end up
saying, “… and it just works.”
This doesn’t end at the framework itself, either. Laravel provides an entire ecosystem of tools
for building and launching applications. You have Homestead and Valet for local
development, Forge for server management, and Envoyer for advanced deployment. And
there’s a suite of add-on packages: Cashier for payments and subscriptions, Echo for
WebSockets, Scout for search, Passport for API authentication, Socialite for social login, and
Spark to bootstrap your SaaS. Laravel is trying to take the repetitive work out of developers’
jobs so they can do something unique.
Next, Laravel focuses on “convention over configuration” — meaning that if you’re willing
to use Laravel’s defaults, you’ll have to do much less work than with other frameworks that
require you to declare all of your settings even if you’re using the recommended
configuration. Projects built on Laravel take less time than those built on most other PHP
frameworks.

The Laravel Community


If this book is your first exposure to the Laravel community, you have something special to
look forward to. One of the distinguishing elements of Laravel, which has contributed to its
growth and success, is the welcoming, teaching community that surrounds it. From Jeffrey
Way’s Laracasts video tutorials to Laravel News to Slack and IRC channels, from Twitter
friends to bloggers to the Laracon conferences, Laravel has a rich and vibrant community full
of folks who’ve been around since day one and folks who are on their own day one. And this
isn’t an accident:
From the very beginning of Laravel, I’ve had this idea that all people want to feel like they
are part of something. It’s a natural human instinct to want to belong and be accepted into a
group of other like-minded people. So, by injecting personality into a web framework and
being really active with the community, that type of feeling can grow in the community.
Taylor Otwell, Product and Support interview
Taylor understood from the early days of Laravel that a successful open source project
needed two things: good documentation and a welcoming community. And those two things
are now hallmarks of Laravel.
Laravel also focuses deeply on simplicity. It’s possible to use dependency injection and
mocking and the Data Mapper pattern and repositories and Command Query Responsibility
Segregation and all sorts of other more complex architectural patterns with Laravel, if you
want. But while other frameworks might suggest using those tools and structures on every
project, Laravel and its documentation and community lean toward starting with the simplest
possible implementation — a global function here, a facade there, ActiveRecord over there.
This allows developers to create the simplest possible application to solve for their needs.
An interesting source of how Laravel is different is that its creator and its community are
more connected to and inspired by Ruby and Rails and functional programming languages
than by Java. There’s a strong current in modern PHP to lean toward verbosity and
complexity, embracing the more Java-esque aspects of PHP. But Laravel tends to be on the
other side, embracing expressive, dynamic, and simple coding practices and language
features.

No comments:

Post a Comment

=>SEO

1.  Syllabus 2.  Unit Wise Question/Material 3. Paper 4. Previous Paper