Recently been reading up on Node.js and how it is a great webserver and supports sockets even. I was thinking of using it on a project of mine, but i still haven't been able to figure out to to interact from CI to node.js. There was a project done for it with Drupal and it seems to be working well however i still can't figure out how they integrated it together.
Just wondering if anyone has any experience with the idea.
http://drupal.org/project/nodejs
http://www.youtube.com/watch?v=UV8lbdJfESg
Example:
User posts a comment via AJAX Comment gets store in DB All users watching the thread gets notification
now th part where after its submitted the comment and the notification, how does the msg get sent to node.js
Due to the V8 engine, asynchronous execution, and real-time server interaction, Node. js offers a better execution speed and certainly outperforms PHP.
CodeIgniter is still exist but the name of this framework has become synonymous with a low-quality solution that is why we advise you Laravel as a better alternative. Both Laravel and CodeIgniter are open-source PHP framework.
Certainly, there are some benefits of using Node. js for PHP developers like async programming and concurrency. Other advantages stem out from the Node. js process being long-running.
Is node. js a new language which can replace PHP or it is a language which can/only compliment/supplement PHP and other web languages to perform complex task? Short answer: Yes. You can replace all server-side Php with server-side Javascript.
I have just found this package:
NodeigniterMVC - an MVC framework for node.js inspired by Codeigniter. It allows custom routing, chaining, and partial view rendering; built-in with helpers, libraries, and a CLI. Fully compatible with Bower.
https://www.npmjs.com/package/nodeignitermvc
So from what I understad, it's a package that runs unde NODE.JS if you haven't started you're project and want them both without getting yourself into too much trouble playing with sockets on your server - this looks ideal.
maybe this helps :)
The way Drupal has done it, is use the Node.js plugin Socket.io. When a comment gets posted, drupal notifies the socket with the comment details, node.js then notifies the other "clients".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With