Different between Ajax and Node.js in caching data

143 views
Skip to first unread message

Biruntha Gnaneswaran

unread,
Aug 22, 2014, 12:04:33 PM8/22/14
to nod...@googlegroups.com
Hi,
 Both Ajax and Node.js have the facility to cache data received from the server so that there are a minimum number of PHP/MySQL instructions executed...
Can anyone tell is there any difference in caching data???

Ryan Schmidt

unread,
Aug 23, 2014, 12:19:44 PM8/23/14
to nod...@googlegroups.com
On Aug 22, 2014, at 11:04 AM, Biruntha Gnaneswaran <birunth...@gmail.com> wrote:
>
> Both Ajax and Node.js have the facility to cache data received from the server so that there are a minimum number of PHP/MySQL instructions executed...
> Can anyone tell is there any difference in caching data???

The question is a non-sequitur because the two things you're asking us to compare are not of the same kind.

Ajax is a programming strategy for creating web applications:

http://en.wikipedia.org/wiki/Ajax_(programming)

Node.js is a JavaScript runtime environment for creating high-performance servers:

http://en.wikipedia.org/wiki/Nodejs

You can use Node.js as a component in an Ajax-based web site, but you can also use Node.js for many other purposes. And of course Ajax-based web sites can use something other than Node.js for their server-side component.


// ravi

unread,
Aug 23, 2014, 12:19:46 PM8/23/14
to nod...@googlegroups.com
On Aug 22, 2014, at 12:04 PM, Biruntha Gnaneswaran <birunth...@gmail.com> wrote:
 Both Ajax and Node.js have the facility to cache data received from the server so that there are a minimum number of PHP/MySQL instructions executed...
Can anyone tell is there any difference in caching data???


Are you comparing data obtained using Ajax from a PHP/MySQL backend/server that is cached locally in the browser vs data obtained using Ajax from a NodeJS server that is cached by the NodeJS server from MySQL?

Just to be clear: NodeJS is, roughly, a server-side framework for building applications using JavaScript that run on Google’s V8 engine.

—ravi

Biruntha Gnaneswaran

unread,
Aug 24, 2014, 3:41:35 AM8/24/14
to nod...@googlegroups.com
Thanx ravi, ryandesign...
I think, I confused lot..bcz i am new to Node.js...

I'm comparing data obtained using Ajax from a PHP/MySQL backend/server vs data obtained using Ajax from a NodeJS server that is cached by the NodeJS server from MySQL...Can u give brief introduction to this???

Ryan Schmidt

unread,
Aug 25, 2014, 1:53:56 PM8/25/14
to nod...@googlegroups.com
On Aug 24, 2014, at 2:41 AM, Biruntha Gnaneswaran wrote:
>
> I'm comparing data obtained using Ajax from a PHP/MySQL backend/server vs data obtained using Ajax from a NodeJS server that is cached by the NodeJS server from MySQL...Can u give brief introduction to this???

Not really. If you want to cache data coming from a MySQL server, you can certainly write code to do that in PHP or in Node.js, but I don't think it's going to do it on its own. In Node.js, you'll typically be using existing npm modules for many tasks, including getting data from MySQL. It's possible that one of the MySQL modules in npm support caching, but I haven't looked into it myself.

Reply all
Reply to author
Forward
0 new messages