Using Laravel I create applications and websites for clients 2 - 3 times faster than before. More reliable and other Laravel Developers can also maintain the code in the future. Ultimately my job is easier, client pays less money and company makes a bigger profit. Where is the downside to that? Sometimes I think we need to remember why we code, clients don't care how or why we did what we did, just that it works and costs as little as possible. In this sense frameworks are amazing.
I can see the wins in that yes. However things take an entirely different direction if the application get a lot of hits thus its bandwidth usage goes up and processing speed as a consequence also comes into play. For not all too demanding domains Laravel or Symfony are fine but reall scalability requires an entirely different approach. And whatever benefits may come from using such a framework in terms of development (short term benefits) once committed the client(s) arent served in the best way possible. Such bandwidth critical prefab applications will always have much more impact on bandwidth (long term costs) and on page speed once websites get (data)heavier or get more users.
@@tytrdev Just as the expression says: a large and busy platform, having to serve a large number of clients at once and having to serve multiple pageviews per individual client in mere seconds (use your searchengine for statistics on averages as I wont go as far as providing such statistics).
Well php is a bit weird. Like with all the == operators which are essentially useless and encourages piss poor habits, to hack around the problem rather than solve it. But it's easy to see why, it's scripting language originally designed for small webpages. Time shift, OOP becomes king and php decides it wants piece of the pie. But old habits die hard. However that scripting part ... allows to learn programming a bit quicker. Quicker than java lets say as one can easily familiarize with syntax and build something which works without dwelling in OOP and application of n+1 design patterns.
People who bitch about programming languages are such fucking dogshit human beings. Who has time to sit around shitting on technologies that people have used to build awesome things? If you don't like it don't use it, there are plenty of alternatives. Bitching about code that makes sense to others isn't pushing anything forward.
@@GerardoBelot It is not about that. Go through a request response cycle and see how functions make same many decisions again and again. Rasmus gives you an example. At every request the framework decides which database you use. The problem is or may be solved somehow with caching. But it is a well known fact, frameworks gives you speed in development at the cost of performance. Money comes from speed development.
Frameworks are made to unify the way to code, so nobody loses time to understand the badly written code of another developer. Perfect for both developers and companies.
Some PHP CMS offer also a separate framework (for Developers) where you can choose what to use and how to build your applications with it. The worst thing I see on frameworks is that they are too bulky in their core. I don't know if it's that they call all the class files at once or what; but many are incredible slow. Before PHP programmers were into the fashion of Frameworks, applications were really fast. Probably the issue is that small shops websites should not use those frameworks. It takes too much resources to make them work fast.
Framework users are the poeple who doesn't like to type...and need fast solution with less coding...but the core users are the people who like to know about everything they are doing and likes to control the code
He does not take into account the overhead of learning new frameworks. While I think that finding the best solution for your problem is generally the right way to go, it must be remembered that learning a new framework takes time and often involves under-utilization or even misuse of all that framework has to offer.
I have a little knowledge and experience in php. Due to need for projects, I have to decide which php framework to use. There are two which came to mind : YII 2 and Laravel. I read their documentation, and found that Laravel was really hard to learn for me : high level of abstraction, many new concepts that are difficult to understand. I could deal with its installation process with composer, some configuration, request lifecycle which gave me some confidence that I would be able to learn and begin to use it after no later than 1 month. But when I read topic about service container : class binding, etc, I began to struggle. I thought Laravel only suited developers who had solid skills in php, design pattern and other related things. I am still planning to learn it, but I will probably turn to YII 2 which I found relatively easier to learn and use for nearest project. Btw, my boss asked if we could learn Laravel in 3 days. Uh... frameworks are not like Ms Excel or some specific purpose libraries such as javascript datatables, handsontable or even mpdf which we can begin to use after learning in 3 days.
@@calebadeleye Yeah... he tends to underestimate several things, thinking things can be done easily in only a few days. But I had convinced him that some things took time, including learning frameworks like Laravel. I had used it in a project which still had to be maintained and extended to meet different characteristics.
No matter what language, you should first learn it well before jumping to a framework. Juniors who only know a framework are extremely limited in their hability to provide a solution. And they grow arrogant when it's really the framework doing the work for them.
frameworks are like a pre-built house. Faster to build, garbage quality. Frameworks include everything you don't need and they are generally very slow.
Trongate PHP framework should change his mind that at least one framework doesn’t suck!!!! Trongate is the only framework that is in line with rasmus original philosophy on php!!!
So is it correct to use a micro framework that just takes care of routing and plugging things you require in from composer? In this way, it's a modular system. You update the libraries you import when there is a need to update them.
That is pretty much as performant as you can make it, so in a sense it is correct. In another it is completely wrong. The way I look at it, use a general purpose framework, Symfony, Laravel or whatever else. If you expect performance issues, the problem may actually be how PHP works, not the framework. Since it isn't like C++, C#, Java, etc. you have a startup process every request. So if there are expected performance issues you may actually want to consider a completely different language instead.
Speed sometimes doesn't outweigh the pros of using a framework for a business. Sacrifice a couple of milliseconds for the framework to boot up and it will provide you with the plethora of built in functions and features which is a good trade. Could you imagine building everything from scratch in php, validation, routing, mvc architecture, middleware, it would take ages before you can get on with developing what the business needs. If you want fast execution then switch from php altogether and choose C or Go. If you want to be even faster then remove the operating system and code to the baremetal. You'll start with the http server in C or assembly. It might take you 10 times longer but you'll save a millisecond in execution time. Frameworks are an amazing abstraction. Abstraction is how software continues to develop. I'm not going to complain that my operating system is doing the memory management for my servers and inturn php application. Once you realise abstraction is a good thing and frameworks provide that. You'll see how stupid this presenter is by saying all frameworks suck.
He is not stupid. Frameworks have a short lifespan. Today you work with v2, but in less than 2 years there is v3 that needs a full rewrite of your code. And actually developers don't want to join your "legacy" v2 project anymore. This scenario will never happen with core PHP, due to guaranteed backward compatibility.
So you are not a PHP developer, much less PHP Senior hahaha, i could develope all from scratch + JWT, API, MIcroservices connect with SOAP, integrate kits in few days, if you are good at working your php projects, is few time to waste, because you have all developed well. Yes frameworks sucks! then you have to rewrite or have legacy framework code, well apart of laravel is very very heavy
This is pretty much a problem of how PHP is designed. Since the php interpreter is invoked on every request and there is no event loop of any kind, or a mechanism to use threads, all state is lost once the request completes. This isn’t a problem in some other languages since they have mechanisms to keep state in memory in-between requests. This problem can be sort of solved with some kind of cache, but that will *always* be slower than direct memory access.
What about comparing laravel to express, since you feel it is bloated? sidenote: if you are using an older version have you tried "php artisan optimize --force" believe this was removed in 5.6
True. I mean it depends on the projects you are doing, Laravel is not bloated for most projects and is great for both solo and team development. Typically I go between Express and Laravel with a moment or two of ror but whenever it is a PHP project, its Laravel
Yeah, all this could be solved if we have different bootstrap mechanism. So in dev / test environments you have the dynamic behaviour where it loads things as and when needed - effectively repeating the cycle at every request. but going into production mode would rather than interrogate the configs and make decisions and turn towards the DB to get small pieces of information all the time (unchanging) - it could pull it up from a file cache and then run with it. I've seen some attempts recently, and the performance improvement is incredible - it is only a shame that it took us this long to get to this point... and when PHP is shrinking market rate and demand compared to node.js :(
@@depafrom5277Maybe? I mean Laravel is built on Symfony to begin with. but i don't think its laravel devs in general. I think its PHP's easy learning curve to be able to do stuff. I agree today's devs (majority) are a bit spoilt by the environments they are working with and distanced themselves from the more raw solutions. Laravel or not i think most of the frameworks are offering their data handling solutions which are in a way replicating what the database could do much faster. I think what the issue is here is that we forgot to use the right tool for the right job, and by doing so we are surrendering performance on the altar of 'simplicity'. I think this might be true for even Symfony. If you are using it because of some religious faith in the system then you might be sacrificing performance - as bad as it sounds. Its like building a static website with React... kind of overkill and slowing things down :) This is a more complex topic really, because we moved on from writing everything in ASM ... so there is room for making thing easier for the devs... but i think we are on the other end of this for now... writing things in Python and PHP when it really should be written in ASM :D
really agreed , i can't got any framework on my head i like to write my own , i develop my sort of mvc and worked for me . also the best thing is to code and have fun
On the other hand, I really can’t be arsed re-writing request handling, database access layers, routing etc each and every time I start a project. If I use an off-the-shelf framework, I’m already ahead; makes hiring easier (“Do you have experience with X?”); and I get other people fixing bugs, security issues, and writing documentation for free.
Thank you father! Laravel sucks on big. Yii2 sucks on strict component coupled. Phalcon sucks on less popularity. Wordpress sucks on code design and performance!
And here I am 7 years later. Core pure php is the way to go. Even simple blog if you make it from scratch is couple of mb big that’s it. If you use world press you get extra 700mb with junk what you don’t need at all. Other reasons is if you build page yourself without framework You own it all. If one day framework crashes,are updated/get closed or any other reason your page is destroyed and need to be rebuilt. You don’t own anything of your beautiful buttons and rest of framework.It’s just pure laziness and mass production.
rasmus is right no framework generates instances or classes according to your need. but still frameworks are best choice because of lot of people using and testing them.
Two PHP frameworks I WILL NEVER (I REPEAT: NEVER) use are Lavarel (or labarel whatever) and CakePHP. You don't built something serious with things named like "cake". You know ...
Even though I use Laravel but I totally agree with him. I hate it when you get stuck upgrading the framework and when some packages break down. By the way, Wordpress is not a framework.
HellOWorld, if he knows nothing about web dev and PHP is so shitty, why the fuck are you using it? Why don't you use a better language or make your own?
I disagree. Whatever who said that. Some companies don't need to create their own stuff, because it will take forever to recruit some people and train to your logic of ur bugged and unsecure codebase. A community framework comes with the benefit of communities(obvious????), patches, security.... all that you have not with your own framework unless you pay someone for that (who said that money come down from the sky ??)
Jonathan Greco yeah. I agree but when client ask for upgrading they will be stucked up to point. It's my personal experience I work on both although my all time fvt is cakephp. When it comes to security the person who knows architecture can crack it. Untill or unless the Server is Secure.
Should we trust someone who said he doesn't know how to write a programming language ? Zend's folks are the ones who made PHP actually usable, not Lerdorf
And today the new generation of script-kiddis (can't call them programmers) are making CMS on top of an huge CMS-Framework on top of an abstraction layer on top of other frame-works, using big rubbish like composer (we don't fix the problems, we write tools to make it even more worst to walk around the problems). So simple request needs many resources (cpu-load, ram, io), so they try to fix her shit framework mess-up with many levels of caching.
frameworks are necessary for lower the cost of development and to make it viable to many companies. I understand that the creator of PHP doesnt like things that change his original idea but it is just a tool that can be improved as good as it needs to. Frameworks are for that. Windows did the same to DOS a linecode operation systems and that improved the way that people uses computers and did it much more popular. In a few years the things are going to change dramaticlly againg. The AIs are coming to do the hard parts of programing, like an "inteligent" kind of framework.
He obviously has never sat down to write his 50th project with nothing but crappy PHP at his disposal. Frameworks are about not having to reinvent everything each time you start a new project. Try creating a complex multi-step form that validates its inputs, displays error messages inline with the fields, is internationalized, etc. With a framework, that's an hour's task at most. Not so with raw PHP.
As a matter of fact 'he' is the founder of PHP and 'he' actually knows what 'he' is talking about. There is nothing crappy about PHP, it only falls short if the programmer falls short.
My take is should learn or at least get the general idea of a language you are going to use. Once you can nail the basics and can build things in vanilla code, then look into the frameworks because the purpose of a properly executed framework is to speed up development and allow you to expand on it. Goes for any language base
Yes they all sucks, but still need them. Frameworks save my time to deliver app to the clients (and their users). I don't mind if the apps are faster or slower about 10 damn seconds. All that matter is the app run perfectly and deliver on time.
Hmm I just though about "push this" behavior and how it can be implemented. Seems it will be either code generation or caching (like routes caching) I think Laravel and Symfony already use caching at least for routes. The other side of it though is if you change the code but did not clear the cache it might use old configuration (I had this one time in Laravel, maybe they have not made so it automatically detects using file update time to clear the cache)
Btw, I was woking on own framework for the last 7 years. Started it as a set of scripts that were a part of web application I was developing, parts that were not related to that specific app. As I noticed in comments some people use micro farmeworks or own solutions too. So I started this before good frameworks were rised up to their current state (when I looked into them that gave a lot of ideas how I can improve). Did already 5 versions of it graudally improving. Full rewrite from scratch each time, so there were times when I succeeded to get same functionality but having less code than previous version. Last two versions are modular (compare to what I had in first versons a lot better) so developers can install only packages they actually need in applciation. Laravel is good as a tool but it is not very modular (database ORM can be used as separate package, which is good). Also it has dependencies,. for example symfony for http layer, and also database schemes use symfony's doctrine. I wanted to beleive (and still do) it is possible to make a really small framework, that will have minimal code. And if more functionality will be needed basic parts can be replaced with more specific or rich functionality, just installed via composer (can already do it with current libraries but will need to ensure packages can fit together, and this will require time). And by using interfaces can even uninstall basic implementations (or don't install initially).
We need frameworks so that people who spent 6 months learning a programming language don't go out there and try to build things from scratch and do everything wrong, insecurely, inefficiently, unoptimized, untested, unmaintained, and unmonitored, filled with technical debt. At the very least, you should use a framework that handles authentication and security, logging, routing, and database abstraction. And further it should be able to cache its settings and optimize itself so that it doesn't have to ask "which database are we using?" because those selections have already been cached and baked in to the instance.
So instead we have massive behemoths of frameworks that are slow even when optimized and when an exploit is found, it is applicable on tens of thousands of sites and not just one! Great Idea! Perhaps people who can't build code sanely should not produce web code in the first place!
@@Unknown-840 That is what lousy programmers keep telling themselves. The truth is that a framework generally is a "one size fits none" solution that introduces problems the "programmer" does not understand. It is alright to use frameworks, just do not call yourself a coder or programmer. You are a code-monkey at best. That is the cold hard truth. Rolling your own dedicated libraries is perfectly feasible especially for web. Don't be lazy.
I'd rather start with pure and add things per demand, not start with a dumpster fire of a framework with its own trashy logic and syntax that forces semantics and overcomplicated logic.
@@rangingaway92 If I had a nickel every time someone labeled existing solid frameworks as " trashy logic and ....." without any context or examples or what could be better etc. Well I'd have a lot of nickels. These frameworks have taken years if not decades to get to where they are, solving some zillions of little specific little things that crop up over time due to all the use cases it works under. Your homemade also-ran framework is not automatically better just by default. It will have every hole and problem known to man because your framework hasn't been battle tested by millions of projects and environments and users.
luq man not all cms suck, just wordpress and a few others are overrated too much to a point people don't care about better solutions they just want to use what everyone is talking about and in the CMS world that is wordpress unfortunately
Yap all, agree! I'm using java, all start from scratch and also create own android for next generation. I started 10 years ago, but my code was out of date, suckss....
Those who agree with him mostly don’t know how to use frameworks. Frameworks offer a lot of things and make your work faster. It’s not because of being lazy. Nowadays, clients like to see a project live in production as fast as lightning speed so you definitely need frameworks. A simple one would do if you find frameworks restraining you in general. Find one that has basic things you need. I mean I’m not against Rasmus but people has to be practical. You framework when you need. For me, If it’s a simple app, only then will I not use framework
What?? First, Wordpress is crap. Second you can't compare them because they both have they own purpose. Third, there might be a lot of objects, but that's how it should be, since PHP is stateless and gets run in every request. You need all those things.
This guy is absoutely right as the other guy was right who said the Java and its frameworks sucks. And the other who does not really liked ruby. And who said never use WordPress or PHP. My opinion is there is no perfect solution and you will always find something what was implemented way better in the other language/framework/whatever. I think at the end of the day the only thing that matters if you can meet the requirements or not and how fast can you solve the problems.
Frameworks are for applications that need to comply with DSS, Internationalization, password security verification standards, modulation, separation of concern, and all sort of standards without the programmer haven't to necessarily worry on all the latest changes. In many cases, frameworks are not necessary; but if it's important for a business to comply with all those requirements; plus having a good scalability plan in place, it works better to do its homework choosing the proper framework that best apply to their business model. But, at the same time, a framework offers many challenges. And for that reason, I consider it should be a scalability plan in place for any particular framework, and a limit to the use of frameworks very well explained to any new programmer engaged in the project. It should be also a quick training review. Employers usually get the weird sense that if you have any experience, your experience it's necessarily the same as the team they have in place. They assume too many things and usually get it all wrong when it comes to introducing new members into their crub. A clear set of procedures and work standards and description of interests and chores may definitely work.
is this really a problem in PHP world? Why the database type check on all requests? Was that just a bad example? I didn't code PHP for long, but in Node for example, frameworks are more lightweight and very scalable and such problems do not exist at all...
Because PHP relies on the obsolete CGI platform which creates a new process for _every_ request without sharing any resources. So it's basically like starting a program for every request. This "program" has to initialize over and over because no state is carried over to the next invocation
node frameworks mostly dont offer everything out of the box like laravel. Node frameworks are very modular i.e. you would like be setting up a package or a library whenever you’ll be needing it, but heavy frameworks like laravel come pre configured with many libraries