Andy wrote:

On 04/03/07, Gordon Joly <[EMAIL PROTECTED]> wrote:

Switch to Ruby on Rails and AJAX over and above Java?

Ruby is server side, unless I am mistaken. Thus would not need to be
installed locally, so a good thing there.

Javascript (needed for AJAX) is implemented differently across
browser. not even sure the XMLHTTPRequest function, or whatever it is
called, is standardised or if websites just pray all vendors
implemented it the same way.



Generally, you would use a Javascript library to abstract XHR so that you don't need to worry what the particular browser quirks are. In Rail's case, it uses Prototype - http://prototypejs.org/. Most libraries abstract XHR so much that AJAX even works on browsers that don't support XHR (through the use of hidden IFRAMES).


I suggested Java over HTML/CSS/Javascript as Java is more versatile.
Java will also run on many more platforms than Flash. You can even get
embedded versions of Java. Java is a more full featured language than
javascript, or I might just not know Javascript well enough.


Seeing as Google Web Toolkit compiles Java to Javascript, I would assume they must be fairly feature equivalent, at least at the language level (though which one's easier to program in is debatable). Java has more libraries, but how many of them are useful when using Java as a Flash replacement?

From personal experience, one of the biggest problem with using Javascript/HTML/CSS as a Flash replacement is sound support which, from what I can tell, is fairly non existent (though I'm really hoping somebody can prove me wrong on this).

Assuming you don't need sound support, I don't see what is gained from using Java over HTML/CSS/Javascript. DHTML/AJAX sites are often far more responsive than anything I've seen done in a Java Applet, not that there are that many Java applet sites left to compare with. While Java may be more versatile, in most cases it's going to be overkill (and not just on the client - a lot of RoR's success is due to it being a lot easier to whip up a Web 2.0 style website in RoR than in JEE).
And of course security wise Flash is a no go area. If you can't see
what code is doing to your machine better assume its doing something
bad to it. Of course I could run flash in a VM but the overhead just
to run the BBC webpage would be completely unacceptable, even with
kernel level acceleration (I don't have native support for VM on my
CPU, unless I upgrade).


But Flash is a VM, and is sandboxed (just like Java). Looking at Adobe's page on security in Flash 8 (in particular the sandboxing) at http://www.adobe.com/devnet/flash/articles/fplayer8_security_03.html Flash's sandboxing model is strikingly similar to Java Applets.

Scot

-
Sent via the backstage.bbc.co.uk discussion group.  To unsubscribe, please 
visit http://backstage.bbc.co.uk/archives/2005/01/mailing_list.html.  
Unofficial list archive: http://www.mail-archive.com/backstage@lists.bbc.co.uk/

Reply via email to