Re: Java! hooah! What is is good for...?



On Apr 19, 2:52 am, Joshua Cranmer <Pidgeo...@xxxxxxxxxxxxxxxx> wrote:
Daz wrote:
On Apr 19, 2:01 am, Arne Vajhøj <a...@xxxxxxxxxx> wrote:
Daz wrote:
I've done some C++ programming in the past, but I couldn't get into
it. This was back in my Windows days, and I started getting fed up
with how Windows worked, or rather didn't work, so I gave up.
I'd like to know just how useful Java will be to me. Can I make games
with it? By that, I mean just like you'd make using Flash, but
hopefully more secure. Can I use Ajax over multiple domains freely, or
are there restrictions? I am heavily into web development at the
moment, and I have seen lots of Java applets about, but they are quite
self contained and standalone. Can Java interact with a browser? I
like the thought of being able to integrate Java into my Web site.
There are lots of Ajax Web sites popping up all over the place these
days, and I'd like to use Java in the mix if it's possible to do so.
Is this possible, or am I expecting too much?

To answer your questions about the capabilities of Java:
(A note before I answer: I haven't written much in the way of applets or
written anything in Flash, so I could easily be wrong)

That's fine by me. So long as I know you are speculating, no-one can
accuse you of giving false information. :)

a) You can easily make a game using Java (easier than Flash, IMHO)

Excellent. Any games I did create would be simple games, such as
solitaire, hang man, word games etc.

b) Unsigned applets cannot make connections with servers outside of the
applet's home server, although anything goes for signed applets.

Is that actually Java's restrictions, or the browsers restrictions?
I've OKd many of these applets in the past, so it won't be a problem.
For IE to allow cross domain queries, you need to dig into the
settings and configure it. For the average user, it's like being
dumped in middle of a rain forrest without a map and being told to
find your way out.

c) Java can somewhat interact with a browser, although what you are
really looking for is the JavaScript/Java interaction.

Yes, that's exactly what I wanted. So basically, I have the same
arsenal available through Java, as I would is I used JavaScript, by
effectively using JavaScript as an abstraction layer. The only down
side is the head aches incurred when some browsers don't support
standard functions, but that's still a bonus.

d) Java is probably more secure than Flash.

I was hoping so. I think you can decompact Flash, and hack it quite
easily with the right tools. Many people use it to get a good score on
Web sites with Flash Games. Is there any way to increase security
within Java code, by obfuscating it or something? Or is it just really
hard to crack? Perhaps that's not an easy question to answer. I will
consult my good friend Google.

e) It might take as long as a year to be able to write complex Java
server-side/client-side interactions, although programming Java in
general should only take a few months.

That's the down side about any programming language. Statistics show
that it takes on average 10 years to become an expert in any
particular language. I think this also includes spoken languages.

What's the learning curve likely to be for someone who did some basic C
++ a few years back, and has spent the last 2 years dealing with
JavaScript and PHP (which of course are both quite low level
languages).

JavaScript a low-level language? It is true that JavaScript is quite
library-deficient, but it is at least a high level language as FORTRAN.

Hehe, that's true. By low level, I mean that it sits on top of God
knows how many layers of software, and it doesn't have any kind of
direct interface with any of the hardware.

The Java applet security model is probbaly even more restrictive
than the JavaScript one.

Hmm. I'm not sure about that. JavaScript is mainly limited to within
the browser, for obvious reasons. Any file writing/reading you can do,
is seriously limited. In order to acheive that for Firefox, you need
to script a JavaScript XPI, which has to be installed by the user, and
it uses Firefox's internal API. Other than that, nothing downloaded
from the web can write access external files on the OS. I am not 100%
sure about IE, however, as it breaks all the rules.

AFAIK, IE is as restrictive as Firefox except for stuff like ActiveX and
whatnot.

ActiveX is Microsoft's way of turning a bug into a feature. Look
everyone ActiveX!

ActiveX (adj): Several gaping holes in one's Operating System.

I really need to stop bashing Microsoft. Sorry, I've had a rough ride
with them.

Does this sounds like Java to you, in the sense that if it's a web
app, you can't read/write files?

You can read/write at least temporary files for unsigned applets,
although signed applets are less restricted in their file usage.

What about a standalone Java app? Do they also have to be signed at
all? I would guess not as you ware willingly installing it.

The biggest problem with Java applets is users that either does
not have Java or have a very old version of Java.

I was under the impression that Java apps automatically check to see
if the correct version is installed, and if it's not, it's
automatically updated. Is this wrong, or does it only apply to the
newer versions of Java?

Using "normal" Java applets, Java will not automatically update
(although Java Web Start does, I think), although it is not too
difficult to at least prompt the user to update Java using either
System.getProperty("java.version") or fiddling with advanced VM errors.

If you know C++, JavaScript and PHP then I think you can
learn Java well enough to do some actual work within a few
months.

That's a releif to know. I don't expect to be a guru overnight, but I
was hoping that I might progress quite quickly. With JavaScript, and C+
+, just about everything is platform specific in some way or another.
This is why I am looking forward to using Java. :)

Thanks for your input.

Daz

You're welcome.

Thanks a lot :D

I am getting up to speed to NetBeans 5.5

Wow, this is AWESOME! It reminds me of my C++ days with Microsoft
Visual IDE. Only netbeans is much faster and a lot less buggy. Why
wasn't I told about Java before?? Hehe.


.



Relevant Pages

  • A Nice functional language
    ... I came across an interesting functional language called Nice. ... program in Java, in the sense that I never even examined a Java ... applets and games using Java 3D. ... Nice compiler place everything in a jar file, that one can use the JVM ...
    (comp.lang.functional)
  • Re: Java inside Javascript
    ... but isn't it possible to use JSP with JavaScript as the script language? ... The java on a JSP runs on the server. ... JavaScript as the scripting language in section JSP.1.8.1 of the 2.0 ...
    (comp.lang.java.programmer)
  • Re: unchecked cast
    ... I don't see why EL expressions are any better than java expressions. ... The development of complex, powerful tag-based systems is basically the creation of a programming language like any other, albeit one with a grotesque syntax and a primitive, badly thought out design. ... Smart companies uses tools like GWT to generate JavaScript or AJAX taglibs instead of writing JavaScript manually. ...
    (comp.lang.java.programmer)
  • Re: Attempt to de-mystify AJAX
    ... I jumped into Java Server Faces because you could supposedly use it without JSP, using straight java code for everything. ... And since it is still an approach to client event handling on the server, it is suggested to incorporate javascript where needed. ... Java doesn't run in the browser and interact with the DOM. ...
    (comp.databases.pick)
  • Re: Should I learn C before Java ?
    ... Because JavaScript code initially ran -- and still frequently ... is the case for Java. ... The language itself is a very interesting, and fully object-oriented, ... fully formed core API to complement the language. ...
    (comp.lang.java.programmer)