Do you still choose java????

E

eeyimaya

Hello,

I am a java programmer from Turkey.
We will develop a program and since we have
to use some interactive flash movies in the program
we have to use QTJava from apple.Unfortunately,
there is no version of QuickTime for linux. So, our
program will run on Windows and Mac only....

We choose java two years before to develop platform
independent programs... But now we have to be platform dependent.
Our customers use %100 percents windows for this program....And
some programmers think that we should use C# for this new program...
I am in doubt!!!

Do you still choose java even if your target platform is Windows???
OR you choose C#???

eeyimaya
 
A

Adrian

eeyimaya said:
Hello,

I am a java programmer from Turkey.
We will develop a program and since we have
to use some interactive flash movies in the program
we have to use QTJava from apple.Unfortunately,
there is no version of QuickTime for linux. So, our
program will run on Windows and Mac only....

We choose java two years before to develop platform
independent programs... But now we have to be platform dependent.
Our customers use %100 percents windows for this program....And
some programmers think that we should use C# for this new program...
I am in doubt!!!

Do you still choose java even if your target platform is Windows???
OR you choose C#???

eeyimaya

Java currently with C++ for platform dependant issues. My fellow workers and
me sometimes wonder about the wisdom of this choice.

ExpatEgghead
 
J

Jon Skeet

[Removed invalid groups comp.lang.java.misc and
comp.lang.java.developer. Please consider limiting your posts to fewer
groups in the future.]

eeyimaya said:
We choose java two years before to develop platform
independent programs... But now we have to be platform dependent.
Our customers use %100 percents windows for this program....And
some programmers think that we should use C# for this new program...
I am in doubt!!!

Do you still choose java even if your target platform is Windows???
OR you choose C#???

That depends on:

o Do you need any libraries which are only available in .NET?
o Do you need any libraries which are only available in Java?
o Do you need to run any COM components or interface to other legacy
code?
o How much experience does the team have on each platform?
o Will the target machines have JVMs installed already? Does it matter?
o Will the target machines have .NET installed already? Does it matter?

Both Java and C# are very pleasant languages to work in, backed up by
pretty pleasant platforms. Their execution speeds are broadly similar
from all I've seen.
 
S

Scott Ellsworth

I am a java programmer from Turkey.
We will develop a program and since we have
to use some interactive flash movies in the program
we have to use QTJava from apple.Unfortunately,
there is no version of QuickTime for linux. So, our
program will run on Windows and Mac only....

This is a reasonable decision, if QT provides functionality you need.
It does a lot of nice stuff, and if you need what it does, it is the
only choice. If you only need a subset, then your choices expand a bit.
I believe Macromedia is trying to position Flash in this space, but I
have not had good luck using their libraries.

If multiple platform support becomes more important, especially with
Linux, I would talk with the Gnome folks to see if they have a cross
platform media API. It has been years since I worked in that space, but
they might have some usable goodies.

NB: I believe Apple is willing to do a QT Linux port, if someone comes
up with a serious wad of cash to convince them to do it. (Or Linux hits
30% market share.)
We choose java two years before to develop platform
independent programs... But now we have to be platform dependent.
Our customers use %100 percents windows for this program....And
some programmers think that we should use C# for this new program...
I am in doubt!!!

It is really your call. I prefer to avoid vendor lock-in when I can.
By using QTJ, you are locked in to Apple as quicktime's vendor, but you
can replace that with a different media layer if you encapsulate
reasonably well. By going with C#, you have to rewrite the entire app
if you want to switch vendors. (Keep an eye on Mono and Rotor - if they
get big, then this might be a smaller issue.)

Were I MS, I would put C# up before a standards process, and push cross
platform, as then the biggest weapon my enemies have would be blunted.
Do you still choose java even if your target platform is Windows???
OR you choose C#???

I do, as I have found single platform projects often produce libraries
or tools that end up going to multiple platforms.

Scott
(e-mail address removed)
Java, Cocoa, WebObjects consulting
 
S

Sudsy

eeyimaya said:
Do you still choose java even if your target platform is Windows???
OR you choose C#???

eeyimaya

Depends on whether you're writing a traditional "thick" client or a
"thin" client which merely requires a browser as the UI. I have been
going the "thin" client route for a number of years. Use a powerful
server running Java as either a light-weight servlet container (e.g.
Tomcat) or a J2EE server. That way you can have your cake and eat it
too!
 
F

Fred

(e-mail address removed) (eeyimaya) wrote in message
[...]
Unfortunately,
there is no version of QuickTime for linux. So, our
program will run on Windows and Mac only....
[...]

Our customers use %100 percents windows for this program....

[...]

I'm afraid I'm not seeing the problem. It doesn't matter what
language you use, you still won't have QuickTime for Linux.
 
J

jenniferyiu

We choose java two years before to develop platform
independent programs... But now we have to be platform dependent.



If that's platform independent, you don't have to care and worry about
platform dependent issues.



as simple as that.
 
T

Tim

jenniferyiu said:
independent programs... But now we have to be platform dependent.



If that's platform independent, you don't have to care and worry about
platform dependent issues.



as simple as that.

Perhaps his question is, "Is Java the best choice if you remove platform
independence from the equation". Since Java is not compiled to machine
code, it my not be as efficient as some languages that do.
 
J

Jeffrey Palm

Tim said:
Perhaps his question is, "Is Java the best choice if you remove platform
independence from the equation". Since Java is not compiled to machine
code, it my not be as efficient as some languages that do.

One can easily compile Java to machine code using GCJ.
 
T

Tim

Jeffrey said:
One can easily compile Java to machine code using GCJ.

That is just one possible issue he may have been refering to. Are there
any other possible reasons?
 
A

Alan Meyer

To some extent, the choice of language may depend on
the application as well as the platform.

If you are producing a Windows desktop program that
has to be fast, look good, and take maximum advantage of
the Windows GUI, then one of the Microsoft languages
will give you the most flexibility to do that. C++ will give
superior control and speed, at a significant cost in programming
time. Visual Basic will give you easier development with
some penalty in speed and flexibility. C# (which I have not
used) will probably give you the environment that is most
Java like and easy to learn if you don't know the others, but
I don't know how compatible it is with older Windows
environments.

On the other hand, if maximum use of the Windows GUI
is not that important, e.g., for a server or browser based
application, then Java is probably just as good a choice as
the others and may even be better because of all the excellent
Java based server tools (JSP, EJB, Struts, etc.)

An intermediate solution is to use Java with the Eclipse
project Standard Widget Toolkit - which gives a faster and
more native Windows look to Java applications.

Finally, I would argue that portability is always of some
value. If all other things are equal, I would always choose
the more portable solution. If they are not equal, then
portability may be less important. But it's still not worthless.
I work at an organization that thought they would be IBM
mainframe based forever. All their applications were
written in PL/1 and IBM assembler and couldn't begin
to be ported to any other environment. Then they were told
by higher authorities that their mainframe would be taken
away. It was a very painful transition for them.
 
B

Bjorn Abelli

...
*Have* to be? If it can run on *any* platform, it can run on a *specific*
platform as well...
To some extent, the choice of language may depend on
the application as well as the platform.

I do not only agree, but rather think that that's more important than to
enforce rigor in what programming language to use. Though it can simplify
*management* of software development, it can also be counter productive.

One should always try to choose the tools best suited for the task.

More important than to choose which language to use, is to enforce good
program design. A well made design can in most cases be ported to any
language with minimal efforts.
C# (which I have not used) will probably give you the
environment that is most Java like and easy to learn
if you don't know the others, but
I don't know how compatible it is with older Windows
environments.

To *develop* .NET-applications you'll need Windows 2000 or later, but .NET
can *run* on any version from Windows 98 and later.

// Bjorn A
 
R

Roedy Green

But now we have to be platform dependent.

*Have* to be? If it can run on *any* platform, it can run on a *specific*
platform as well...

I think he is saying his app needs features you can only get with JNI
not through the standard class library. Perhaps he is using some low
level Internet protocol for example.
 
B

Bjorn Abelli

"Roedy Green" ...
I think he is saying his app needs features you can
only get with JNI not through the standard class
library. Perhaps he is using some low
level Internet protocol for example.

I'm not so sure about that, since he asks if they
should switch to C# instead...

Anyway, my point was to enforce good program design rather than a specific
language.

Whether they choose Java or C#, the access to low level functions has to be
"wrapped" in some way. JNI if they choose Java, "unmanaged code" if they
choose C#.

In both cases they'll probably wind up coding in C/C++...

// Bjorn A
 
M

Mike

Tim said:
Since Java is not compiled to machine
code, it my not be as efficient as some languages that do.

Very common mistake made by many. The Java Virtual Machine translates
the Java byte codes into real cpu machine language. It's called JIT
(Just In Time) compilation.
In simple algorithms I've seen Java perform 3 times faster than
optimized C++.
Overal, Java is slower than C++, yes, but not as much as people that
think that Java is interpreted.

To reduce startup time, the Java Virtual Machine can both interpret
the code, and run the compiled code. The first time around it
interprets the code to prevent the user from seeing a visual response
delay due to the compilation time. It then decides which parts of the
code can benefit the most from machine language compilation.
You can influence the compilation behaviour through a number of
command line options.
 
P

Peter Ashford

Mike said:
Very common mistake made by many. The Java Virtual Machine translates
the Java byte codes into real cpu machine language. It's called JIT
(Just In Time) compilation.
In simple algorithms I've seen Java perform 3 times faster than
optimized C++.
Overal, Java is slower than C++, yes, but not as much as people that
think that Java is interpreted.

To reduce startup time, the Java Virtual Machine can both interpret
the code, and run the compiled code. The first time around it
interprets the code to prevent the user from seeing a visual response
delay due to the compilation time. It then decides which parts of the
code can benefit the most from machine language compilation.
You can influence the compilation behaviour through a number of
command line options.

And, you can statically compile Java as well. Although, it's not worth
doing in general for efficiency reasons as the hotspot VMs produce very
swift code, as you mentioned.
 
M

Mike

Roedy Green said:
Native compilation is also possible, e.g. using Jet
http://mindprod.com/jgloss/jet.html
with a completely stand alone exe, just as you could create with C++.

Does anyone know the stability of Jet and the like? I find Sun's
recent JVM's very stable. I found IBM's JVM buggy, especially on dual
cpu machines.
Blackdown was suprisingly stable on Linux, and I kind of see it as an
exact clone of Sun's (and vice versa, I lost track).
I'm finding the performance adequate overal for all three VM's, and
the garbage collector has really improved looks like, less intrusive,
although I was disappointed when I was playing a few applet games
online that had noticable pauses in it. Some other games didn't, so I
guess there are still things people could pay attention to to make
their apps smoother. Still not too much to ask, considering that Java
people don't have to go through endless pains of inserting delete's in
the right places like C++ people do.

Still however, I'm still a little jealous that the MS JVM's garbage
collector is less intrusive and is smoother. MS is now using their VM
techniques in .net with C# and such, giving MS just that little
competitive edge with their slightly smoother garbage collection
scheme.
Under the hood, I heard a rumour once, that MS is using a patented
technique where they double the memory usage making the work for the
garbage collector much easier, and providing smoother results.

Perhaps someone found a VM comparison that compares MS's (old) VM
running java 1.1 with Sun's 1.4.2, using only 1.1 code? Just to
compare the garbage collector and raw JIT performance?

As for exe compilations, there is the extra overhead of knowing that
QA needs to spend more testing time using the compiled exe, because
development internally getting more exposure to the JVM version for
quicker development cycles (quit program, edit source, save source,
compile source, start program, perform function until you get to the
feature being worked on). The JVM's hotswap feature also keeps
development exposed to the JVM and not the exe version.

So I question the worthwhile-ness of using an exe version, other than
making some windows clones 'happy' by showing them a 'trusty' exe.
But hey, the client is always right, so I guess there might be the odd
usage for something like Jet.
(ie, used for religious applications).

However, I haven't looked at the real number lately, probably because
I expect to find numbers that have been put together by the
exe-compilation companies themselves. I know some companies work
special algorithms in their code to influence third party performance
benchmarks too...
 
R

Roedy Green

Does anyone know the stability of Jet and the like?

I know of no bugs in the current Jet compiler or JVM. The only
troubles I have come from failing to include some dynamically loaded
class at compile time. You can find them by "stress testing" your
code, but there can always be one more.
 
L

LDV

Roedy Green said:
Native compilation is also possible, e.g. using Jet
http://mindprod.com/jgloss/jet.html
with a completely stand alone exe, just as you could create with C++.
[skip]

So I question the worthwhile-ness of using an exe version, other than
making some windows clones 'happy' by showing them a 'trusty' exe.
But hey, the client is always right, so I guess there might be the odd
usage for something like Jet.
(ie, used for religious applications).

Well, here go three sample apps that you can download and try, which I
know are compiled by Excelsior JET:

IBM Softcopy Reader for Windows:
http://www-306.ibm.com/software/applications/office/bkmgr/softcopyread.html

Seruku Toolbar for IE:
http://www.seruku.com
(well, the Toolbar DLL is apparently written in C++, but the main
engine is a Java app)

Danger Maze (arcade game):
http://www.adamantgames.com/dangermaze/

The latter two exploit the JRE-less delpoyment feature of JET Pro.
With it, you can have installations sized starting from about 1MB, but
only if you don't use Swing and AWT. :( It works with SWT though:

http://www.excelsior-usa.com/jetswt.html

Do you think these are all odd usages?
However, I haven't looked at the real number lately, probably because
I expect to find numbers that have been put together by the
exe-compilation companies themselves. I know some companies work
special algorithms in their code to influence third party performance
benchmarks too...

I am not sure about GCJ, but Excelsior has some (a little bit
outdated) benchmark results published:

http://www.excelsior-usa.com/jetbench.html

But if you do not trust benchmarks anyway, why don't you test some
real performance-sensitive or GC-sensitive apps yourself?

LDV
 

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,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top