Are Java Applets obsolete today?

  • (2 Pages)
  • +
  • 1
  • 2

21 Replies - 41813 Views - Last Post: 01 January 2013 - 05:33 PM

#1 gfcf14   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 90
  • Joined: 19-January 11

Are Java Applets obsolete today?

Posted 30 October 2011 - 08:57 PM

Hi everyone at dreamincode! =D I would call myself a "Java Enthusiast", since I started programming on it since August of 2010 and just recently finished a game (with a lot of help from here that other forum sites wouldn't provide) and am onto the coding of another one. Lately I've been talking to a friend who has to do a game (a group work) for his programming class in java by the end of his semester. The thing is, he told me he's working with his partners to do the Applet portion of his game.

I should probably be ashamed to say, but I have never made a java program that uses any applet libraries. Although I have read that because of ActionScript Flash objects, they have become obsolete. But I wanna know for sure, and though my knowledge of java is of a bit more than a year (and should I say I learned the principles of game programming in an unorthodox way since I had used ActionListener instead of Runnable?), I just have come to love the language so much that I intend to someday, hopefully not too far from now, learn to work with more complicated libraries of it. Are Java Applets considered obsolete today, compared to Flash Objects, or is there still any tiny bit of advantage they might hold against any other animation enhancers that would be worth in knowing them? Though this is not urgent, any answers related are welcome and really appreciated =)

This post has been edited by gfcf14: 30 October 2011 - 08:58 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Are Java Applets obsolete today?

#2 stackoverflow   User is offline

  • D.I.C Addict
  • member icon

Reputation: 166
  • View blog
  • Posts: 545
  • Joined: 06-July 11

Re: Are Java Applets obsolete today?

Posted 30 October 2011 - 09:19 PM

I would say no (they are not obsolete)-- as long as you use them for the right reasons. I would say running a game in a browser is a pretty fair use of a Java applet if the game is pretty demanding, uses hardware etc.

This post has been edited by stackoverflow: 30 October 2011 - 09:19 PM

Was This Post Helpful? 0
  • +
  • -

#3 macosxnerd101   User is online

  • Games, Graphs, and Auctions
  • member icon




Reputation: 12306
  • View blog
  • Posts: 45,403
  • Joined: 27-December 08

Re: Are Java Applets obsolete today?

Posted 30 October 2011 - 10:34 PM

Moved to Java Programmers for better discussion.
Was This Post Helpful? 0
  • +
  • -

#4 pbl   User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8378
  • View blog
  • Posts: 31,956
  • Joined: 06-March 08

Re: Are Java Applets obsolete today?

Posted 31 October 2011 - 03:56 AM

They will always be usefull, for sonme specific tasks.
The real question is are AWT and Swing obsolete ?
Was This Post Helpful? 1
  • +
  • -

#5 baavgai   User is offline

  • Dreaming Coder
  • member icon


Reputation: 7166
  • View blog
  • Posts: 14,933
  • Joined: 16-October 07

Re: Are Java Applets obsolete today?

Posted 31 October 2011 - 04:13 AM

*
POPULAR

To be fair, I'd say yes and no. Applets had their golden age early on. ActiveX was their only competition; essentially invented by Microsoft to be competition. ActiveX is pretty dead for a number of reasons, though you could probably say it lives on under other names.

You don't see Java applets in on the web as much, anymore. Many applets did simple things you can now do with CSS ( rollovers. ) Or marginally more complex things you can do with Javascript. Indeed, Javascript, ironically named to take advantage of the popularity of Java applets, stole a lot of their thunder.

Then, Flash moved into Applet's neighborhood and kind of kicked them out. It was faster, installed easier, and didn't run into all the versioning issues that Java did. For a while, Java folks were in denial. Then they found that Java excelled at the middle tier and what kids did with their browsers didn't seem as important. Today, HTML5 and Javascript could take the same market away from Flash. Who knows.

Applets are still useful, though, and will never go away. If you write a Java Application and want an entire enterprise to have access to it, an applet is often the shortest path to success. I see Applets in a lot of business software. Companies are comfortable with Java, where Flash looks like a toy.

So, no, not dead yet. But certainly stronger in some circles than others.
Was This Post Helpful? 5
  • +
  • -

#6 pbl   User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8378
  • View blog
  • Posts: 31,956
  • Joined: 06-March 08

Re: Are Java Applets obsolete today?

Posted 31 October 2011 - 06:39 AM

View Postgfcf14, on 30 October 2011 - 11:57 PM, said:

I learned the principles of game programming in an unorthodox way since I had used ActionListener instead of Runnable?)

If you write a game in Java a lot better to use ActionListener called by a Swing.Timer than using Thread or Runnable interface. To use Runnable with Swing you have to really know what you are doing. So you unorthodox way is a lot more kosher than you seem to think. :)
Was This Post Helpful? 1
  • +
  • -

#7 gfcf14   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 90
  • Joined: 19-January 11

Re: Are Java Applets obsolete today?

Posted 31 October 2011 - 02:53 PM

Thanks to everyone =) I'll make sure I learn them sometime then.

@ Mr. pbl: And here I was so sure Runnable was much more popular and easier to use (because I saw it in O'Reilly's Killer Game Programming in Java) !!
Was This Post Helpful? 0
  • +
  • -

#8 pbl   User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8378
  • View blog
  • Posts: 31,956
  • Joined: 06-March 08

Re: Are Java Applets obsolete today?

Posted 31 October 2011 - 04:59 PM

View Postgfcf14, on 31 October 2011 - 05:53 PM, said:

Thanks to everyone =) I'll make sure I learn them sometime then.

@ Mr. pbl: And here I was so sure Runnable was much more popular and easier to use (because I saw it in O'Reilly's Killer Game Programming in Java) !!

Is it an old book using AWT ?
If you are using Swing, Thread are not the good way... actually Thread yes but the one fired by a Swing Timer
The game main loop should be driven by the Timer NOT by a Runnable that sleep() ... not a good idea at all
macosxnerd101 has a good tutorial about that
Was This Post Helpful? 0
  • +
  • -

#9 gfcf14   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 90
  • Joined: 19-January 11

Re: Are Java Applets obsolete today?

Posted 31 October 2011 - 06:17 PM

Here is a description of the book http://shop.oreilly....780596007300.do apparently it came out in 2005. I got it because it has tutorials and code to learn how to do side scrolling, isometric, and 3D games.
Was This Post Helpful? 0
  • +
  • -

#10 nick2price   User is offline

  • D.I.C Lover
  • member icon

Reputation: 565
  • View blog
  • Posts: 2,826
  • Joined: 23-November 07

Re: Are Java Applets obsolete today?

Posted 14 November 2011 - 03:56 PM

I have been doing a lot of research on security lately, and I have discovered that java applets are quite often used as malicious applications called Java drive bys. When you allow java to run on your machine, you are also allowing the running and execution of a crypted file which will allow people to take over your computers. Even scarier, I heard people talking about silent java drive bys which need no authentication whatsoever. However, one good thing which came about in researching this topic was I learned a whole new area of java, I think it is called the java bytecode checker or something, which will take the bytecode outputted from a jar and run a series of test on it to determine whether it is malicious or not. This is actually really good if you think about it as it would be practically impossible for any mere mortal to analyse bytecode. There is actually a lot of security you can add to applets which I dont think many people know about (well, I have never seen them mentioned in any applet tutorials). Additionally, never have your browser set to automatically run java applications :bigsmile:
Was This Post Helpful? 1
  • +
  • -

#11 jon.kiparsky   User is offline

  • Beginner
  • member icon


Reputation: 11041
  • View blog
  • Posts: 18,857
  • Joined: 19-March 11

Re: Are Java Applets obsolete today?

Posted 17 November 2011 - 09:00 AM

I agree with the consensus here: applets have uses, but they're not the top choice for most purposes. The security model presents some real challenges to the programmer, for one thing. And, honestly, mobile is taking over that space pretty effectively.
There's a very good guitar tuner applet out there, for example, but I just use the even better one on my phone.
If you're interested in programming for a distributed environment in java, I'd steer you first towards android. That's where things seem to be happening these days. If you want to do things on the web, I don't know what the hot technology is, or what the next hot technology will be, but it's not java applets.

However, it's not a bad idea to write a few applets - maybe some simple games, like an Othello or something - to get the hang of it. It's actually not a difficult programming model, and there's stuff to learn there.

View Postnick2price, on 14 November 2011 - 05:56 PM, said:

I have been doing a lot of research on security lately, and I have discovered that java applets are quite often used as malicious applications called Java drive bys. When you allow java to run on your machine, you are also allowing the running and execution of a crypted file which will allow people to take over your computers. Even scarier, I heard people talking about silent java drive bys which need no authentication whatsoever. However, one good thing which came about in researching this topic was I learned a whole new area of java, I think it is called the java bytecode checker or something, which will take the bytecode outputted from a jar and run a series of test on it to determine whether it is malicious or not. This is actually really good if you think about it as it would be practically impossible for any mere mortal to analyse bytecode. There is actually a lot of security you can add to applets which I dont think many people know about (well, I have never seen them mentioned in any applet tutorials). Additionally, never have your browser set to automatically run java applications :bigsmile:



I'd like to know more about what you're finding here. As I understand it, the sandbox model means that the worst an untrusted applet could do would be to lock up your jvm. Can you throw up some references, so I can satisfy my curiosity on this?
Was This Post Helpful? 0
  • +
  • -

#12 nick2price   User is offline

  • D.I.C Lover
  • member icon

Reputation: 565
  • View blog
  • Posts: 2,826
  • Joined: 23-November 07

Re: Are Java Applets obsolete today?

Posted 17 November 2011 - 09:07 AM

Going to pm you as if posted publicly, I am sure people would look into it further for malicious use.
Was This Post Helpful? 0
  • +
  • -

#13 gfcf14   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 90
  • Joined: 19-January 11

Re: Are Java Applets obsolete today?

Posted 17 November 2011 - 09:26 AM

@nick2price: pm?

@jon.kiparsky: Do you know if it's possible to convert normal java applications to be used in android phones? I'd rather avoid doing them on the app inventor >.<
Was This Post Helpful? 0
  • +
  • -

#14 jon.kiparsky   User is offline

  • Beginner
  • member icon


Reputation: 11041
  • View blog
  • Posts: 18,857
  • Joined: 19-March 11

Re: Are Java Applets obsolete today?

Posted 17 November 2011 - 09:45 AM

I haven't converted an application to android - I'm still learning my way around android - but I think it should be more or less possible, depending on the structure of the application. If it's well designed, with functionality well encapsulated, you shouldn't have a problem.
Since android doesn't rely on Swing, if you have a swing GUI embedded in your application, you'll have a problem - probably have to do a lot of rewriting. But if your display and control are separate from your model, you should be able to make it work pretty well.

This might make a nice tutorial, actually.
Was This Post Helpful? 0
  • +
  • -

#15 nick2price   User is offline

  • D.I.C Lover
  • member icon

Reputation: 565
  • View blog
  • Posts: 2,826
  • Joined: 23-November 07

Re: Are Java Applets obsolete today?

Posted 17 November 2011 - 09:47 AM

pm = personal message. The investigation I made is not something I would be willing to share publicly as it could be used in ways you could only imagine. Plus, dreamincode doesnt endorse the topic of hacking, and nor do I. Everything I done within my investigation was carried out on myself, within a virtual environment. It was purely for research purposes as part of something I am carrying out at university. I would only share my findings, through pm, to members of this site who I know are trusted.

I can of course though share with you some important information on protecting yourself. Anti viruses are useless, as hackers have an easy solution to making their malicious files undetectable. If you ever download anything from the internet, the only real way to make sure you are safe is to run the file in sandbox or a virtual environment to make sure no other processes are running alongside the original item.

Anyways, this is starting to go off topic now, so lets keep to applets.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2