|
In This Issue
Welcome to the Java Technology Fundamentals Newsletter This monthly newsletter provides a way for you to learn the basics of the Java programming language, discover new resources, and keep up-to-date on the latest additions to Sun Developer Network's New to Java Center. Note: For the code in this issue of Fundamentals to compile, use the JDK 6 software. Basic Java Technology ProgrammingMaking Sense of the Java Platform Classes and Tools Desktop Java Platform Development Server-Side Java Platform Development Free Developer Tools Java Technology Courses For More Information What Is an Exception? The term "exception" is shorthand for the phrase "exceptional event." An exception is an event that occurs during the execution of a program and that disrupts the normal flow of the program's instructions. When an error occurs within a method, the method creates an object and hands it off to the runtime system. The object, called an exception object, contains information about the error, including its type and the state of the program when the error occurred. Creating an exception object and handing it to the runtime system is called throwing an exception. After a method throws an exception, the runtime system attempts to find something to handle it. The set of possible "somethings" to handle the exception is the ordered list of methods that had been called to get to the method where the error occurred. The list of methods is known as the call stack (see the next figure).
The runtime system searches the call stack for a method that contains a block of code that can handle the exception. This block of code is called an exception handler. The search begins with the method in which the error occurred and proceeds through the call stack in the reverse order in which the methods were called. When an appropriate handler is found, the runtime system passes the exception to the handler. An exception handler is considered appropriate if the type of the exception object thrown matches the type that the handler can handle. The exception handler chosen is said to catch the exception. If the runtime system exhaustively searches all the methods on the call stack without finding an appropriate exception handler, the runtime system (and the program) terminates. Read the rest of this tutorialTrail: JavaBeans JavaBeans is a portable, platform-independent component model written in the Java programming language. The JavaBeans architecture was built through a collaborative industry effort and enables developers to write reusable components in the Java programming language. With the JavaBeans API, you can create reusable, platform-independent components. Using JavaBeans-compliant application builder tools, you can combine these components into applets, applications, or composite components. JavaBean components are known as beans. Beans are dynamic in that they can be changed or customized. Through the design mode of a builder tool, you use the property sheet or bean customizer to customize the bean and then save (persist) your customized beans. This trail is represented in the following lessons: JavaBeans Concepts describes the basic notion of JavaBeans and what makes a bean.
Using the NetBeans GUI Builder
Writing a Simple Bean
Bean Properties
Manipulating Events
Bean Persistence
Long-Term Persistence
Introspection
Bean Customization
Using the BeanContext API Java SE Application Design With MVC by Robert Eckstein What Is Model-View-Controller (MVC)? If you've programmed with graphical user interface (GUI) libraries in the past 10 years or so, you have likely come across the model-view-controller (MVC) design. MVC was first introduced by Trygve Reenskaug, a Smalltalk developer at the Xerox Palo Alto Research Center in 1979, and it helps to decouple data access and business logic from the manner in which it is displayed to the user. More precisely, MVC can be broken down into three elements:
Although different architectures allow the three components to interact in different ways, Figure 1 shows a common implementation of the MVC design pattern, as shown in the Sun BluePrints Catalog.
This section will take a closer look at one way to implement Figure 1 in the context of an application in the Java Platform, Standard Edition 6 (Java SE 6). Once the model, view, and controller objects are instantiated, the following occurs:
Once a user interacts with the view, the following actions occur:
Getting Started With NetBeans Visual Web Pack 5.5 This tutorial gives you a whirlwind tour of the NetBeans Visual Web Pack. The tutorial shows you how to use the Visual Web Pack features to perform the typical phases of web application development. The tutorial is designed so that you do not need to go through it in any particular order. You might want to skim over it quickly and then return to each section as time allows. If you prefer a step-by-step tutorial, you might want to first try "Developing a Web Application" Contents
Content on this page applies to NetBeans 5.5 Visual Web Pack This tutorial works with the following technologies and resources: JavaServer Faces Components/Java EE Platform and the Travel Database. As of December 2006 only the Sun Java System Application Server supported Java EE 5. This tutorial has been tailored for use with the Sun Java Application Server PE 9.0 Update Release 1 and with Tomcat 5.5.17. If you are using a different server, consult the Release Notes and FAQs for known problems and workarounds. For detailed information about the supported servers and Java EE platform, see the Release Notes. Read this tutorialSun is offering the award-winning Sun Java Studio Enterprise, Sun Java Studio Creator, and the NetBeans IDE and NetBeans Mobility Pack at no cost to all developers worldwide who join the Sun Developer Network (SDN). Self-Paced Web, CD, and Virtual Courses
Java Complete Learning Solution (CDJ-JAVA-ALL)
Java Programming Language Workshop (VC-SL-285)
Developing Applications for the J2EE Platform (CDJ-310A) For More Information
| ||||||||||||||
|
| ||||||||||||