Applet Overview


Introduction

The primary focus of this chapter is on the topic of Java applets. An applet is a Java program that can be embedded in an HTML page and run in a web browser. An applet can be as feature-rich as an ordinary Java application although the security restrictions placed on an applet put a practical limit on its functionality. Here you will learn about an applet’s life cycle stages and how to embed applets in HTML pages using the <applet> tag. You will also learn about applet security restrictions and how to approach applet program design with these security restrictions in mind.

The secondary focus of this chapter is on writing Java programs that can manipulate relational databases using the JDBC API. The comprehensive project in this chapter will show you how to write an applet that connects to, and exchanges data with, a server via Remote Method Invocation (RMI). The server application will translate the RMI method calls into JDBC calls against a MySQL relational database.

I attempt to cover a lot of ground in this chapter and in the interest of keeping the page count within reason I’m going to cry uncle up front and tell you what I’m not going to talk about. I will not dive deeply into relational database design or the Structured Query Language (SQL). Volumes have been written about these subjects and their complete treatment is simply not possible in one chapter. I will also not dwell too long on the topic of MySQL other than to say that it is a great open source database and to provide some guidance on how to get it up and running as quickly as possible. I discuss how to get it, install it, and fiddle with it a bit to get it to work for you. (I use the term “fiddle with it” in the affectionate sense.) I have listed several good references related to all three topics at the end of the chapter.

The issues you must resolve regardless of what database product you use are the same. You must obtain it, install it, configure it (create databases, tables, users, permissions, etc.), determine the name and location of the appropriate JDBC driver class, and formulate the correct database connection URL. Getting the database installed, configured, and ready to go represent easily 90% of the challenges you will encounter in trying to learn and understand the peripheral concepts related to the material presented in this chapter. If you are a novice, learning Java, SQL, JDBC, and the idiosyncrasies of your preferred database all at once can be overwhelming. I will make every effort to focus your attention on the important points regarding these issues so you can move forward with confidence in learning about applets and JDBC.




Java For Artists(c) The Art, Philosophy, and Science of Object-Oriented Programming
Java For Artists: The Art, Philosophy, And Science Of Object-Oriented Programming
ISBN: 1932504052
EAN: 2147483647
Year: 2007
Pages: 452

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net