i like the lightweight approach of node and express but a lot libraries, especially ORMs, are so immature and bad compared to what the php ecosystem offers.
it's kinda true that PHP is lacking behind with features for things like micro-services architectures. This probably will change with PHP 8 or through some 3rd party libraries that are heavily worked on right now.
PHP is still the perfect choice for building a monolith (which is still the right choice for probably 95% of all projects) while node excels in building microservices it heavily lacks in terms of frameworks and proper libraries (ORMs).
Building a large PHP app is so much easier since you don't have to deal with an async and a concurrent platform... an error in your node application is some serious thing that can affect your whole app... in PHP some route causing an error is not a huge deal and doesn't affect any other user or other parts of your app.
In my opinion, Node is pretty bad for learning general backend and architecture principles since there aren't any proper frameworks to guide a newcomer or even a general agreement on how to do things and best practices. Tutorials are also horrible and mostly outdated.
just google AR vs data mapper ... again you just reinforce my point that you don't know why one is better and double down on the crap that laravel has taught you.
yeah, I googled and used them myself. They both have pros and cons.
you can't mock statics. laravel has created another horrible hack to get around the fact that facades are a horrible hack in the first place. once again though, you would rather just double down on what laravel taught you than research why it's wrong
laravel went for simplicity first and facades play a major part in that role. And simplicity is always a key to better maintainability... at least for small to mid-sized apps.
Separation of concerns is a fundamental of building quality software. AR is the opposite of this.
there are different approaches for separating concerns and make code readable. In the end just an opinion. Active record is very popular in RoR and node (sequelize) and many other languages and frameworks... so it can't be THAT wrong...
No they don't, but even if they did they also make things unpredictable and impossible to test. Globals have been considered evil for decades ...
i never had any problems in writing tests for a laravel app. Sure it's true that code that uses static methods in a poorly conceived way then said code will be difficult to test. Laravel has implemented static facade methods with due care and attention.
You guys are just proving my original point, laravel developers learn how to do things wrong and then evangelise poor coding practice to other new developers.
there is nothing wrong with the active record pattern. Facades and some globals improve readability and accessibility quite a lot. But that's more of an opinion.
PHP is very easy to pick up. As a result, thousands of people without any education consider themselves programers and start teaching others. (for example, only yesterday there was two links submitted to /r/PHP to articles that are literally shit).
i feel like the same thing is happening now in the node community as well. A lot of people new to programming picking it up and the internet is full of badly written insecure node.js tutorials and the amount of spaghetti express code I saw makes me feel like I'm back in the early days of php...
i like the lightweight approach of node and express but a lot libraries, especially ORMs, are so immature and bad compared to what the php ecosystem offers.
well, i think that php has some fundamental shortcomings but has one of most mature frameworks and tooling
wrong. read up what an ORM actually is and read that active record is an implementation of an ORM.
https://en.wikipedia.org/wiki/Active_record_pattern
its just the n+1 problem that is very well documented.
why is this getting downvoted?
building CMS or any monolith and getting stuff done fast.
wow the amount of downvotes seem a bit harsh lol
if err != nil { return fmt.Errorf("parsing json: %s %v", name, err) }
and how do languages like javascript with node make it harder to write shitty code?
per second? per minute? per week?
don't think its production ready yet.
it's kinda true that PHP is lacking behind with features for things like micro-services architectures. This probably will change with PHP 8 or through some 3rd party libraries that are heavily worked on right now.
PHP is still the perfect choice for building a monolith (which is still the right choice for probably 95% of all projects) while node excels in building microservices it heavily lacks in terms of frameworks and proper libraries (ORMs).
Building a large PHP app is so much easier since you don't have to deal with an async and a concurrent platform... an error in your node application is some serious thing that can affect your whole app... in PHP some route causing an error is not a huge deal and doesn't affect any other user or other parts of your app.
In my opinion, Node is pretty bad for learning general backend and architecture principles since there aren't any proper frameworks to guide a newcomer or even a general agreement on how to do things and best practices. Tutorials are also horrible and mostly outdated.
its not like laravel gives you all the necessary tools for testing facades... and if you don't like them you don't even have to use them.
yeah, I googled and used them myself. They both have pros and cons.
laravel went for simplicity first and facades play a major part in that role. And simplicity is always a key to better maintainability... at least for small to mid-sized apps.
there are different approaches for separating concerns and make code readable. In the end just an opinion. Active record is very popular in RoR and node (sequelize) and many other languages and frameworks... so it can't be THAT wrong...
i never had any problems in writing tests for a laravel app. Sure it's true that code that uses static methods in a poorly conceived way then said code will be difficult to test. Laravel has implemented static facade methods with due care and attention.
well, that's your opinion.
there is nothing wrong with the active record pattern. Facades and some globals improve readability and accessibility quite a lot. But that's more of an opinion.
what makes you say that?
laravel
one question: why?
i feel like the same thing is happening now in the node community as well. A lot of people new to programming picking it up and the internet is full of badly written insecure node.js tutorials and the amount of spaghetti express code I saw makes me feel like I'm back in the early days of php...
are there already some benchmarks with laravel or symfony?
End of this list.
Back to top