Some Background on Java

 

Introduction.  Most authors claim that Java was first developed in order to create a development environment and programming language that would work across different computer platforms and the Internet.  Due to these efforts Java has become one of the main development languages for internet based applications.  It can be used for everything from developing animations and graphics to interacting with users. 

Since most of the development within Java is predicated on the need for a language that will work across platforms the language is at times cumbersome and more difficult to work with than a language such as Visual Basic where the developer knows the users have a Windows operating system.  On the other hand, the increased range of implementation is often considered worth the extra effort.

But Java can also be used for developing stand-alone applications that will work on a large variety of platforms.  While these sorts of applications tend to be more the province of C++, Java has its own development market.

On the internet there are needs to have both client and server side processing and Java is probably the development environment most capable of providing the greatest number of options.

Applets.  In general, applets are created to run on the client's computer from a web browser after having downloaded from a server.  This process is not as simple as advertised, but describing the complexities of this will wait until later in the class.  Remember, there are a large variety of browsers and different versions of these.  This definitely impacts the ease with which an applet can be downloaded and executed.

Applications.  In general, people usually don't think of Java for developing applications, but it has its advantages.  They are more likely to work across platforms as applications if they have been developed using Java.

Servlets.  These are a definite improvement over CGIs.  It should make sense there are lots of situations where a developer wants people to access code on the web, but rather than downloading and executing on the client, the code is executed on the server.  This should be good in several ways.  For example, servlets are in a very close to compiled form and ready to execute, they don't have to be downloaded across the internet to run, they are likely to be running on a very fast machine or server.

JSP.  JSP or Java Server Pages are very similar to ASPs, but they actually run faster and have all of the development flexibility of Java.  They are converted into Servlets and run.

Applets are most likely to be run on the client.  Applications are more likely to be distributed and run on a client, though they could be run on a server.  Servlets run on a server.  JSP pages run on the server.  This should show you that Java has a pretty complete set of options for developing for clients and/or servers.

Java is an object oriented language and developers need to be able to create their own classes and objects.  While there are quite a few predeveloped classes, the developer needs to have considerable proficiency in object oriented programming to make use of these.

Now we will start developing our own programs.