Class 1, Part 2 |
Intro to Java 30-IT-396 |
|
Applets
-
So far we've made windowing applications that are intended to run
on the user's computer, just like a word processing or spreadsheet program.
-
But, Java really got its start in applets. Applets are Java
programs that are dynamically downloaded from the Internet and run in a
browser.
-
As with many Internet programming languages and techniques, Java Applets
started life as cheesy web page add ons that people found on the web and
added to their website. They initially added little to no value most
of the time, but have evolved into something better. Just like JavaScript
and Macromedia Flash.
-
If you fully use the networking capabilities of Java, you can make your
applets into real business programs, like stock tickers, data entry, and
more!
-
But this comes with a price... There are frustrations in building
applets.
-
You often don't know the version of Java that is running in the end-user's
browser, for instance.
-
Applets have security limitations. You cannot write to a file or
read from a file on the user's computer. If you really need to do
that, think of writing an application and using Java
Web Start.
-
And, of course, there are advantages.
-
When you know Java Application programming, you don't need to learn a whole
new language to write an applet. Sure, there are some differences,
but for the most part, you already know it. And the same goes for
server side programming, embedded device programming, servlet programming,
or any other type of Java programming.
-
Actually, you should look at all of these as one. When you think
Java program, you shouldn't automatically think of a standalone program.
Many true Java programs include many of the above components! A server
side object might work with a servlet and an applet, for instance.
That's the beauty of Java, and that also makes it incredibly easy to share
components.
-
Of course, your skills are portable as well. When I left Oracle for
Fifth Third Bank, I went from a Java server programmer on a Unix platform
with an Oracle backend to a Java application and applet programmer on a
Windows platform with a Microsoft SQL Server backend (shrug, this was a
step down in my opinion!)
Applet Basics



Created by: Brandan
Jones February 15, 2002