Skip to content

u/godlikeplayer

In this archive from Nov 2018 to Mar 2019

0
posts
22
comments
0
media
52
score

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.

2 points

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.

3 points

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.

well, that's your opinion.

6 points

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...

1 points

End of this list.

Back to top

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.