KuKu
KuKu

Reputation: 646

chat application in jsp with node.js OR applets

Last some days i am investigating the better way to implement the chatting on web technology.

I did research and i found that node.js also have some problems like as follows

  1. Cross Browser support (older version of IE does not support) because of web sockets.
  2. As its new, still the tools are underdevelopment so unstable API.
  3. They do not have a good documentation to follow through (but yes, lots of articles are there for help)

Then i made decision that i will do it in applets so that easy to make but as usual i made some research and this link really helped me.

It also has some problems like

  1. some organizations only allow software installed by the administrators. As a result, many users cannot view applets by default.
  2. applets may require a specific JRE.
  3. it cannot start until the Java Virtual Machine is running, and this may have significant startup time the first time it is used.

I had also asked this question but only 1 solution i got and it was also bit complicated to implement and it also using the web sockets.

I wants to make this application such a way that at least IE6, IE7 users will not have any problem.

My question is, what is better way to implement?

Is there any thing other than these two using which we can implement the same thing OR we have to choose only 1 of these two?

I am not using any framework. Only JSP + SERVLET

Upvotes: 0

Views: 1983

Answers (2)

Joachim Sauer
Joachim Sauer

Reputation: 308001

Using Node.js doesn't restrict which browsers can be used as clients in any way. Node.js is "just" the server. You can use plain old HTTP requests for all your communication and ignore websockets and you'll be able to build a chat client that works even with IE5.

If you decide to use websockets as the communication protocoll, then that will restrict the amount of usable browsers, but that decision is not forced on you.

On the other hand, using a Java applet severly restricts the amount of browsers that will run your applications: while most browsers could run applets, not all computers have a Java runtime installed (and frankly: few people will install it just to run a chat application). You'll also exclude pretty much all mobile platforms with this choice: they can't usually run applets (that's even true for mobile platforms that support Java as their primary programming environment).

And I have to disagree on the quality of the Node.js documentation. The documentation is small, but very complete: Node.js does not have a huge API. It might be different for your Node.js based libraries: some of them are well-documented, others aren't. That's usually a function of how widely used they are.

Upvotes: 1

alessioalex
alessioalex

Reputation: 63653

The best solution is a framework that abstracts the transport logic away and degrades gracefully to other transports when WebSockets are not available (such as long-polling, flash websockets etc).

Socket.IO is such a solution, you have the same API regardless of the transport layer and your app works even in IE6 (thus, everywhere): http://socket.io/

Upvotes: 0

Related Questions