Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,153,812 members, 7,820,859 topics. Date: Tuesday, 07 May 2024 at 11:25 PM

Which is more awesome to use for 'server-side programming', NodeJS or PHP? - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Which is more awesome to use for 'server-side programming', NodeJS or PHP? (2232 Views)

PHP Or Python For Server-side Scripting / Need Help With Python Server Side Programming / Which Programming Language Was Used For Nairaland Server-side Scripting? (2) (3) (4)

(1) (Reply) (Go Down)

Which is more awesome to use for 'server-side programming', NodeJS or PHP? by Nobody: 4:18am On Jul 19, 2016
This thread is for professional programmers that have worked with the two.
Which one do you think is cooler and why? If you have only worked with one of them platforms, just pick and stool and sit down - look.
Re: Which is more awesome to use for 'server-side programming', NodeJS or PHP? by Olyboy16(m): 7:23am On Jul 19, 2016
why would you compare a fully fledged highly extensible, and mature server side scripting language to a language bootstrapped just because we think it much more convinient for async IO and flexible async processes?
nodejs wasnt designed to be in league with php, it was designed to close the gap php created by adding real time update functionality to communication between server and client.
nodejs is great, nice and engaging, but its still immature and doesnt scale up php nor solve problem php was designed to address.
php is amazing but doesnt solve problems addresses by nodejs

6 Likes

Re: Which is more awesome to use for 'server-side programming', NodeJS or PHP? by odufuwas: 2:14pm On Jul 19, 2016
One thing newbies fail to realise is that, it doesn't matter what you use to code, php or node or java or asp.net or whatever. If it works, it works the rest is history. Users would never use your platform because it was created in php or node, they'll only use it because it provides a wonderful user experience. Instead of focusing on which is cooler node or php. It best you focus your time and effort on making your platform provide good user experience that'll make them stay

5 Likes

Re: Which is more awesome to use for 'server-side programming', NodeJS or PHP? by Nobody: 2:41pm On Jul 19, 2016
The first 2 posters have made a lot of sense. I am hoping those I asked this question on their behalf are watching.
Re: Which is more awesome to use for 'server-side programming', NodeJS or PHP? by Nobody: 7:35am On Jul 20, 2016
You can not compare NodeJS and PHP with each other.

*******
PHP is a programming language, while NodeJS is not a language itself, its a platform.

NodeJS is a platform which runs javascript on server side and come with some set of javascript functions, modules, helpers. Apart from that whatever logic you are writing is in JavaScript language.

To understand and learn programming and web develpment concept you should learn both PHP and Javascript and then you can Jump to NodeJS.
Re: Which is more awesome to use for 'server-side programming', NodeJS or PHP? by FincoApps(m): 8:35am On Jul 20, 2016
dhtml, I've not used NodeJs for any client before so I'm breaking the rule but I need to mention something.... To the guys saying you cannot compare this to that, it's just a simple comparison so calm it down:

Ask a PHP developer, what language does he use for his server side, the answer would be "PHP"
Ask a Node developer the same question and he's likely to say "NodeJS" and not Javascript...

Now the simple question is which do you prefer..... so guys stop making this seem like an exam cause I saww the question and immediately understood what the OP meant

1 Like

Re: Which is more awesome to use for 'server-side programming', NodeJS or PHP? by Olyboy16(m): 8:50am On Jul 20, 2016
FincoApps:
dhtml, I've not used NodeJs for any client before so I'm breaking the rule but I need to mention something.... To the guys saying you cannot compare this to that, it's just a simple comparison so calm it down:

Ask a PHP developer, what language does he use for his server side, the answer would be "PHP"
Ask a Node developer the same question and he's likely to say "NodeJS" and not Javascript...

Now the simple question is which do you prefer..... so guys stop making this seem like an exam cause I saww the question and immediately understood what the OP meant

i code in both the php language and the nodejs framework, so i know what i am saying bro. asking me to choose between a framework which i love to use, and a complete server side programming language which is my playground is impossible!

can i ask you to choose between angularjs and jquery?
or between php PDO and MySQL?

how would choose from the couple...they both address different issues and most times HAVE TO WORK HAND IN HAND, which applies to the nodejs and php context.
if you get some more insight into how nodejs works u will understand my argument.
Re: Which is more awesome to use for 'server-side programming', NodeJS or PHP? by Nobody: 9:14am On Jul 20, 2016
@finco, i understand what you are saying but you cannot fully comprehend what the thread is about because you need to fulfill one condition

dhtml18:
This thread is for professional programmers that have worked with the two.
Which one do you think is cooler and why? If you have only worked with one of them platforms, just pick and stool and sit down - look.

Only those that have worked with both languages like Olyboy16 can truly comprehend the true depth of the topic. And everything he has said so far on this thread are very much on point - 100% so for that matter.

But for a person that have not used both platforms, well, you might believe that Node.js is a replacement for PHP, but at this moment, it is not. However, you need to have worked on both platforms like myself and Olyboy16 to truly understand this very well.

2 Likes

Re: Which is more awesome to use for 'server-side programming', NodeJS or PHP? by guru01(m): 1:38pm On Jul 21, 2016
You can not compare php and nodejs, that is wrong comparison.
You can do it this way:
Phpdaemon vs nodejs
Symfony vs nodejs
Reactphp vs nodejs
Re: Which is more awesome to use for 'server-side programming', NodeJS or PHP? by DAvIt0(m): 3:56pm On Jul 21, 2016
Since you can't compare both, cuz of what they offer and stand for, I think @dhtml should simply re-phrase the thread's topic to say:

"Which is more awesome to use for 'server-side programming', NodeJS or pHP?"

Me? I would personally choose Node over pHP cuz of stuffs the former has brought to mordern software development, including its non-blocking I/O feature we all glory it for reasons to use it.
Re: Which is more awesome to use for 'server-side programming', NodeJS or PHP? by Nobody: 4:42pm On Jul 21, 2016
Aye!
Re: Which is more awesome to use for 'server-side programming', NodeJS or PHP? by stack1(m): 1:09am On Jul 25, 2016
I'll prefer PHP anytime any day, NodeJS tends to be quicker to pickup for those already well versed in client side JS, however NodeJS wasnt meant for very large scale projects or projects where script perform long running tasks, or parse large amount of data
..see this page for some more thoughts https://www.quora.com/What-are-the-disadvantages-of-using-Node-js
Re: Which is more awesome to use for 'server-side programming', NodeJS or PHP? by danvery2k6(m): 12:30am On Jul 26, 2016
I agree with the previous posters saying NodeJs is this, PHP is that. The truth is, both of them are tools. Designed with different philosophies in mind. NodeJs, according to nodejs.org is a Javascript Runtime. PHP, according to php.net, is a general purpose scripting language.

When it comes do modern day applications that require the heavy use asynchronous processes, NodeJs performs better, when you want to build microservices, and design your API gateways to handle request switching and forwarding, NodeJs performs better.

When you talk about speed, NodeJs is very much faster, the fastest platform on the web.

PHP, however, handles monolithic applications very elegantly, and with much improvements in the daemon in Version 7, PHP seems to be holding sway on the web too, though still slower than NodeJs and Java.

In the end, it boils down to what you want to achieve. You weigh your options and consider the best tool there is. There are always tradeoffs.

1 Like

Re: Which is more awesome to use for 'server-side programming', NodeJS or PHP? by Nobody: 6:26am On Jul 26, 2016
Are you saying that PHP 7 is slower than NODE.JS (@guru abeg come and here o)
Re: Which is more awesome to use for 'server-side programming', NodeJS or PHP? by Olyboy16(m): 10:53am On Jul 26, 2016
dhtml18:
Are you saying that PHP 7 is slower than NODE.JS (@guru abeg come and here o)
rock on dude!! on point. even the so called hhvm is staggering to beat php 7
Re: Which is more awesome to use for 'server-side programming', NodeJS or PHP? by danvery2k6(m): 1:03am On Jul 27, 2016
dhtml18:
Are you saying that PHP 7 is slower than NODE.JS (@guru abeg come and here o)

Yes of course. The stats are there. PHP is 3rd on the list. And if you have worked with both, you will see it.

Check it out here: http://redmonk.com/sogrady/2016/02/19/language-rankings-1-16/
Re: Which is more awesome to use for 'server-side programming', NodeJS or PHP? by Nobody: 5:19am On Jul 27, 2016
danvery2k6:


Yes of course. The stats are there. PHP is 3rd on the list. And if you have worked with both, you will see it.

Check it out here: http://redmonk.com/sogrady/2016/02/19/language-rankings-1-16/
I have scanned that list carefully, and i notice that php 7 was not included. There is a super-huge difference between php and php 7 (like heaven and earth).
Re: Which is more awesome to use for 'server-side programming', NodeJS or PHP? by danvery2k6(m): 1:04pm On Jul 27, 2016
dhtml18:

I have scanned that list carefully, and i notice that php 7 was not included. There is a super-huge difference between php and php 7 (like heaven and earth).

Those benchmarks were run this year. As of November last year, the whole world knows that when we are talking about PHP, we actually mean PHP7. I know the differences, in fact I am an evangelist of PHP7.

But the truth remains that no language has been able to beat Javascript on the web. Which is why in 2013, the guardians of Java included Javascript in their JavaOne conference. Javascript had been ignored for some time, but with the arrival of NodeJs, it's super-speed could finally be harnessed on the server side.

Javascript still beats Java, which is a compiled language, when it comes to speed on the web. Before PHP7, PHP 5.6 was below Python on that list.
Re: Which is more awesome to use for 'server-side programming', NodeJS or PHP? by Nobody: 1:10pm On Jul 27, 2016
Is alright, but then PHP 7 is still new on the list sha. But that not withstanding, the truth remains that both of them are awesome languages.
I am a PHP/JavaScript Expert, so it does not matter which one is fastest to me - I rock the two awesomely well.

1 Like

Re: Which is more awesome to use for 'server-side programming', NodeJS or PHP? by KvnqPrezo(m): 5:30pm On Jul 27, 2016
Don't really know what going on here...
.
Wanna ask which is the valid way to run this code on Html 5

<script language="JavaScript" type="text/JavaScript">
<!--
document.write ("Hello World"wink;
//-->
</script>

Or
<script language="JavaScript">
document.write ("Hello World"wink;
</script>

Help please wanna know which is valid in Html5
Re: Which is more awesome to use for 'server-side programming', NodeJS or PHP? by stack1(m): 5:50pm On Jul 27, 2016
KvnqPrezo:
Don't really know what going on here...
.
Wanna ask which is the valid way to run this code on Html 5

<script language="JavaScript" type="text/JavaScript">
<!--
document.write ("Hello World"wink;
//-->
</script>

Or
<script language="JavaScript">
document.write ("Hello World"wink;
</script>

Help please wanna know which is valid in Html5

the way you formulate your script-tag has nothing to do with HTML5, and also the language attribute isn't neccesary cause browsers by default woyld assume JavaScript, again the way you wrote the type attribute isnt exactly right, it should be type="text/javascript", dont camel-case the word
Re: Which is more awesome to use for 'server-side programming', NodeJS or PHP? by KvnqPrezo(m): 6:04pm On Jul 27, 2016
stack1:


the way you formulate your script-tag has nothing to do with HTML5, and also the language attribute isn't neccesary cause browsers by default woyld assume JavaScript, again the way you wrote the type attribute isnt exactly right, it should be type="text/javascript", dont camel-case the word

Thanks

What about the <!-- //--> Neccessary
Re: Which is more awesome to use for 'server-side programming', NodeJS or PHP? by stack1(m): 7:42pm On Jul 27, 2016
KvnqPrezo:


Thanks

What about the <!-- //--> Neccessary


such is only neccessary in XHTML and other XML type documents, u however do it this way
<![CDATA[

//code goes here

]]>
so the XML parserr can ignore those sections.


using <!-- --> (HTML commennts) is meant to block sccripts from browsers that do not understand javascript which is rare nowadays
Re: Which is more awesome to use for 'server-side programming', NodeJS or PHP? by KvnqPrezo(m): 8:06pm On Jul 27, 2016
Thank you was learninq the normal html so i dont wanna mix it up with html 5
.
Thanks
Re: Which is more awesome to use for 'server-side programming', NodeJS or PHP? by Tochaigh: 11:45pm On Jul 27, 2016
Olyboy16:
why would you compare a fully fledged highly extensible, and mature server side scripting language to a language bootstrapped just because we think it much more convinient for async IO and flexible async processes?
nodejs wasnt designed to be in league with php, it was designed to close the gap php created by adding real time update functionality to communication between server and client.
nodejs is great, nice and engaging, but its still immature and doesnt scale up php nor solve problem php was designed to address.
php is amazing but doesnt solve problems addresses by nodejs



Nodejs is still faster for most use cases, end of story!





Single Threaded but Highly Scalable - Node.js uses a single threaded model with event looping. Event mechanism helps the server to respond in a non-blocking way and makes the server highly scalable as opposed to traditional servers which create limited threads to handle requests. Node.js uses a single threaded program and the same program can provide service to a much larger number of requests than traditional servers like Apache HTTP Server.


oh and scalable




Have you heard what all the top tech companies are using now, come let me whisper to you, it's nodejs

(1) (Reply)

Full Naijaloaded And Nairaland Codes / Java Programming On Backtrack 4 / Problem With Connecting Access Database To VB.NET

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 47
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.