1

Sorry, My question sounds dumb but i am bit confused about Node.js .I am a PHP developer and i know that php has operations and functions that execute on server and return result to client screen.

I want to ask in clear words, Do Node.js/Express.Js does the same as PHP does? Do Node.js is for same work as php is?

should i move to Node.js from PHP (if both are for same purpose {mean back-end purpose})?

Which one is better choice in sense of Speed and security?

Which one has better scope in future?

Please help me in sorting out this confusion.

Please donot degrade my question.I a new in programming and answer in simple words as well...please please please.

Thanks.

  • down votersssss.... this question may be time waste for you...but for me it is important to know... – Muhammad Hashir Anwaar Jul 05 '17 at 18:01
  • down voterss....if you dnt want to answer it ..then do ur work and dnt waste ur time to degrade my passion of learning... – Muhammad Hashir Anwaar Jul 05 '17 at 18:03
  • 1
    I am not a downvoter but can speak for them - questions like "which one has better scope", "which is better choice" do not have any objective answers. Should you move? Nope, you should learn both long enough to be able to answer this by yourself. – Wiktor Zychla Jul 05 '17 at 18:16
  • @WiktorZychla , sir you are right...i must learn enough to answer it by my own... but help a bignner is also a good deed.. We need shadow of professionals and experts like you to become successfull in life. – Muhammad Hashir Anwaar Jul 05 '17 at 18:21

2 Answers2

3

Moiz. You are asking sort of very generic questions, but maybe they can have simple answers to help you keep studying.

Node.JS is an asynchronous Javascript runtime. Yes, it can run as back-end code. Please, read their docs: https://nodejs.org/en/about/

1) Generaly speaking, yes, Node.JS can do the same work. They have different approachs and different architectures.

2) The answer is no if you are asking just to be on the curring edge. Move to another language is something that you have to study and really know which are the reasons to switch from one to another.

3) The answer of this question is the same for all languages comparition: depends (project, architecture, needs, etc, etc, etc). Is always good to enforce that speed and security is more accountable to developers than from the language itself.

4) Both are being improved and updated.

Rafael Araújo
  • 201
  • 1
  • 8
1

Nodejs

Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js' package ecosystem, npm, is the largest ecosystem of open source libraries in the world.

Express is a framework that is built on top of Nodejs

This is a popular content that compares Node and PHP.

Den Isahac
  • 1,335
  • 11
  • 26