Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Should I learning Swing or applets?  RSS feed

 
Greg Sully
Greenhorn
Posts: 18
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
in my tutorial I arrive to applet chapter.
on of my old freind(C++/java fan)told me than dont waste your time to learning applet and swing and ...
populer browsers will not support them in near future.is it right ? cause I saw people asking a lot of question about them so seems they are important.
thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66188
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Applets are deprecated and modern browsers disable them by default. You should not waste time on them.

Swing is used for more than just applets, so it might be worthwhile for creating desktop apps (though I believe that JavaFX is preferred).

If your aim is to create applications that run in the browser, then no, neither applets or Swing are viable. Web applications are not created using desktop GUI systems such as Swing.
 
Paul Clapham
Sheriff
Posts: 22480
43
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greg Sully wrote:cause I saw people asking a lot of question about them so seems they are important.


It usually takes people about five years before they let go of ideas which are obsolete, at least in the programming business. It's only been a couple of years since applets were finally rejected by the browser writers for their security failures, so you can expect people to be asking your question for a few more years.
 
Greg Sully
Greenhorn
Posts: 18
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for clarification.
 
Campbell Ritchie
Marshal
Posts: 55681
162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:. . . It usually takes people about five years before they let go of ideas which are obsolete . . .
Unfortunately some of us in academia still seem to teach things which were obsolete or superseded twelve or fifteen years ago.
 
Tim Holloway
Bartender
Posts: 18705
71
Android Eclipse IDE Linux
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Applets, alas, are a good idea whose timing was bad and then on top of that, there was the whole security debacle.

When applets first arrived, Microsoft got all snitty because they tried to embrace, extend, and extinguish Java and got slapped down in court. Thus, Java support was an expensive (in bandwidth/time) add-on to Windows that no one wanted to mess with. The Internet got faster, so the download issue got less (although a 78MB download is nothing to dismiss lightly). But by then there was a mess because too many different versions of Java were in use, and the mechanisms to co-ordinate them were lacking. Who want 7 different JVM versions at once? By the time bandwidth AND disk space became essentially non-issues, we then had the ruckus about all the security holes despite the idea that Java was a language with security built-in. So applets have been a spectacular failure.

Swing, on the other hand, is less so. Swing is actually one of 3 primary GUI platforms for Java. There was the original - AWT - which was weak and ugly, Swing, which built AWT into something decent, and SWT, which was a third-party GUI not created or supported directly by Sun, later Oracle. SWT is actually quite popular. The IBM-written Eclipse IDE is written in it, as are the GUI utilities for the Pentaho Business Intelligence suite from Hitachi Corp.

The nice thing about Java GUIs is that they are OS-independent. You can run a Swing-based Java app on Windows, MacOS, Linux and whatever Unixes are still kicking around. As well as  several more obscure java hosts. That makes it good for "universal" applications. Among the examples that take advantage of this write-once/run-anywhere capability are the ArgoUML design tool, the Universal GCode Sender (I've been playing with CNC equipment lately), and a high-performance video editor called ProjectX.

Although applets are a lost cause, there is still a way to get web users up and running on Java apps. The JNLP standard allows the fetching and caching of Java apps (not applets) from the web. This is the preferred way of installing ArgoUML, for example. Because JNLP is an app system, you don't run in a browser, you run as an independent OS process and the applet sandbox does not apply. There's no special coding required, either. Any Java app can be managed via jnlp.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!