Похожие чаты

Guys l have tried to use node.js but I still

cant understand it what makes it different from php? and can I use it with php?

5 ответов

10 просмотров

I didn't use nodejs but I'm positive it's much better than php

They both follow MVC if we are talking about laravel

Node is very different from PHP It has lively community creating awesome libs, easily downloadable and manageable using npm The language itself is constructed very differently in PHP, when you write an app, you write some code in a file, which becomes your route, and set up an external server which calls your php. In JS, you create a server in your code. You have full control over it from the JS level. PHP is synchronous — when you contact a database, or read a file, PHP waits until it's done. If you want to do many things at the same time (and you want), you have to use threads or processes. Whereas in Node, when you do anything which is not computation, ie. filesystem access, database access, http request, Node schedules it to run in the background, and proceeds to do other things in the meantime, which means one process can do a lot more, at the expense of being slightly harder to grasp than synchronouse langs (read about Promises and async / await tho, it helps a lot). And you can spawn multiple processes as well.

Node is a standalone program. It runs everywhere. PHP is _mainly_ a webserver module Node's primary goal is to execute javascript programs PHP main goal is to parse documents and execute parts of them them right before the web request cycle is done Node is a very broad environment, well suited for a lot of general tasks PHP is very tighly copuled with web execution

async everything makes it great How can you read two files at once in PHP?

Похожие вопросы

Обсуждают сегодня

Господа, а что сейчас вообще с рынком труда на делфи происходит? Какова ситуация?
Rꙮman Yankꙮvsky
29
А вообще, что может смущать в самой Julia - бы сказал, что нет единого стандартного подхода по многим моментам, поэтому многое выглядит как "хаки" и произвол. Короче говоря, с...
Viktor G.
2
@Benzenoid can you tell me the easiest, and safest way to bu.y HEX now?
Živa Žena
20
This is a question from my wife who make a fortune with memes 😂😂 About the Migration and Tokens: 1. How will the old tokens be migrated to the new $LGCYX network? What is th...
🍿 °anton°
2
30500 за редактор? )
Владимир
47
а через ESC-код ?
Alexey Kulakov
29
What is the Dex situation? Agora team started with the Pnetwork for their dex which helped them both with integration. It’s completed but as you can see from the Pnetwork ann...
Ben
1
Гайс, вопрос для разносторонее развитых: читаю стрим с юарта, нада выделять с него фреймы с определенной структурой, если ли чо готовое, или долбаться с ринг буффером? нада у...
Vitaly
9
Anyone knows where there are some instructions or discort about failed bridge transactions ?
Jochem
21
@lozuk how do I get my phex copies of my ehex from a atomic wallet, to move to my rabby?
Justfrontin 👀
11
Карта сайта