DEV Community

Discussion on: Node vs PHP

Collapse
 
razbakov profile image
Aleksey Razbakov

JavaScript syntax is much nicer than PHP

Can you please share some nice projects in Node? Do you consider this github.com/HugoDF/express-bull-es6 as a good practice?

I am lacking some abstraction and organization of the code that PHP has.

Collapse
 
xroal profile image
Roman Stejskal

You can take a look at Example Node (Express + Mongoose) codebase containing real world examples.

What I meant specifically by syntax is, e.g.,

  • no $ for variables,
  • object literals { key: value } vs [ 'key' => value ],
  • anonymous functions (args) => retVal vs function (args) use (vars) { return retVal; }

What abstractions and organization of code do you mean?