 |
Unhybridising RIA development with Swing
Posted by evanx on February 02, 2007 at 11:28 AM | Comments (26)
Our editor highlights
Bruce Eckel's Hydridizing Java.
What i don't like about web development is hydridization, ie. Java/JScript/HTML/CSS.
I think having to program and integrate multiple hetergeneous languages with relatively limited IDE support, is distracting.
Another common ubiquitous example is Java/SQL, mitigated by JDO, JPA et al. Having said that, i love HTML/CSS and SQL, and enjoy representing these as Java objects to leverage my IDE.
The timing for Java (applets) for internet clients for Web 1.0 was too early.
The bandwidth, RAM and CPU of the common users and their PCs were insufficient
for anything other than a browser rending HTML.
Naturally this led to the current popular technologies eg. PHP, AJAX, server-side Java,
which leverage HTML/browsers.
Of course the efforts of Sun et al followed the money to the server-side.
However, with megabits of broadband, gigs of RAM, and multicore multigigahertz processing
becoming the norm, I contend that events are shaping up for Swing to live up to its potential
as a serious candidate for Web 3.0, with Netbeans as one of its many allies. 50megs in the scheme of 2gigs
is not relevant, and multi-megabyte WebStart downloads via multi-megabit
broadband is worth a few second's wait for a killer application you use regularly.
Java/Swing/Netbeans potentially allows developers to deliver RIA and desktop functionality with rapid ease.
There are engineering problems to be solved (and killer applications to be developed). But fortunately there are lots of engineers,
not least ourselves. And it's opensource, so... Let's do this! :)
Bookmark blog post: del.icio.us Digg DZone Furl Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment
-
Pleaaaaase! Everyone around -- listen to Evan!
Bruce Eckel is just M$/Adobe partisan that tries to lead you in wrong way!!!
Desktop Java rulezzzzz!!!
Java and only Java! This is your only right choice for RIA (both web and desktop) applications!!!
Swing is simple! JRE installation is small!! Java has excellent OS integration (shared memory, tray, ad-hoc windows, file-system hooks)!!! UI does not matter at all!!!!
Or, most importantly, all your Swing-based UI is "multicore multigigahertz processing" with no additional efforts!
Please, all and everyone, trust Evan and Sun Evangelists* -- I need certain time frame to satisfy my monetary ambitions ;)
* Evangelists -- persons these come in play when science and practice shows that you are doing wrong things or someone force you to do wrong thing but you still have to do wrong things.
VS
Posted by: vsilaev on February 02, 2007 at 03:09 PM
-
Now, sehr geehrte Herr Evan, a bit of practical questions:
How many languages you are using for any real Java projects? Java, SQL (EJB-QL, HQL, etc), several dialects of XML, Ant XML -- sounds real? Do you still "... think having to program and integrate multiple hetergeneous languages with relatively limited IDE support, is distracting"???
"The timing for Java (applets) for internet clients for Web 1.0 was too early. The bandwidth, RAM and CPU of the common users and their PCs were insufficient for anything other than a browser rending HTML" -- it was due to 3-month time frame to turn embedded device language into general-purpose language, Mr. Evan. Ask Mr. Gosling et al how it was.
"Of course the efforts of Sun et al followed the money to the server-side" Oh, Mr. Evan, do not even mention Sun when talking about such things. Sun has any commercially successful application server? Nope. Sun leads Java IDE market? No. Sun earns its income through Java tools/products. Neither. Sun is the most irrelevant player in Java space. Do not assign others failures/success in Java area to Sun. After certain time question will rise again who has written java.util.Calendar. Cross your fingers that everyone will understand it was not Sun but IBM subsidiary :)
"Java/Swing/Netbeans potentially allows developers to deliver RIA and desktop functionality with rapid ease" This "potention" was never realized in more then 8 years. My pardons, but this is enough to define Swing state as "impotention".
VS
Posted by: vsilaev on February 02, 2007 at 03:41 PM
-
"How many languages you are using for any real Java projects?"
Probably three or four, basically those you mentioned. A very good reason to avoid introducing others, if possible, pleazzee.
"Sun is the most irrelevant player in Java space"
Well, this is fantastic. While there are good points in asking whether Sun could make more money out of Java, saying that it's irrelevant in the Java space is just fantastic. Even funnier is that one day everybody is blaming Sun for not having done this and that in the latest JDK, the following day it's "irrelevant". :-)
"This "potention" was never realized in more then 8 years"
While this might sound a good argument, and it is up to some extent, it's not so definitive as it might seem. There are some good counter-examples: for instance Ruby was invented in late '90s and up to a couple of years ago was known only to a few people. Now it's rising fast...
PS BTW, In the Artima forum I just learnt that Flex does not support multithreading. This sounds as a severe limitation for developing complex desktop application, as most people are saying that multithreading is mandatory to deal with multicore computers...
Posted by: fabriziogiudici on February 02, 2007 at 04:56 PM
-
vsilaev, can i request that your limit yourself to using one exclamation mark at a time!? ;)
i wrote that i believe that swing hasn't realised in potential in "more than 8 years" as you say, because its was too early in terms of bandwidth, RAM, processing power. That made Swing Webstart applications seem relatively heavy. That was the price for modern crossplatform development. It's a fantastic language and platform for the developer, but not necessarily great for end user eg. with 64megs of RAM and 33k modem. To accomodate the average user, simple browser/HTML was the answer.
The situation is different today, and more importantly, changing rapidly every day, and let's think about the situation in two years time, and what we can do in the meantime...
java is a fantastic language and platform, with awesome IDEs and libraries, and is still evolving to be even better. It is the only crossplatform, opensource option, and is web-deliverable.
Sure things can be improved here and there. That will always be the case. If you don't like something, you can fix it. More to the point, large companies like IBM and Google could come to the party now that it's opensource. You or i could hack on WebStart, or vlc bindings, or mplayer bindings, or whatever we need, and make things happen. We can innovate!
The KDE guys made the best of Qt and built KDElibs. The gnome guys took the Gimp toolkit and evolved that. So maybe someone with a big interest in media will make an Mplayer module or something - who knows what we'll see in future.
as to how many languages i might use on a project besides Java, it's mainly SQL of course, and sometimes HTML eg. for reporting. So those i integrate as Java objects as in articles i wrote namely "The SQL" and "HTML Builder"
But using JPA and the like, one can develop in Java most of the time, enjoying your IDE. The idea of developing java for the server-side, and another language for the client-side, doesn't appeal to me personally. (Actually using anything other than Swing that i know and love, doesn't appeal eg. SWT.)
In a previous project, i was using java SQL objects for writing and executing adhoc database queries in Java in Netbeans, which i preferred immensely to writing raw SQL, as i wrote about in "The SQL."
Posted by: evanx on February 03, 2007 at 01:38 AM
-
Nice post Evan,I think AJaX has whet peoples appetite for rich dynamic interaction at the client side, simultaneously augmented by server based content. It was a very exciting step forward, from so-called Web 1.0. It was even a significant improvement over locally interactive flash applications.The problem is; AJaX débuted at its maximum potential. It is still constrained by Javascript. In many ways I am very glad AJaX came along, it raised peoples expectations about the kinds of applications that can be provided over the net.So ultimately the question becomes; Where do we go from here? Aside from the bandwidth, processor, and memory constraints of the mid to late nineties, I believe Applets were a bit ahead of their time conceptually. When people now ask how to harness this potential opportunity, I show them this simple example. I enjoy watching eyes light up, as the possibilities become apparent.Good times ahead,John
Posted by: cajo on February 03, 2007 at 06:59 AM
-
Thanks John. There are very many great languages and frameworks for HTML-based applications ie. the web as we know it, and AJAX makes these more responsive. But for seriously rich applications, my bias tells me that java/swing has to be a very strong contender.
The idea that everything has to run inside the browser, i don't get. I don't think that the browser should be the OS. I think it should be one of many collaborating apps/windows managed by the desktop/OS.
i think bindings for opensource components such as VLC and Gecko, would serve us very well for RIA and media applications.
Posted by: evanx on February 03, 2007 at 10:51 AM
-
@fabriziogiudici
I don't know how it happened, but either I mistype phrase originally or just killed several words from phrase when tried to apply formatting. Obviously, the phrase is: Sun is the most irrelevant player in Java __applications__ space. It would be simple stupidity to neglect Sun’s role as Java language and JVM creator :)
Next, I agree that Rails (a library/framework) makes Ruby (the language) popular also Ruby was unknown for nearly 13 years. But it is Swing (library) that provides enough reasons to blame Java (the language) for more then 8 years. Complexity, poor OS integration, slowness -- majority of these complains are addressed to (poorly-written) Swing applications but exposed then to Java as platform.
I worked with Swing with Java 1.1 (it was separate library that time), I worked with Swing with Java 1.3. My total experience with this library is more then 3 years of quite intensive development. Guys, besides JRE download size and size of JNLP-launched applications (these are several to ten times larger then Flex applications) the main drawback of Swing library is over-complexity due to over-design. Heck, I would even prefer dumb simplicity of MFC :) In fact, once I used AFC (application foundation classes) instead of Swing. Believe me or not, it was MS UI library for pure Java 1.1
Good Swing applications are exceptions rather then commodity. Just think about this -- the best Swing UI-s out there are IntelliJ IDEA and NetBeans. But it takes the best Java brains to make these possible. Swing is the library for geeks only?
@evanx -- I didn't attack Java as language or Java as platform. I'm quite comfortable with Java on server side and I just applaud to JVM team. My point is that there is no Java on desktop and it will not be there in observable time. Ok, anything besides IDE. Btw, state of standard Java libraries is far from excellence. Just think about java.net.* classes these are not suitable for mutliuser applications or recall last time you have to do calculations with java.util.Calendar.
VS
Posted by: vsilaev on February 03, 2007 at 01:08 PM
-
vsilaev, you make a good point about IDEs being great examples of the power and utility of Swing. ThinkFree is another great example of the possibilities.
actually i don't mind if there are a few gaps and complexities here and there - i always expect to build a basic framework to fill in the gaps and reduce complexity where and as it suits me - i enjoy this tremendously and so if the basic toolkit was "complete" and "perfect" actually i would be quite gutted ;)
There are a great many Swing applications in enterprises that we will never see or hear about, but many of them are very extensive and very slick database applications, with charting and all means of cool things.
With desktop Linux and MacOSX becoming ever more popular - and linux desktop being a considerable option to cut costs, being pushed by Novell, IBM, Red Hat et al - and CIOs enjoying their trendy macbooks - i think that developing crossplatform clients in the enterprise eg. using swing to consume webservices, is more compelling than ever, not to mention the recent opensourcing of the whole java platform.
In the consumer area, which is dominated by Windows, most applications are written in C/C++ and VB, and nowadays also C#.
Besides the obvious reasons for this, another is that average user's RAM and maybe CPU has never been sufficient for the modern likes of Java and C# until very recently, and give it another year, cos this trend will continue of course, which is the point i was making in the above blog entry.
Even though our industry develops new technology at a rapid pace, sometimes it seems as though many enterprises and developers are like massive oil tankers that cannot change their course very quickly, eg. are VB programmers switching to C# in a hurry? i expect not.
We ourselves might wish things to change for the better more rapidly, but the reality is that they won't. Witness the "This is the Year of the Linux Desktop" expectations that we have every year ;)
So i think that Swing's heyday is still dawning. It doesn't matter what has happened in the past 8 years - what's more interesting is what will happen in the next 8 years - its the dawn of a new era, with opensource java :)
Posted by: evanx on February 03, 2007 at 11:43 PM
-
just an observation:
almost everything I have read on the java.net blogs about SUN beats is about we can use Netbeans..."
NetBeans is great, I am using that at home because it is amazing.. but I can't use it at work because my compny is an old adopter of Eclipse and the decisions guys don't want not event to discuss about IDE changing...I mean, beat all coins in NetBeans seems to be a growing mistake from SUN perspective...
Posted by: felipegaucho on February 05, 2007 at 04:10 AM
-
i won't mention that other opensource IDE because it uses SWT and not Swing! ;)
Posted by: evanx on February 05, 2007 at 04:38 AM
-
Nice Points, Evan. It was just when I saw those "Web OSes" that I realized that the future is in RIA and Swing RIA in particular :).
I cannot understand how it turns out that a usual bugtracking system running in the browser is capable of completely freezing my machine that easily handles 3 Java IDEs + some java apps + a bunch of native apps. Thin clients aren't thin anymore, but are still ugly and inconvenient. Browsers were designed for documents, not for apps.
Swing complexity is only a problem when it comes to something simple and dumb. But don't tell me about Swing "overdesign" when there exist office suites and (pseudo)desktop managers written in Ajax :)
Posted by: alexter on February 05, 2007 at 07:02 AM
-
QNext is the RIA Client and java killer application that could prove the java platform potential.
I saw that QNext client has an jre bundled with it, but honestly I don't know if its UI is Swing (or even Java/JRE) based ...
Posted by: linus on February 05, 2007 at 07:07 AM
-
I think this post missed the very valid points made by Bruce! I develop in Java on all tiers and have many production Swing applications (not to mention mobile and server applications), I am even developing our next project using Swing/JavaEE in Netbeans right now... But Bruce has a point!
The problem isn't CPU/bandwidth, if you think that then we are in a worse condition than ever! The problems are:
Deployment Admin - Installer requires admin privileges and so is much harder to deploy than a Flash equivalent. This requirement exists in order to enable Java features that might never be used by that user...
Deployment Stability - the Java installer is flaky and fails often, JWS is remarkably buggy (even in Java 6!!!), ActiveX installer is also flaky and don't get me started on applets!
Complexity - Swing is improving and the frameworks/bean binding are great (where were they 5 years ago when we needed them?), but then you need to mix and match X different JSR's and build something functional ugh... Don't get me started about complexities of Swing/Java EE communications or pack 200 there are so many things that you just have to (like me) be insane about Java in order to know about.
Performance - I have a relatively modern machine and it still freezes for what feels like ages when I first enter a page with an Applet. Memory when running more than one Java application is ridiculous. MVM could have solved it and helped Java EE considerably but nothing... People always say that more memory/CPU will help a bad implementation, that is just wrong because as memory/CPU rise so do requirements and expectations.
What Bruce was saying is that while Java is far more powerful than Flash, on many RIA's you don't really need the full power of Java. If you don't then Flex does many things better than Java specifically deployment, user experience and performance. I'm a huge Java fan and I don't use Flex personally but if you guys at Sun don't take these things seriously and keep the nonsense you have planned for Java 7 on track things will get ugly.
Posted by: vprise on February 05, 2007 at 11:55 AM
-
vprise, those sound like some real engineering problems to be solved, and i hope and believe they will be, if not by Sun soon enough then someone else hopefully.
regarding (4) i find that acrobat can freeze my firefox when it has to load, and it crashes my firefox occassionally. I would expect the same problem when any (large) plugin eg. java. I guess this is a firefox problem rather than java one?
Anyway, personally i don't believe in big plugins in the browser like acrobat, flex, or Java - i think it's asking for trouble.
I don't believe that large RIAs should run in the browser, but rather should be separate apps/frames managed by the desktop/OS, collaborating locally with other apps including the browser (and leveraging the desktop/OS infrastructure eg. D-BUS, clipboard, and what-not), and consuming webservices, using REST and such, and be securely managed/contained eg. only using the local filesystem for caching the application, cookies and what-not. That sounds like a more reliable and useable approach?
it seems that web developers and web companies want the browser to become the desktop/OS. I suggest that idea is not gonna wash for web3.0.
Posted by: evanx on February 05, 2007 at 01:00 PM
-
vprise, I think you are missing Evan's point in your turn :). While Ajax or Flash are better for simple RIAs there comes a time of complex ones that will need all the power of Java. Applications that traditionally were on desktop are now becoming RIAs. Look around at all these online offices, webtops and stuff: is flash a good choice for a word processor? I don't think so...
Hmm... I've never noticed that! Maybe because it's normal to have admin rights on your desktop machine...
Unfortunately, true
See my first paragraph
Two moths back or so I was ranting about some of these problems somewhere on java.net forums. But then I decided to make an experiment and ran 15 java applications on my machine (some pretty huge). And what a surprise: it worked just fine! I don't think a regular user runs task manager/top every 5 minutes to check memory consumption :)
I don't think that sitting and waiting for Sun to solve our problems is a good idea (even for a “The Doors” fan :) . Let them play with closures, properties and stuff, they deserve some fun after all the great things they've done for Java :)
P.S. Let's drop the technical details for a second. As users, are you all seriously comfortable with today's corporate and internet web applications? I'm not. Maybe I'm old-fashioned, but I still use normal desktop apps whenever possible. I use my gmail mailbox solely through POP/SMTP client and I'm writing this post in OpenOffice :). And I don't really care even if I need to download and install all these apps manually, because the usability is worth it.
Sincerely,
Alex
Posted by: alexter on February 05, 2007 at 03:48 PM
-
Over the weekend I was evaluating XAML and Flex. I'm still playing with Flex but after I saw that the .Net 3.0 redistributable is 50Mb I gave up on that. I can't imagine trying to get that deployed on 3,000 workstations (sure we use automated tools, but the .net installer fails, and you still need the network bandwith to push 50Mb * 3,000, and when it works the installer takes 10 minutes on a relatively modern PC)...
Shockingly even Acrobat is now something like 20Mb. What used to be a quick, standard plugin download is now something I'm starting to take issue with ...
With all the power of the Java platform, J2SE 6 is only 12Mb? That is amazing.
Posted by: jsando on February 05, 2007 at 08:17 PM
-
No one is saying that Java isn't more powerful than Flash, I think Java is superior to Flash in every technical theoretical term. The problems illustrated by Bruce are real and they are not engineering problems! They are management problems.
The problems which you guys are downplaying are problems that Java promised to solve years ago and Flash has already solved. Management at Sun has directed the development of Java and led Sun's fine engineers in directions that they saw fit and chose not to invest in these issues. The problem is that they still choose to do so and invest no resources in solving these engineering problems. Assuming the community will solve something like that is just wrong! Java is huge, I have been programing in it since it first came out on the web... I know the source code of 1.1 all the way up to 6 and its not trivial for small community members to make changes like that. Furthermore, many of the changes are point changes to installation testing and features that don't require developers as much as they require proper QA and direction. Relying on open source for anything concrete is asking for trouble, the community is great for many things but don't expect it to build your product for you... Won't happen.
About the response to my partial list of points:
1. I didn't think I need to explain that it isn't normal to have admin rights on your machine. In corporate settings regular users (to whom most applications are targeted) do not have these rights. Flash requires no such rights and so can be easily installed with a single click in Internet Explorer by any user... Java cannot. Even if the Java application makes no use of any feature that would require an administration right I will still need to pay the penalty. If something like this was feasible we would have seen many think free office deployments...
3. The complexity goes beyond Swings complexity. Tools don't do basic things that Delphi did in 1996, Flex makes many small things simple. JWS which was invented to "simplify" deployment makes basic ideas like pack 200 compression so hard (and buggy) its just a wonder anyone uses it... Wait no one uses pack 200...
4. Acrobat is irrelevant! Flash is the competitor here, not Acrobat. Now the fact that you can run many Java applications at once... I'm personally running at least 5 Java applications on a regular basis so yes it is possible and it doesn't kill my machine. However, I had to wait for the startup time for every single one of them and every so often my machine slows down to a grinding halt. I have a powerful machine and I doubt most of my end users enjoy the same, there is a reason small applications aren't written in Java and there is a reason why links to Java Applets are usually labeled Java... People don't like entering a site with Java in it because their computer freezes for a while, I love Java and even I don't like doing that! Notice that the JavaLobby has Flash in their home page rather than a Java Applet... If there is one place where you can rely on people having the latest VM installed its the JavaLobby but still Flash is more convenient.
The reason all of these suck is because they are all fixable and have been for ages, Sun chose to ignore these issues and picked the low hanging fruit for Java 6. I really appreciate the fixes such as the gray rectangle/PLAF/performance etc. of Java 6 but JWS had some serious regressions in this release and generally the VM/deployment needs allot of work. Work that isn't getting enough attention from Sun management who are too busy slapping themselves on the back and congratulating themselves over a fine release while Flash/.Net take more territory from Java. The problem is that when the wakeup call for losing the client finally arrives to Sun's management the server and embedded markets will also be lost since the situation isn't much better there.
Posted by: vprise on February 05, 2007 at 09:53 PM
-
I think Bruce Eckel is pulling a similar stunt as Bruce Tate did last year when he suddenly switched from being a major Java evangelist to a major Java hater when he got a contract to write a book about Ruby...
And oh, XML is no language. It's a document format description specification standard.
IMO Flash is a disaster, good only for animated buttons that go "ploink" when you press them and are a megabyte to download for each one of them.
Posted by: jwenting on February 05, 2007 at 10:42 PM
-
People seem in search of a silver bullet. I reckon the silver bullet is to stick to your guns ;)
Choose java cos it's crossplatform, mature and opensource, pray that someone is gonna fix problems that affect you, and have faith that someone will, and in the meantime, work around them
Posted by: evanx on February 06, 2007 at 01:43 AM
-
Evan, faith is not something that relates to software development. The problems I raised are not isolated and not new, it took tremendous pressure from the community to fix cleartype/PLAF/grayrect etc. in Swing not to mention the 295/6 JSR's which are WAY overdo.
Flex doesn't worry me one bit, its the current attitude at Sun that worries me. Right now the offering Sun has on the client has some remarkable technical advantages but also some remarkable omissions. Java has a terrible reputation on the client and people at Sun are trying to spin this as prejudice rather than actually listening to these many valid problems.
What worries me the most is Java 7, rather than fix the many problems facing the current Java VM people have gotten it into their head that we are missing language changes?? Faith, sorry but no.
Posted by: vprise on February 06, 2007 at 03:33 AM
-
Java's reputation as a client side platform is 60% politics, 30% historical (and no longer accurate), and 5% hype.
It's in large part due to the past performance problems and poor LAF of AWT, which are perpetuated by the Java antagonists without ever checking (they have no interest in checking) whether it's still at all accurate (it isn't).
Posted by: jwenting on February 06, 2007 at 05:05 AM
-
jwenting, on what do you base these numbers?
My company placed quite a substantial investment on production Swing software, from our experience there are lots of real world problems with Java SE clients (and yes we do know Swing inside and out). It obviously depends on your deployment scenario but lets look at some scenarios in depth:
Traditional Business - A very common fat client solution still popular today, the client is a GUI that connects to a database. Most of the small business applications are built like that. Oracle has some tools to do this in Java and there are some 3rd parties but its all non-standard and nothing really competes with Delphi/VB/Powerbuilder etc. This is a crying shame that tools in 2007 still can't compete with products released in the mid 90's.
Distributed Enterprise - This is Java's bread and butter and it does rock when accessing distributed objects. But it isn't simple, the Java EE client applications are just a deployment joke! It is not practical by any means. So pretty much everyone either builds a custom solution based on serialization/uses web services (ugh). This just sucks. Sure you can use RMI or CORBA IIOP if you export the right stubs and have some remarkably complex deployment logic that doesn't work very well in production.... Maybe its us but I was never able to get any application server to work in such a scenario. Then we can talk about the remarkably buggy complex deployment options such as JWS/Applets and getting the sysadmin of an enterprise to install something like a new version of a VM... Ugh.
Hosted Thin Client - Java is impossible to run in thin clients like SunRay's. The overhead per VM instance on even the biggest hosted server is so big its impractical.
Standalone Desktop - I'm a Java developer and a Java advocate so I use Java applications when possible such as jEdit, DbVisualizer, Netbeans etc... These are good applications, they all ship with installers tailored to specific platforms which is OK and some applications ship with the VM inside to make installation smoother. Java can compete here, but its not as good as it can be. Overhead is much bigger than a native application, installation is more complicated and fragile.
So yes, Java's reputation is bad. But I wouldn't say that 95% is due to hype, politics and history... If Java were to suddenly come out with a remarkable revision that would offer fixes to these things all of that politics and hype would diminish very rapidly.
I recently had a discussion with a guy in the JavaLobby and he knows his Java, yet when he had a recent small project he needed to build he pulled out an old copy of Delphi. I wouldn't do the same, but I understand him completely! Delphi would produce what his users would perceive as a superior product in a shorter amount of time! It has support for proper fat client database bound widgets out of the box, it has a native compiler, the end user application starts up immediately, the GUI builder is easy and fast to use... So why should he pick Java? Cross platform is a killer feature for very few people, Java needs to be better in every way and it isn't better than a 1996 copy of Delphi in many ways.
Posted by: vprise on February 06, 2007 at 06:56 AM
-
Shai, what the real-world deployment issues with WebStart for Swing apps? I don't have much real world experience of this except for one contract where it seemed to work well for them on intranet (with windows clients), and that was 1.4
I'm asking because i'm sort of betting my future on Swing via WebStart...
If one were to assume that all clients had at least java5 (otherwise java6) installed, then is WebStart ok? eg. to upgrade JRE
from java5 to java6 if necessary, and launch a Swing app written using Java6
Posted by: evanx on February 06, 2007 at 09:10 AM
-
I already bet some of my future on JWS and I can't say I lost because of it but it would have been nice to know a few things beforehand. Problems up to Java 5 are well known and documented on the web so I won't go into them, I also won't go into all of the issues of detecting JWS and using the ActiveX plugin to automatically install Java since I assume you know these and if not you can pretty much find most of this on the web. We went with Java 5 since small internal pilots worked very well and we were bullish about it. I'm working with Java 6 myself although we haven't rolled it out and so far the results are pretty bad, I'll try to detail that as well, anyway this is a partial list of the big things that really freaked us out in no particular order:
Online mode doesn't work - JWS up to Java 6 had no concept of "online mode". You could either declare an application as offline which would allow it to launch when you are not connected to the internet or declare nothing. The spec indicated that when working in the normal mode the application must connect to the server and check for an update. Problem is that if it can't connect to the server but it "thinks" its online the timeout will occur normally and the application will run without being updated even if "offline" isn't enabled! The solution was to add a new tag to the JNLP file to allow you to explicitly require such a test, this is a Java 6 only solution which we didn't test yet... Problem is it came out too late after we made a HUGE assumption that the software will always stay current! (this is a network heavy client so we didn't want an offline mode and relied on easily changing the wire protocol).
Hosting over https doesn't work - At least in Java 5, when the application JAR's were hosted over HTTPS rather than HTTP they worked for most of us. But then "some people" in "some companies" who could see our https server normally couldn't get the application installed. No error or anything... Eventually we just moved the JAR's (pack.gz'd) into HTTP and made only the communication over https. Yes normally the JAR's don't need to be over https, but this is a "perceived" security measure that we would have liked to enjoy and the fact that "some" of the people have a problem is a recurring theme we encountered with JWS.
Sometimes it fails for no reason and you have to clear the cache - just like that. We instructed people to run javaws and clear the cache problem solved, their error reports were pretty unclear and I have no idea how their cache got corrupted. This was only on Java 5 and I have no idea on how this is in Java 6 right now. They rewrote the whole storage engine so I assume there will be more problems rather than fewer since the code is brand new.
Pack 200 is a pain - Not a bug but you have to use a servlet in order to enable pack 200. Not nearly as easy a deployment as JWS is supposed to be even if you only target Java 5+... The thing is that at least one of the servlets that implements this functionality that I found at Sun's site, doesn't work. I spent well over a day getting this thing to work which should have been a no brainer. Pack 200 itself though is unbelievable, compression is just a night and day difference.
Proxy in Mozilla doesn't work - New to Java 6 if you have a proxy configured in firefox but disabled and launch a JWS application it "sometimes" fails see this.
Verification of signed JAR's can become painfully slow - I ran into this the other day, a Netbeans platform application just took forever to launch. So long I was sure it was stuck... Turns out it wasn't, it was just so slow it was unbearable (launching it under JWS 5 was fine), this was because JWS took forever to verify all the signatures.
If you have proper support forums and people in place and you are willing to spend the time on that then JWS can be used with a small risk of some people failing and never coming back. I would suggest having an alternative for the few people who have a problem with JWS so they can download a local client for use.
Posted by: vprise on February 06, 2007 at 10:08 AM
-
Shai, thanks for the valuable info :)
Posted by: evanx on February 06, 2007 at 01:10 PM
-
My pleasure (not so much I would rather that JWS would work smoothly).
BTW I just got an email indicating that number 6 the JAR verification is the result of "double signing" a JAR. So there is a workaround for that one.
Posted by: vprise on February 06, 2007 at 09:25 PM
|