Why is Java so UNAMBITIOUS?

T

tk

using Swing. Although thin client is trendy a swing client is far more
efficient in terms of development, maintenance and final performance. Only
changes in data are downloaded and even with high bandwidth network

We're using Swing as a thin-client on our 3-tier app communicating to EJB
Session Beans that invoke
Oracle PL/SQL packages. Swing is also perfect as a thin-client.
And I am awaiting a faster alternative to Swing. And if any emerges I

I can't recall the URL but the original authors of Swing are currently
underseeing a project called 'Tiger" which
(part of it) attempts to address the issues of making Swing run
fast/efficient within an applet. Currently (as you
know), it takes plug-in's and about 32-35MB of memory just to load Swing as
an applet. Tiger, supposedly,
is going to allow "lazy-fetching" for Swing related applications so your
applets startup and run fast. They're also
addressing some other type of layer within Tiger that will allow you to
bypass the requirement of having the JRE
installed on the client in order to run a Java Applet with swing (I have no
idea how they're planning to do that).
 
A

A Bag Of Memes

Nick said:
Hi.

With all due respect...

[blah blah waffle]
But even if you like SWING you must surely have considered why so few
ppl build standalone desktop apps based on SWING? If AWT or SWING had
any appeal to mainstream companies and programmers then Java on the
desktop would have happened long ago, but it dosen't and Java on the
desktop is never going to happen with AWT and SWING as the main offer.
Sun and IBM need to do something drastic.

I couldn't disagree with you more. Many developers including myself are
using Swing.

I know many developers who use Swing (mostly because their Java IDEs use it)
but I've never met a Windows user who liked it. They've become accustomed
to very specific behavior and when Swing doesn't emulate it 100% it annoys
them. Swing has gotten closer over the years, but it's a moving target.

If you are writing software for other developers they tend to give you more
slack about this sort of thing. Business users are a different story.
 
A

Andy Flowers

Agreed. Since over 90% of the GUI users are on Windows they expect a certain
level of functionality and the Windows look and feel which Java (be it
Swing, SWT or AWT) doesn't provide.

Personally (and no flames please) my opinion is to use Java for GUI
development only if you have to or have a business need to, i.e. for
utilities provided with cross platform stuff such as a database server, ERP
application, for development tools, etc.

For general purpose GUI development use a tool that supports the platform
you are developing for (I prefer Delphi on Windows) as you will [hopefully]
have a faster development cycle and a nicer UI, and move the processing to a
J2EE server if needs dictate.

On the server side it's a different matter. Java is excellent here and you
quite often develop on one server but deploy on another, in fact that's
probably the case in a lot of situations. In my case it's developing on
Windows and deploying on Solaris/Windows.

A Bag Of Memes said:
Nick said:
Hi.

With all due respect...

me said:
Why isn't SWT and JFACE included in Suns JRE?
[blah blah waffle]
But even if you like SWING you must surely have considered why so few
ppl build standalone desktop apps based on SWING? If AWT or SWING had
any appeal to mainstream companies and programmers then Java on the
desktop would have happened long ago, but it dosen't and Java on the
desktop is never going to happen with AWT and SWING as the main offer.
Sun and IBM need to do something drastic.

I couldn't disagree with you more. Many developers including myself are
using Swing.

I know many developers who use Swing (mostly because their Java IDEs use it)
but I've never met a Windows user who liked it. They've become accustomed
to very specific behavior and when Swing doesn't emulate it 100% it annoys
them. Swing has gotten closer over the years, but it's a moving target.

If you are writing software for other developers they tend to give you more
slack about this sort of thing. Business users are a different story.
 
N

Nick

With all due repsect (WADR)

Aah, Swing is not a very thin client at "32-35 MB" just to start it up.
In fact I would call that a thick client. By thin client I mean a browser
which just receives pages in whatever format and displays them, i.e. no
logic. Using applets is a hybrid IMHO.

Re: no JRE required on client
I presume they would download this on the fly. Without JRE it would be
difficult to run code on the client.



----- Original Message -----
From: "tk" <[email protected]>
Newsgroups: comp.lang.java.programmer
Sent: Sunday, July 20, 2003 7:09 PM
Subject: Re: Why is Java so UNAMBITIOUS?
 
N

Nick

With all due repsect (WADR)

Aah, Swing is not a very thin client at "32-35 MB" just to start it up.
In fact I would call that a thick client. By thin client I mean a browser
which just receives pages in whatever format and displays them, i.e. no
logic. Using applets is a hybrid IMHO.

Re: no JRE required on client
I presume they would download this on the fly. Without JRE it would be
difficult to run code on the client.



----- Original Message -----
From: "tk" <[email protected]>
Newsgroups: comp.lang.java.programmer
Sent: Sunday, July 20, 2003 7:09 PM
Subject: Re: Why is Java so UNAMBITIOUS?
 
N

Nick

Aaargh (and apologies)! [copy paste failed in my highly proprietary news
reader]

See comments inline.


Andy Flowers said:
Agreed. Since over 90% of the GUI users are on Windows they expect a certain
level of functionality and the Windows look and feel which Java (be it
Swing, SWT or AWT) doesn't provide.

Personally (and no flames please) my opinion is to use Java for GUI
development only if you have to or have a business need to, i.e. for
utilities provided with cross platform stuff such as a database server, ERP
application, for development tools, etc.

For general purpose GUI development use a tool that supports the platform

General purpose to me means it will run on any platform.

you are developing for (I prefer Delphi on Windows) as you will [hopefully]
have a faster development cycle and a nicer UI, and move the processing to
a

Why would Delphi give you a faster development cycle? I agree with you 100%
on the fact that it will give a nicer UI.

J2EE server if needs dictate.

I would never move my client side validation to the server. That would be
a mess and slow. This is an area where thin clients suck as well.

On the server side it's a different matter. Java is excellent here and you
quite often develop on one server but deploy on another, in fact that's
probably the case in a lot of situations. In my case it's developing on
Windows and deploying on Solaris/Windows.

A Bag Of Memes said:
Nick said:
Hi.

With all due respect...

Why isn't SWT and JFACE included in Suns JRE?


[blah blah waffle]


But even if you like SWING you must surely have considered why so few
ppl build standalone desktop apps based on SWING? If AWT or SWING had
any appeal to mainstream companies and programmers then Java on the
desktop would have happened long ago, but it dosen't and Java on the
desktop is never going to happen with AWT and SWING as the main offer.
Sun and IBM need to do something drastic.


I couldn't disagree with you more. Many developers including myself are
using Swing.

I know many developers who use Swing (mostly because their Java IDEs use it)
but I've never met a Windows user who liked it. They've become accustomed
to very specific behavior and when Swing doesn't emulate it 100% it annoys
them. Swing has gotten closer over the years, but it's a moving target.

If you are writing software for other developers they tend to give you more
slack about this sort of thing. Business users are a different story.
 
M

me

Jim Sculley said:
me wrote:



The obvious problem being that there are different levels of 'support'
for Windows GTK, Motif, OSX and QNX. For example, where is the browser
help component for Linux?

In other words we need Sun and IBM to be a little more ambitious?
(look title)

Not really. Why should I care what other people are or are not doing
with Swing? It does what *I* want it to do, and that's all that matters
to me.

But the post talks about mainstream - not about you and utilities for
programmers.

Since 95% of desktops run an OS fom a company that has been decidely
hostile toward Java, I think you are being overly optimistic about what
would have happened if more companies fully embraced Swing.


I'm running a variety of Swing apps. Java is already on the desktop.
Anyone willing to spend some time understanding the architecture of
Swing can create just about any application you can imagine.

So why arent they?
You apparently haven't run many SWT apps on Linux. Plenty of slowness,
flicker, and cluelessness to be found. No widget library is immune from
performance problems or bad coding. SWT is as flawed as Swing in many
respects.

Actually I have developed some apps on eclipse using gtk2, so i know
that bind is slow, but my mainstream audience is windows. And with a
little ambition maybe they could tune the gtk2 bind as well.
 
T

Tim Tyler

: Why isn't SWT and JFACE included in Suns JRE?

It's not currently very portable.

: I would love to build desktop apps in Java, but AWT and SWING just
: isn't good enough.

I sympathise.

Swing offers a poor, buggy, backwards GUI out of the box - IMO.

: And why isn't Suns JRE distributed and installed by default on
: platforms such as RedHat and Suse?

It's on the CDs.

The idea of Linux isntalls is to let people pick the components they
want to install.
 
W

Will Hartung

The hard part of course is that half of the validation is trivial "must be a
date" or "integer in range" and the other half needs to be confirmed against
the database.

This is where HTML clients break down. It's difficult to have server
validation occur in the middle of the entry process, such as entering a
valid Customer Code or something.

(big hand wave here, I'm sure that it might be possible with some very savvy
Javascript hacking, I'm just not that savvy, and from what I have seen it's
fairly complicated to get working.)

I would have the trivial client side validation done on the client side, and
then also do it on the server side. The reason I would do that is because
then the server side can be used from a potentially unvalidating client
(say, a SOAP message or something), and the trivial validation is really not
that expensive compared to a Customer lookup.
So here's a question for anyone interested: if you were designing a
notation for expressing validation contraints in a manner independent of
language and platform, and suitable to use in both highly interactive
client-side validation and less interactive server-side validation, what
would it look like? Or do you have a different idea on how to solve
this code duplication problem?

I think for a wide variety of validations, they can be readily expressed in
a simple syntax. The difficulty is in fields that are nominally trivial, but
related to other fields. For example, HotelCheckOutDate must be a date and
greater than HotelCheckInDate. That can complicate it fairly readily, but
it's not really horrible as most field sets on forms (or set of forms) are
pretty self contained.

But once you abstract your validations into a simple, contrived syntax, you
basically store this as meta data and then have the clients load them
appropriately, and then have a validation engine the interprets the simple
syntax and performs the validation. Or, say for an HTML client, it compiles
the data into a javascript validation function that is downloaded with the
page. The same meta data can be used on both ends, and this cleans up the
code duplication as its centrally located rather than compiled into the
application.

Also, if you can make the validation selective depending on the client. So,
you can express all of your validation, and only the parts that are actually
available to the client are sent to it.

For example:
(field customerNo (type char 10) (exists select customerNo from
customerTable where customerNo = :customerNo))
(field arrivalDate (type date) (> arrivalDate currentDate))
(field leaveDate (type date) (> leaveDate arrivalDate))
(field noGuests (type number) (between 1 6))
(field smoking (type char 10) (list "Smoking" "Non-Smoking" "No
Preference"))
(field roomType (type char 10) (list "King" "Double" "Suite"))
(page (required customerNo arrivalDate leaveDate noGuest roomType))

That information can easily be filtered to not send the CustomerNo
validation to the client, as, say, the server only has access to the
database. The rest can be handled easily by the client. The page clause
represents validation that happens on submit. Interpreting and/or compiling
something like this is really trivial to do.

But store it in a neutral format that's easy for applications to leverage,
and you eliminate the duplication issue, though not necessarily a versioning
problem. Say the roomType field was new and an old client tried to contact
the server. It might return an error message "Please fill in room type", yet
there isn't one on the screen.

So, you can make it as complicated as you like.

Regards,

Will Hartung
([email protected])
 
D

Dushyanth Inguva

Well well well...

I seem to have missed some fun here.
The point in my post was not to crib about the lack of a particular
feature. I could have well lookedup at the documentation as suggested.

What i was trying to address is that from times immemorial, MS
programmers have more power, flexibility and productivity at their
hands than us Java guys.

We could well argue that this is at the cost of cleanliness of the
implementation (design and architecture). I don't have to specify
which architecture leads to a cleaner code. (Thats why i worship
Java).

Ill end this without dragging ourselves into the "Battle of
Architectures" (They are already a lot of sites about it)

Dushyanth Inguva
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,216
Latest member
topweb3twitterchannels

Latest Threads

Top