📜 ⬆️ ⬇️

Can Laravel be used for large enterprise solutions?

This is a translation of the " Can Laravel Be Used for Big Enterprise Apps? "

Yesterday I was listening to a new episode of Laravel Podcast with Taylor Otwell, Jeffrey Way and Matt Stauffer - and they (finally!) Talked about creating large applications on Laravel, recently this question very often asked.

Is Laravel a good enough adult for big projects?


Since the guys from the podcast did not provide a transcript, and listening to 50 minutes may be redundant, I decided to write a summary and split the answers in a more convenient Question-Answer format, with related links. Go!

1. What is a great app?


Matt : Before we dive into the topic, let's define what an Enterprise application is? Is it about the number of lines of code, dependencies, or security, or about the load?
Jeffrey : I have the same question. What features / capabilities have frameworks that make them enterprise and Laravel not? Does it matter that Zend has a big company behind them, while everyone asks about Laravel “ what will happen when Taylor dies?” "
Taylor : I think most people mean a lot of classes, and I suppose a lot of code.
')

2. So is it possible to use Laravel for large applications?


Taylor : Obviously, I'm going to say yes, it can be used for large applications, because:


So not only can it be used for large applications, it is definitely better for larger applications than other PHP alternatives.

I understand that this is misleading, because Laravel has a low entry threshold. But at the same time, it scales to fit your needs.

3. People are irrational


Taylor : By the way, people do not choose the freymork rationally. Many subjective things. Maybe they do not like marketing, maybe they do not like the friendly style of Laravel, so they choose something more strict, like Zend. Sometimes they just don’t like me personally!

4. World of Enterprise


Matt : Speaking of enterprise, there are differences between a large and corporate project. We have people constantly saying, “The CEO, or the board of directors, or the financial director, or lawyers, or someone else from our multi-billion dollar company, is very concerned that we are going to invest a whole lot of time and money in X”, therefore Many developers get non-development input, so I’m wondering if there are any limitations, for example, not to use Laravel.

5. Give examples of large applications using Laravel.


Matt : let's step aside from the enterprise and talk about big apps.
I know that we cannot name many sites on Laravel. I know a few, because I am under NDA with many of them, and there are thousands of millions of visits, from Alexa 500, many Fortune 500 companies. Can we tell more?
Taylor : various sites of computer games, for example, Fallout 4, use Laravel on their landings. But the main question - why do people need evidence that it works? There is always little evidence.

6. It's not about the framework


Taylor : People might want to know: “if I create my great application on Laravel, will it be maintained and maintained forever, and ...?”. No, Laravel will not automatically make your application cool in support in the next 10 years.

The framework allows you to focus on your code. A framework is a routing, sessions, cache, calls to a database, but you are the only one who can describe the specifics of the subject area and knows the problems of a business that are much more complicated than the features of the framework.
Matt : A bad developer will write bad code on any framework.

7. Well, how to build big apps?


Matt : Well, suppose people agree that Laravel is good. How to create a great application, what are the nuances in the application with millions of views per week?
Taylor : Simple enough. Make sure you use a good session and cache driver, like Memcached or Redis , on a server like Elasticcache on your AWS .
You probably need a load balancer, PHP scales very well in this sense.
At the Laravel level, make sure you use the config: cache , route: cache , what you have done composer dump-autoload –optimize.
Jeffrey : At Laracsts, which, suddenly, is also a highload project, I didn’t do so much! There are many basic things that people completely ignore, for example, the size of their pictures!
Taylor : another good idea is to separate your database from the application server. This will make it easier to scale, for example, if you need a second server.
And speaking of caching, I have been using Cloudflare a lot lately. The entire official site of Laravel is hard-cracked, only a few requests actually reach the server, because almost everything is static, for example, documentation.
Matt : There is another problem with Cloudflare: you need to consider the retention period in order to update the cache. So it's not even a Cloudflare problem, but yours - check Expires in the headers!

Instead of conclusion


After listening to their thoughts (thanks, guys!), I came to the same conclusion - that large applications are not about the framework, there are many more topics for discussion: DevOps, caching mechanisms, unique business logic of your application, structure of the database, and so on . So the question “Is Laravel good enough?” Is the wrong question. Better ask, "Is my code good enough?", Or "Do I have enough skills to use Laravel effectively in a large application?". If there is something to add, the author of the article accepts comments on his blog , and here is the link to the podcast itself .

From myself I’ll add: the very essence of the discussion is quite controversial, and in many respects I disagree with Taylor’s categorical (each pop praises his arrival, yes), but the basic idea that comes through the podcast is that the poor developer will write bad code, regardless of the framework. The framework only provides tools to focus on the core - business logic.

PPS: Please report errors and inaccuracies to the PM.

Source: https://habr.com/ru/post/328610/


All Articles