Slashdot Log In
Sun Debuts JavaFX As Alternative To AJAX
Posted by
kdawson
on Tue May 08, 2007 04:24 PM
from the YASL dept.
from the YASL dept.
r7 writes "Internetnews is reporting on Sun's introduction of JavaFX at JavaOne today. Looks like a combination Applet, Flash, Javascript, and AJAX with a friendly programming interface. Does this really spell the end of AJAX? I sincerely hope so. Nothing built on Javascript will ever achieve the security, cross-platform reliability, and programmatic friendliness that Web 2.0 needs. Proprietary solutions and vendor lock-in are also dead ends. JavaFX has the potential to satisfy this opportunity even better than did Java over a decade ago. Along with AJAX, let's hope JavaFX also puts paid to Microsoft's viral Active-X and JScript, and, more importantly, that it really is a web scripting language that developers can grok."
This discussion has been archived.
No new comments can be posted.
Sun Debuts JavaFX As Alternative To AJAX
|
Log In/Create an Account
| Top
| 441 comments
(Spill at 50!) | Index Only
| Search Discussion
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Have they fixed the startup time? (Score:4, Insightful)
(http://rtfm.insomnia.org/~qg/ | Last Journal: Wednesday November 16 2005, @07:11AM)
It has been found that people give a web site about 2 seconds to respond before they determine it is not going to load and surf away.
Re:Have they fixed the startup time? (Score:5, Insightful)
(http://remote.net/)
Re:Have they fixed the startup time? (Score:5, Interesting)
(http://rtfm.insomnia.org/~qg/ | Last Journal: Wednesday November 16 2005, @07:11AM)
Also, because of the most stupid thing Sun ever did, people tend to deliberately close the JVM after that first initiation. Why? Cause Sun puts a stupid little Java icon into the systray. It immediately draws attention to the fact that the JVM is in memory and people think they might get a speed boost or something by closing it. (Or something equally irrational that users think.) This was a pretty predictable result.. and the icon serves no purpose anyway, so why bother?
Re:Have they fixed the startup time? (Score:4, Interesting)
(http://rtfm.insomnia.org/~qg/ | Last Journal: Wednesday November 16 2005, @07:11AM)
Re:Have they fixed the startup time? (Score:5, Insightful)
(http://blog.davr.org/)
* Static strict typing, that throws a runtime error if you try to cast to an incorrect type
* Compiled into bytecode, with a JIT runtime
* Cross-platform (windows, mac, linux and solaris)
Re:Have they fixed the startup time? (Score:5, Interesting)
Re:Have they fixed the startup time? (Score:4, Insightful)
(Last Journal: Monday March 28 2005, @03:33PM)
Re:Have they fixed the startup time? (Score:5, Insightful)
(http://robots.org.uk/)
Re:Have they fixed the startup time? (Score:4, Informative)
"Go run along and play; the adults have work to do."
You can make a point without insulting people. In fact, it tends to work a lot better.
Re:Have they fixed the startup time? (Score:5, Insightful)
Re:Have they fixed the startup time? (Score:5, Informative)
(http://blog.davr.org/)
Cell phones - yes ("flash lite", newer phones with FL2 are equivilent to flash 7)
Pocket PC - yes (at least 6)
PSP - yes (6 or 7, not sure)
PS3 - yes (don't know the version offhand, should be at least 7 since wii has that)
Re:Have they fixed the startup time? (Score:5, Informative)
(http://www.speakeasy.org/~lion/)
Every single time it has been hard, complex, and slow. This despite wanting it to be good.
I generally have to go visit some download page, figure out which of the myriad Java acronyms I need to install, have it fail, then have to visit the page again and figure out how to do it manually, work at it, fail, and then ultimately, give up. In the very few occasions I've seen it work, there is the infamous Java load time to roll my eyes at.
Contrast with Flash, which I hate, and which I practically have to struggle, to avoid having on my computer.
That is, with Flash apps: I visit, it says, "You need flash," I click on the "OK install Flash thing," and after like 2 seconds, it's installed, and then playing whatever it was I wanted to look at.
After the very first install of Flash, I don't notice that it even loads, at all. I don't even think about it.
Re:Have they fixed the startup time? (Score:5, Informative)
(http://rtfm.insomnia.org/~qg/ | Last Journal: Wednesday November 16 2005, @07:11AM)
Anyway, I tried java.com, using Mozilla Firefox, and it gave me this page [java.com] which is really quite good. One thing I gotta ask though, why is Sun asking me to install an unsigned extension? Why can't they go get a signing certificate already?
Re:Have they fixed the startup time? (Score:4, Interesting)
The difference here is that you're going to java.com, whereas the GP is going to java.sun.com (which is the first two hits on Google if you search for "java" [google.com]). Incidentally, I never knew java.com existed until now: at some point I Googled for "java" when I needed a JRE, and once I somehow navigated the labyrinthine recesses of sun.java.com to download what I wanted - seriously, it's reminiscent of getting the free RealPlayer - I just bookmarked that page.
Re:Have they fixed the startup time? (Score:4, Informative)
Also, you can't really blame Sun for not having Java pre-installed on most desktops. There were certain monopolists doing everything in their power to prevent Java's emergence as a solid platform.
Re:Have they fixed the startup time? (Score:4, Funny)
Re:Have they fixed the startup time? (Score:5, Funny)
(http://robots.org.uk/)
sun-java6-plugin gets you everything you need to enjoy the 12 java applets that are on the web.
Re:Have they fixed the startup time? (Score:5, Insightful)
(http://rtfm.insomnia.org/~qg/ | Last Journal: Wednesday November 16 2005, @07:11AM)
It's just confusing to them.. and it has a negative effect on performance when they fiddle with it.
More importantly, it's a change to their desktop which happens outside the browser window in response to going to a web page. Users don't really understand that it is the browser that spawned this.. they think that it was the web page that spawned this, and they understand that web pages shouldn't be able to put icons into their systray.
All in all, it's a dumb idea.. and Sun should have done some user testing to see what the user's reaction to it was.
Stupid branding. (Score:5, Insightful)
Sorry Java, you're not nearly as important as you think you are. QuickTime commits the same set of sins, which is why I swear by QuickTime Alternative, it is a bit less annoying.
Re:Have they fixed the startup time? (Score:5, Interesting)
(Last Journal: Tuesday September 13 2005, @03:45PM)
And thus it really depends upon how this is used. If its used deep into a page say for something like an online word processor, where you know and expect to be waiting, versus a homepage which you expect to open instantly. Really its up to the developers to use it where it makes the most sense. Sadly few do.
Re:Have they fixed the startup time? (Score:4, Insightful)
What useful content is going to be rendered while the applet loads? It's like saying Window's boot time isn't problem because you can watch the Windows logo while the OS is loading.
Re:Have they fixed the startup time? (Score:5, Funny)
Well, I'm off then. I'll surf away to the other Slashdot...
Oh, wait! I wanted to see the front of Slashdot again, so I actually waited for as long as it took.
Bummer!
Re:Have they fixed the startup time? (Score:5, Interesting)
People may be annoyed by 2, 4 or even higher wait times, but they'll put up with them in the right circumstances without complaint.
Showing people a blank screen, not so much. Show them a progress bar, and they might wait for it; especially if it contains something they need.
The whole 'get it on the screen in 2 seconds or you've lost them' applies to online shopping, product reviews, forums, etc. But people are willing to wait 5-10 or even longer for their bank, their credit card, to file their taxes, to play a game, or to edit a spreadsheet. (As long as the 'start up time' is at START UP, and not after every click.)
If 'web2.0 apps' like gmail took 5-10 seconds to start up, but didn't exhibit the html/javascript flakeyness that would be worth it. And a lot of the load time could be addressed with caching, and having the VM preloaded, if that was the only stumbling block, hell they really are more *application* than *webpage* -- with some browser support they could be ready to go in the background, selected like wii channels or something, for commonly visited 'sites'.
AJAX is a mostly a train wreck on par with the spaghetti code that we inherited from the Basic/C/Cobol era. Html/javascript just wasn't designed for this sort of use. AJAX is like writing multithreaded real-time applications in Windows 3.0 or MacOS9 cooperative threading models... you can do it... and it can even mostly work most of the time if you don't bang on it too hard. But its never going to be great.
asp.net was a decent move forward, as at least it mostly shielded the developer from the ajax mess. Unless you needed to do something
But we *really* need to see a good standards based framework on the browser side, that applications can be written against.
Of course, we've always had Java and ActiveX. But Java was proprietary, and was hampered immensely by Microsofts attempts to discredit it, and embrace/extend/destroy it, including their own incompatible MSJVM, and "Visual J++" version of the language. Plus it was plagued by its own problems. Not to mention that the language itself I always found cumbersome. (I think Microsoft really did a good job with C# by comparison.) And ActiveX? Well, the less said about that plague on mankind the better.
JavaFX, at first blush, looks like it might fit the bill.
Re:Have they fixed the startup time? (Score:4, Interesting)
The limitation was never that the XMLHttpRequest object wasn't around. The limitation was that you had to deal with the realities of sending your pages over modems, creating this pressure for dynamic pages, but older computers were too slow at processing JavaScript to allow you relief by moving much display logic into the client. You'd end up locking the whole browser.
These problems are all dealt with now because of faster networks and faster computers. The tools in this area are just the same old shit with a shiny coat of paint for the most part.
Proprietary solutions & vendor lock-in (Score:5, Insightful)
(http://robots.org.uk/)
Re:Freedom of a programming language (Score:4, Informative)
They are doing a lot and doing what they said, you can't deny that.
Re:Proprietary solutions & vendor lock-in (Score:4, Insightful)
Is the JVM really less "heavy or overkill" than Flash?
AJAX Going Away? Oh noes! (Score:5, Insightful)
(http://www.intelligentblogger.com/ | Last Journal: Monday August 27, @11:47AM)
Did it occur to you that you're sounding exactly like the hype you're decrying?
AJAX is a stupid name developed for the ole' hype machine (mostly to sell conferences and books, methinks) but the basic web technologies behind it are NOT THAT BAD. To use the example from the article, am I "tearing [my] hair out over as [I] attempt to get the JavaScript working in both Internet Explorer and Firefox?" Actually? No, I'm not. And I just implemented a Comet [wikipedia.org] library in both Javascript and Actionscript. About the most frustrating thing was the fact that Opera ignored the cache-disable commands when using XML.load in Flash. So I build a solution into the library. And if you think that's fun, wait until I detect Server Side Events in Opera and use XMLSockets in Actionscript!
*shrug*
Oh, and I had to dynamically patch Safari and Opera to add support for the toSource function. Easy as for(var i in object) pie.
The problem with most "AJAX coders" is that they still think of Javascript as that cutesy language they used to do scrolling statusbar text with. But it simply isn't that bad. In fact, Javacript is a full-up, Object Oriented (or at least, OOP capable) langauge that fits the lightweight needs of the web browser perfectly. Java is a 600 pound gorilla that's better for designing heavyweight applications that are secure, robust, fast, and feature complete. The two target very different markets.
As for JavaFX, there is (if you'll excuse the expression) "nothing to see here". It's just a Silverlight competitor. Which makes it just as questionable as the product against which it's competing. If you really want a replacement for XMLHttpRequest, use XMLSocket [devpro.it] instead,
Re:AJAX Going Away? Oh noes! (Score:5, Insightful)
(http://www.intelligentblogger.com/ | Last Journal: Monday August 27, @11:47AM)
Also, OOP is not bolted on in Javascript. It's been there since nearly the beginning. It's just that 99% of web coders never actually learned how to code Javascript.
I've been a Java programmer for about 11 years. In that time, I've explored the VM and libraries inside-out, upside-down, and sideways. The conclusion I've come to is that Java in the browser is a bad idea. At least in the form of the J2SE. If it had been developed more like a J2ME plugin with access to the DOM, it might have been a decent replacement for Javascript. But it wasn't developed that way, and now I think it's not in a very good position to compete in that space.
You bring me requirements, and I'll show you the magic that modern web technology can perform. And it's only going to get better. My comments about Server Side Events and XMLSocket are meant to mention how much better it's going to get. SSE will effectively obsolete Comet-style requests, resulting in rich server "push" systems that can transmit nearly anything to the client on demand. No need to worry about different XMLHttpRequest implementations, it will all be automatic in the browser. Opera already supports this, and thanks to the magic of Javascript, it's easy to branch to code that makes use of it when available. Wrap it in your libraries, and you're ready. to. ROCK!
Which is its strength as a platform, and its weakness as a scripting language. Don't get me wrong, the computer scientist in me wants to go with static typing. I love static typing. It makes all the bad problems go away. But the web coder in me knows that distributed document technology needs something more flexible. Dynamic typing as in Javascript is that flexibility.
It's slightly out of date, but you might find this article I wrote [intelligentblogger.com] to be interesting. Web technologies are really accomplishing what Sun envisioned all those years ago.
Re:AJAX Going Away? Oh noes! (Score:4, Insightful)
(http://cumulo-nimbus.com/)
Javascript is a pretty awesome language once you strip out all the web browser DOM stuff. I've used it as an embedded scripting language in my own applications and was very surprised by its capabilities.
Re:AJAX Going Away? Oh noes! (Score:4, Interesting)
(http://www.intelligentblogger.com/ | Last Journal: Monday August 27, @11:47AM)
And the experienced engineer knows that cross-platform problems follow you everywhere. At some point you need to stop whining and get the work done. If we simply complained about the platform technologies all the time, there would be no POSIX programs, no Win32 programs, and a much smaller pool of good Java programs. Specs are specs, and they tend to get interpreted differently. As an experienced engineer you should have long ago learned how to normalize these differences rather than simply throw up your hands in frustration.
How does one answer this question? Of course you don't need Javascript for a "simple HTTP request". You need Javascript to dynamically modify the DOM, restyle the layout, respond to user input, and manage a less-than-simple HTTP request all at the same time. And like the "vealed calf" that I supposedly am, I've been finding that this design has many superior aspects when compared to a Java or Flash program. (Even though I'm actually supporting Flash with an AS2.0 version of the same APIs.)
Here's something for you to ponder. I am creating these APIs because the target environment does not support Java. It supports Flash and it supports advanced Javascripting. So like the "vealed calf", I am targeting the platform out of necessity. And you know what I've found? It's not actually as bad as everyone is making it out to be. The pitfalls are well documented and/or testable. Mostly minor cross-platform issues that will go away with each browser release. So it becomes quite easy to patch minor holes in the interim.
You know what we didn't have 10 years ago? An internet on which the vast majority of the world's population performed financial transactions. An internet that targeted your average consumer rather than business folk or hackers. An internet through which financial gain could be obtained by disrupting the normal flow of traffic.
You may be too young to remember when "Client/Server" was the latest hotness, but I remember it well. And I can tell you right now that we would have been no safer with those programs than we are with some of the moronic coders we have today. I just loved it when it was possible to telnet into a port and start executing commands before passing login credentials, because no one had ever tested the no-credential situation. All their code assumed that things happened in a certain order without ever verifying the case.
If you want to point a finger at the security problems of the web, then how about starting with yourself? Specifically, you and every programmer who writes software for the web. Computers Software is an engineering discipline just like any other. If you fail to apply proper engineering principles, you will fail. Those principles don't get learned overnight. They take years to cultivate and grow. Unfortunately, the industry wants fast answers and cheap programmers. They are rarely willing to pay for older programmers with strong skills to head up teams and ensure that the engineering is done right. Instead, they first try junior programmers, then outsourcing, then offshoring. All in an attempt to make a process cheaper by cutting corners.
You accuse me of trying to show off my "l33t"ness (whatever the hell that is). Well, how's this for "l33t"ness: A recent security advisory revealed that JSON objects were vulnerable to a cross-scripting exploit by the very nature of being serialized Javascript objects. It was mentioned that it was the first exploit that could target only AJAX-enabled applications. Well, I use JSON. And you know what I found when
Re:Hmm (Score:5, Insightful)
(http://www.intelligentblogger.com/ | Last Journal: Monday August 27, @11:47AM)
Actually, ActiveX is a patented Microsoft Security Hole(TM) big enough to drive a Mack Truck through. Effectively, Microsoft looked at Java Applets and said, "The biggest problem with it is that it doesn't access Windows APIs and has all that security BS. We can do better." Next thing you know, Microsoft "partners" are showing how you can access DirectDraw and Direct3D to make ActiveX components that were WAY more impressive than the simplistic animations that Java was capable of. Of course, the security implications hit Microsoft less than a year later as Malware started exploiting the system for all kinds of nefarious purposes.
Microsoft kinda-sorta shuffled it off into other areas after that. Now they're back with a vengence. Silverlight will be everything that ActiveX was going to be, but BETTER! Can you feel the excitement?
End of Ajax.... (Score:5, Insightful)
(http://www.intellipool.se/ | Last Journal: Wednesday January 31 2007, @03:49PM)
And there is so much big corporate inter politics involved with each side rallying their alternatives that it looks like we are stuck with the lowest common denominator, that beeing for the moment javascript.
This begs the question... (Score:3, Interesting)
(http://www.hyperlogos.org/ | Last Journal: Wednesday July 18, @08:19PM)
This begs the question, will anything built on Java achieve the security, cross-platform reliability, and programmatic friendliness that Web 2.0 "needs"? It is well-known that Java is a "write once, debug everywhere" solution. If it is running on the server side, It also begs the question, does it need all that? What does Java provide that other languages don't? It looks like it has a client-side component. FTFA, "One of the knocks on AJAX applications, aside from browser compatibility, is that it requires a large amount of JavaScript to be sent over the wire; that script could have something malicious embedded in it. JavaFX eliminates that need by using the locally installed Java SE files." Well well well, FUD FUD FUD. Yes, it could have something malicious embedded in it. And there could be something malicious in your Java code, too. Make a point, please?
Also, I'm interested in having this assertion backed up somehow. Javascript is an excellent language even if some implementations are somewhat lacking. In general the use of cross-platform toolkits seems to be accelerating Web 2.0 development for many people. Is it really true that you can't do the job with Javascript?
I'd just like to leave with this C&P and short commentary:
"This really is write once and run anywhere," he said, reiterating a 12-year-old slogan for Java. The long-range plan is to make it so applications can be written to run on all platforms." Yes, that was Java's long-range plan as well. Note that so far, it has not succeeded.
Re:This begs the question... (Score:5, Insightful)
Another Flavor of Java? (Score:5, Informative)
(http://www.animal-assist.org/donate.html)