The Artima Developer Community
Sponsored Link

Java Community News
Is Java more efficient than Ajax for advanced web apps?

16 replies on 2 pages. Most recent reply: Feb 2, 2007 7:13 PM by Chris Bartling

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 16 replies on 2 pages [ 1 2 | » ]
Bill Venners

Posts: 2284
Nickname: bv
Registered: Jan, 2002

Is Java more efficient than Ajax for advanced web apps? Posted: Jan 22, 2007 7:07 PM
Reply to this message Reply
Summary
ComputerWorld recently compared four web-based office suites, and reported that one application, ThinkFree Office Online, stood "head and shoulders" above the rest. According to ThinkFree's CEO TJ Klang, currently the best way to offer advanced Web Office functionality is to utilize Java.
Advertisement

In Online Office Suites: The Winner Is Clear, ComputerWorld editors selected ThinkFree as the clear winner in online office suites, an application which uses Java applets to deliver the most feature-rich applications in their suite. In his O'Reilly weblog, Hari Gottipati asks whether Java is more efficient than Ajax for advanced web apps. Gottipat points to Tales from the Web 2.0 Frontier, in which Alan Graham relates ThinkFree CEO TJ Klang's comments on the scalability of client-side Java versus Ajax:

Currently the best way to offer advanced Web Office functionality is to utilize Java. Ajax doesn’t cut it when it comes to advanced functionality. Although in theory you can build it in Ajax, the resulting code will be so big that it will take ages to download stuff and slow the system considerably. So Java is, much more efficient than Ajax when it comes to implementing Microsoft Office-like functionality.

Have you experienced any scaling problems with JavaScript on the client that could be addressed by using Java (or Flash) on the client instead?


Revence Kalibwani

Posts: 3
Nickname: revence27
Registered: Jun, 2005

Re: Is Java more efficient than Ajax for advanced web apps? Posted: Jan 23, 2007 2:43 AM
Reply to this message Reply
Ajax is a hack. It is a bending of the laws. Applets are not. Me, I think if it is real seriousness you want with your Web 2.0, Ajax is good enough for simple things (yes, Gmail is simple). But once it leaves the `simple' bracket, you need Flash or applets.

Frank Silbermann

Posts: 40
Nickname: fsilber
Registered: Mar, 2006

Re: Is Java more efficient than Ajax for advanced web apps? Posted: Jan 23, 2007 6:46 AM
Reply to this message Reply
AJAX usually uses Java on the server side, and even the browser side of an AJAX application can be coded in Java when using GWT. Therefore, the question is not whether to use "Java" instead of AJAX, but rather, whether it is wise to forego AJAX in favor of a Java _Applet_ or Java _WebStart_.

There are only two reasons _not_ to use Java applets or WebStart:
(1) Too difficult/slow/inconvenient to deploy, or
(2) Lots of complex static content that can be coded by HTML monkeys.

For repeatedly used office applications neither exception applies, so AJAX is not the wisest choice.

John C. Walker

Posts: 2
Nickname: jcwcasa1
Registered: Jan, 2007

Re: Is Java more efficient than Ajax for advanced web apps? Posted: Jan 23, 2007 10:17 AM
Reply to this message Reply
AJAX is a stopgap.

Why do we continue to shoehorn rich applications into a few bytes across the wire when there is an 80% broadband penetration rate among Internet users?

It is time to revisit our original assumptions about the web and recognize that in targeting software for the future it is prudent to explore thin rich clients such as applets and those delivered by Java Web Start which are more development and maintenance friendly than fitting HTML and JavaScript into an application.

Leo Lipelis

Posts: 111
Nickname: aeoo
Registered: Apr, 2006

Re: Is Java more efficient than Ajax for advanced web apps? Posted: Jan 23, 2007 11:58 AM
Reply to this message Reply
I agree. AJAX is good for an occasional one-off asynchronous request to the server. Java applets are better if you need something GUI-rich and complicated.

AJAX is definitely a hack in a negative sense of the word "hack". The nastiness of the AJAX hack is usually wrapped and covered by a framework of some kind to make it more palatable to developers, but basically AJAX does something that web pages were not designed for.

HTML and XHTML were not designed to be highly dynamic. They were designed to be semantic, descriptive and informative rather than imperative. Any sites that have ugly URLs, that break the back button, that cannot be viewed in a plain text web browser break the truly beneficial nature of HTML/XHTML, etc. It's a travesty.

If all sites were built with nasty AJAX, then google would have nothing to index. That not to say that all AJAX stuff is nasty. But likewise, if all websites were giant applets and flash (yuck) windows, then again google would have nothing to index. I'm using google as an example here. Being able to search the web is absolutely critical. Being able to selectively query various elements of the page is critical. Being able to control the presentation *as a user* of the web page is critical. Applets and flash break that.

Out of applets and flash, flash is by far the worst offender right now. I don't mind if flash is used for ads. But when people do their entire sites in flash, that's a very bad practice. If some web site needs to provide office-like functionality, then applet may be the right choice. But for most sites I think applets are the wrong choice. A smattering of well behaved AJAX can be good too.

Leo Lipelis

Posts: 111
Nickname: aeoo
Registered: Apr, 2006

Re: Is Java more efficient than Ajax for advanced web apps? Posted: Jan 23, 2007 12:03 PM
Reply to this message Reply
Oh, and a well behaved web app should consist of bookmarkable pages. But I guess everyone here already knows that. I'm mentioning it because I accidentally omitted it from my list of good properties above.

Grant Olson

Posts: 3
Nickname: granto
Registered: Jul, 2006

Re: Is Java more efficient than Ajax for advanced web apps? Posted: Jan 23, 2007 1:51 PM
Reply to this message Reply
On a project I worked on earlier this year, I found out the hard way that the default JVM in IE is only java 1.1, due to the whole lawsuit thing. I had to backport some code and it was very painful. Due to existing apps and infrastructure woes in general, installing the sun JVM was out in this case.

Roland Pibinger

Posts: 93
Nickname: rp123
Registered: Jan, 2006

Re: Is Java more efficient than Ajax for advanced web apps? Posted: Jan 23, 2007 2:50 PM
Reply to this message Reply
> Ajax is a hack. It is a bending of the laws.

Really? BTW, Microsoft just released the ASP.NET AJAX 1.0 framework: http://weblogs.asp.net/scottgu/archive/2007/01/23/asp-net-ajax-1-0-released.aspx

Tiago Antao

Posts: 26
Nickname: tiago
Registered: Feb, 2003

Java Web Start Posted: Jan 24, 2007 3:00 AM
Reply to this message Reply
I have been doing quite a few apps using Java Web Start (plus Jython) and the result is quite amazing, especially because I am targeting non-expert computer users on the Internet.

A full application, centrally maintained, 0 installation hassle...

Jeff Ratcliff

Posts: 242
Nickname: jr1
Registered: Feb, 2006

Re: Is Java more efficient than Ajax for advanced web apps? Posted: Jan 24, 2007 9:58 AM
Reply to this message Reply
> Ajax is a hack. It is a bending of the laws. Applets are
> not.

It sounds to me like the classic case of a hack calling a kludge a work-around. In my view, any app that runs inside a browser is some flavor of hack. Which hack you use is a matter of taste.

Todd Blanchard

Posts: 316
Nickname: tblanchard
Registered: May, 2003

Re: Is Java more efficient than Ajax for advanced web apps? Posted: Jan 25, 2007 4:25 PM
Reply to this message Reply
> AJAX usually uses Java on the server side,

Bollocks.

Probably more of the really fancy stuff uses Ruby or php. Some, like what you see at http://dabbledb.com is using Smalltalk.

I have tried applet development. Applets failed. They take too long to load, they are difficult to get to look nice. They are a pain to test compared to the great javascript testing tools one can find in firefox.

Applets are dead.

Jan Bannister

Posts: 5
Nickname: bannistj
Registered: Aug, 2005

Re: Is Java more efficient than Ajax for advanced web apps? Posted: Jan 26, 2007 1:47 AM
Reply to this message Reply
Applets are gay.

The idea was obvious but the implementation sucked. The applet architecture sucked. There was no designer support. And the look sucked anyway, hence people use flash and AJAX. Garbage collection is about the only thing Java is better at (and not for much longer)

And what the hell is an 'Advanced' web app anyway? One that faithfully reproduces all the crap bloatware features of a desktop application? Look at writely (sorry... 'google docs and spreadsheets'), what more do you need?

Leo Lipelis

Posts: 111
Nickname: aeoo
Registered: Apr, 2006

Re: Is Java more efficient than Ajax for advanced web apps? Posted: Jan 29, 2007 11:31 AM
Reply to this message Reply
> They take too long to load

In the days of the dial-up internet, that was true. Today that statement is mostly untrue. Your statement is definitely false for broadband or intranet users.

And for rich WEB UIs, even if you use AJAX, you still need broadband, so speed is a moot point. The interaction and state management within an AJAX app is more complex than within an applet.

> they are difficult to get to look nice.

That's not true today. You can use either VE or Matisse to get them to look nice.

Max Lybbert

Posts: 314
Nickname: mlybbert
Registered: Apr, 2005

Re: Is Java more efficient than Ajax for advanced web apps? Posted: Jan 29, 2007 3:46 PM
Reply to this message Reply
> > They take too long to load
>
> In the days of the dial-up internet, that was true. Today
> that statement is mostly untrue. Your statement is
> definitely false for broadband or intranet users.

When I open applets on either broadband or LAN connections, I notice a considerable slowdown compared to AJAX pages (but not as much as in the past). Why? The same reason I notice slowdown when I open PDFs in Firefox: the Java environment needs to be initialized. The AJAX environment is initialized with the browser, but the JVM is loaded on-demand.

I'm not saying you're wrong, because the slowdown isn't as bad as it once was. I am saying that not all of that slowdown is network-related.

> And for rich WEB UIs, even if you use AJAX, you still need
> broadband, so speed is a moot point. The interaction and
> state management within an AJAX app is more complex than
> within an applet.

That's true. Although I enjoy working with Perl::AJAX. Then again, I enjoy working with C++, and I know that's not a popular position 'round these parts.

Matthew Nicholson

Posts: 3
Nickname: matman
Registered: Jul, 2005

Re: Is Java more efficient than Ajax for advanced web apps? Posted: Jan 29, 2007 11:02 PM
Reply to this message Reply
It seems that the big wins for web based applications are ease of deployment, ease of upgrading, and to a lesser extent ease of development (largely dependent on the application). Maybe it is time to put more effort to making deploying and upgrading traditional applications easier and more automatic rather than shoe horning the web browser into being more than it is.

I am thinking something along the lines of java web start or activeX controls but much more general. Debian Linux's apt package management system is a good start, it makes downloading, installing, and upgrading applications and their dependencies rather painless, but it is not automatically triggered by clicking on a link on a website. Something that enables trusted automatic application deployment and upgrading across multiple platforms and is nearly transparent to the user is what we need.

Flat View: This topic has 16 replies on 2 pages [ 1  2 | » ]
Topic: Romain Guy on Filthy Rich Clients Previous Topic   Next Topic Topic: OpenToro 4.0 Final Released

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use