Welcome Guest, Not a member yet? Register   Sign In
[split] Real time? [CodeIgniter 4 Important Features]
#18

(09-16-2016, 03:38 PM)spjonez Wrote:
Narf Wrote:But regardless of that, this argument started with you claiming that the result with PHP will always suck, which is patently false.

That depends on your perspective and what is achievable with other languages. Every language has it's limitations; JS apps can run offline and PHP will never be capable of that. PHP is better at large file processing, image processing, has a great ecosystem and documentation. They all have their place but there is no one ring to rule them all.

To further Narf's point, it wasn't that long ago that JS apps couldn't do much if you were offline. It also wasn't that long ago that most programmers held the opinion that JavaScript was useless.

Most of the capabilities which everyone has been discussing in this thread have nothing to do with the programming language, and everything to do with the run-time environment and libraries being used with the language. Node.js was not the first platform for server-side JavaScript, it was simply the first popular platform for server-side JS (was ASP the first? I don't know, but it was the first place I encountered JS on the server, years before node.js and in a codebase which was old before I started working on it).

JavaScript is not inherently blocking or non-blocking, but its use in the browser and the simplicity of passing functions and closures around make most JavaScript developers more comfortable with developing event-driven applications, and many developers eventually become aware of when they've created problems for themselves by blocking execution in their environment.

It is not JS that makes node.js non-blocking, nor does it prevent the developer from creating applications which block execution. What makes node.js non-blocking is that it uses a cross-platform library which performs "non-blocking I/O" by utilizing a combination of event-driven programming and a thread pool. The same library can be used in PHP. The library is written in C.

Before someone starts talking about why C is better/worse for asynchronous/non-blocking programming, it's important to note that C is commonly used for cross-platform development simply because native APIs are available to programs written in C in the most popular operating systems.
Reply


Messages In This Thread
RE: [split] Real time? [CodeIgniter 4 Important Features] - by mwhitney - 09-20-2016, 09:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB