Why not written in Java?

T

Tim Smith

Could someone who was involved in any of these projects please let me know
the reasoning that a software development team gives for NOT using Java
even when they intend for their project to be cross-platform compatible?
It seems to me that if Java was so adaptable and capable all of these
programs would have been built in it!

The key is that while a developer may intend to provide their software on
multiple platforms, their users, as individuals, usually do not give a damn
about that. A user is going to buy the program for Windows, and *only* for
Windows, or is going to buy it for Mac, and *only* for Mac, and so on.

Combine this with the fact that the distribution of users on platforms is
highly skewed toward Windows, and you have most of the answer.

Suppose developer D1 makes his program in Java, not using native code
anywhere, so that his application runs out of the box on pretty much every
platform that has Java. Developer D2, on the other hand, whose application
competes with D1's application, develops it as a native Windows application.
Assume both D1 and D2 are good, comptetent, developers.

Here's what happens. D1 beats D2 on Mac, Linux, etc., because D2 doesn't
run there. But on Windows, D2 trounces D1, because D2's application takes
full advantage of Windows, fits in better with other Windows programs, etc.
The net result is that D2 sells a lot more.

Meanwhile, over on the Mac, guess what? You'll have D3, a Mac developer,
who is also doing an appliction in this space. D3 is a die-hard gung-ho Mac
developer, writing cool Cocoa applications, using every cool thing Apple
has, etc. Now D1 gets trounced on the Mac by D3 (trounced even worse than
it was on Windows by D2, because Mac users are less tolerant of applications
that deviate from the platform's GUI standards).

At some point in here, D2 might even port their application to Mac, and D3
might port to Windows, both making it even worse for D1 there.

You can see where this is going, I'm sure. On a given platform, a native
application beats a completely platform-independent application, and so what
a developer saves by not having to write more than once they lose in lost
sales on all the platforms. It ends up being better to write native
applications keeping in mind that you will want to port them later to the
other platforms.

The above is for GUI applications for end users. For other types of
applications, the dynamics are different.
 
R

Raghar

C++ offers many advantages over Java, including:

Much smaller memory footprint.
Faster program startup time.
0.5 for Java programs
0.5 average for C++ programs
0.2 for ASM programs
If Java standard had splash screen sooner, Java programs would be at par
with perceived startup time of the above mentioned applications.
Faster execution speed for many kinds of operation
(though Java is also fast for some things)
???
If you are talking about unverified array access, I like programs
without ability of memory access violation.
No required JRE runtime package installation
(if statically compiled, C++ will not require
libraries on the target computer - though
very often C++ programmers do require them.)
Tell that to my Linux. Also tell that to all programs I'd like to run in
64 bit mode.
Of course you can also use Excelsior JET. (or kick GCJ programmers into
creating more cappable, and less abusing version.)
Finer grained control over memory and thread
management.
People who were forced into REALLY exactly control memory, hated it.

Does someone need more than correctly working >2 ms preemptive
multithreading? Why? Thread management should be work of the OS
sheduler, NOT programmer.
Native user interfaces (e.g., Windows, not Swing)
This is not advantage at all. For example I like when my applications
don't have look and feel of OS. So they could look really OS independed.

In fact I often use OpenGL for GUI.

People that needs at all cost it's GUI to look exactly as rest of OS
programs, might use SWT. BTW it looks like there is some limit on amount
of native widgets on windoze XP pro service pack 2.
More access to the environment.
This is about the only valid point. Neccessity of creating special add
on libraries, and check them against viruses...

Multiple inheritance.
Have you worked in any project that needed to be reliable? It doesn't
save enough time to be worthy in long run.
 
B

bowman

Thomas said:
Apparently, Swing is the dominant GUI toolkit in North America.

I find that extremely hard to believe unless there is some sort of qualifier
in that survey.
 
T

Thomas Hawtin

bowman said:
I find that extremely hard to believe unless there is some sort of qualifier
in that survey.

It seems at least plausible to me. Delphi, for instance, has been very
popular, but that doesn't mean Microsoft Word (or Firefox, etc.) is
written in Delphi.

Tom Hawtin
 
B

bowman

Thomas said:
It seems at least plausible to me. Delphi, for instance, has been very
popular, but that doesn't mean Microsoft Word (or Firefox, etc.) is
written in Delphi.

Perhaps Java is more prevalent in segments of the industry that I am not
familiar with. I just don't run into many Java applications, which leads me
to question the dominance of Swing. When I see the surveys and papers that
report that Java/Swing is the most popular language, I realize there is a
whole world I don't know anything about.
 
A

Alan Meyer

bowman said:
I find that extremely hard to believe unless there is some sort of qualifier
in that survey.

I also find it very hard to believe.

If we regard "dominate GUI toolkit" as meaning the one that
the most number of end users see for the most number of
hours, I'd say that the Windows API and the many layers
over it like Microsoft Foundation Classes and Visual Basic
are vastly more dominant than Swing, probably by two, three
or four orders of magnitude. Think for example about MS
Office, Internet Explorer, Firefox, Outlook Express, and a
few other applications that occupy 99% of most users time.

As for the number of programmers using Swing vs. those
using one of the MS Windows toolkits - that may depend on
how you count the Windows toolkits. Are Visual Basic and
MFC two different toolkits? They are, but they represent
the same underlying tools.

Most Java programmers I know aren't writing Swing applications,
they're writing applications that face the user via a web
browser.

I'm hard pressed to think of a single, popular and well known
program running under Swing, but that may just be my lack
of knowledge of what's out there.

Alan
 
A

Alan Meyer

Raghar,

I think that a lot of your points are well taken, but
they're about ease of programming, not program
efficiency.

For most of what most programmers do, ease of
programming is more important than efficiency. But
it's not true of all programs. I have worked on numerous
projects where efficiency and/or control is critical.

For example, I've been on publishing projects where
a program must parse and process a million or more
XML documents. Using the C++ parsers and XSLT
processors rather than the Java based ones might
take hours or days off the program run time.

Or consider what happens in a web browser like Firefox
or IE, where a user may have 10, 20, or 40 web pages
open at once. Or a word processor where a user might
be editing a 10 MB technical manual and do a search
for some words, or format a document for printing. Or
an image editor like Photoshop or GIMP where a user
might have a 10 megapixel image open, with five or six
editing layers and multiple levels of undo.

Or consider command line tools like grep or wc or
uniq. I can process a file with one of those tools
faster than I can load and initialize the Java virtual
machine, never mind load a Java program and run
it.

I understand why detailed memory management,
programmer supplied destructors, and multiple
inheritance seem scary to you. They do put more
demands on the programmer and make it harder
to produce a bug free program. But they are still
justified for some projects.

Some people would say, Why use Java? Why not
do everything in Excel, or a declarative language like
SQL, or RPG (that's "Report Program Generator", not
"Rocket Propelled Grenade" :)) But you can't solve
every problem with simple tools. Sometimes you
need a more complex tool like Java.

And sometimes you need a still more complex
tool like C++, or a simpler but trickier one like C.

I would venture to say that, until computers become
many times faster than they are now, with many times
more memory (which will eventually happen) there
will not be a popular word processor or web browser
or photo editor written in Java. And it will be many
years more before we see system software written
in Java.

Alan
 

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

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top