O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Oracle JDeveloper 10g Handbook

Book Description

Create web and database applications with Oracle JDeveloper 10g--the complete, integrated Java development environment--with help from this comprehensive, real-world resource. Many chapters contain hands-on practices and source code examples reinforcing vital concepts. It’s all here--from the nuts-and-bolts of J2EE applications, servlets, and JavaServer Pages technology to advanced development using the Oracle Application Development Framework. From the exclusive publishers of Oracle Press books, Oracle JDeveloper 10g Handbook will have you developing Java-based applications in no time.

Table of Contents

  1. Cover Page
  2. Oracle JDeveloper 10g Handbook
  3. Copyright Page
  4. Dedication
  5. Contents
  6. Part I Overview
    1. 1 Overview of Oracle JDeveloper 10g
      1. JDeveloper: Past, Present, and Future
        1. Past: Product History and Roots
        2. Present: Where Is JDeveloper Now?
        3. Future: The Vision
      2. What Is New in JDeveloper 10g?
        1. New Integrated Development Environment (IDE)
        2. Application Development Framework
        3. Struts
        4. Modeling in JDeveloper
        5. Business Services
        6. Desupported and Deprecated Features
      3. Creating Application Code in JDeveloper
        1. Application Workspaces
        2. Projects
        3. JDeveloper Directory Structure
        4. Development Steps
      4. Hands-on Practice: Build a Client/Server Application Using the JDeveloper Wizards
        1. I. Create the Application Workspace and Database Connection
        2. II. Create the Model Project
        3. III. Create the View Project
      5. Hands-on Practice: Create a Simple JSP Page
        1. I. Create the JSP Project
        2. II. Create the JSP File
    2. 2 The Integrated Development Environment Overview
      1. The JDeveloper 10g IDE
      2. IDE Window
        1. About Monitor Resolution
        2. Editor Window
        3. Dockable Windows
      3. Customizing the IDE
        1. Preferences
      4. Main Toolbar
      5. Main Menu
        1. About Javadoc
      6. The Help System
        1. Finding the Help Topic
        2. Displaying the Help Topic
        3. Locating Help Centrally
      7. Software Configuration Management
        1. CVS Concepts
      8. Hands-on Practice: Set Up CVS Locally
        1. I. Install and Set Up the CVS Server
        2. II.Set Up a CVS Server Connection
        3. III. Import and Check Out a Module
    3. 3 IDE Tools
      1. Navigators
        1. Application Navigator and System Navigator
        2. Connection Navigator
        3. Run Manager
      2. Structure Window
        1. Structure Window Icons
        2. Other Structure Window Operations
        3. Structure Window Views
      3. Component Palette
        1. Code Snippets
      4. Property Inspector
        1. Properties
        2. Events
      5. Log Window
      6. Code Editor
        1. End Tag Completion
        2. Code Templates
        3. Code Insight and Tag Insight
        4. Other Text Editing Features
        5. Editing PL/SQL
        6. Code Editor Style Sheet Support
      7. Debugger
        1. Debugger Windows
        2. Debugging Java Code
        3. Debugging PL/SQL
        4. Other Tools for Improving Code
      8. Visual Editors
      9. HTML and UIX Previewers
      10. New Gallery
        1. Wizards
        2. New File Dialogs
      11. Data Control Palette
      12. Other Editors
        1. XML Editor
        2. Class Editor
        3. EJB Module Editor
      13. Viewer Windows
        1. Image Viewer
        2. Archive Viewer
        3. Tables Viewer
        4. Sequence Viewer
      14. SQL Worksheet
      15. Modelers and Diagrammers
        1. Types of Diagrams
        2. Creating a UML Diagram
        3. Some Diagramming Operations
        4. XML Schema Editor
        5. Struts Page Flow Diagrammer
    4. 4 Introduction to the Oracle Application Development Framework
      1. What Is a Framework?
        1. Why Use a Framework?
        2. What Is a Development Framework?
        3. Why Use a Development Framework?
        4. Support for the Framework
      2. What Is Oracle Application Development Framework?
        1. Who Will Use ADF?
        2. ADF User Community Support
        3. Development Frameworks in Previous JDeveloper Releases
      3. ADF Architecture Model
        1. MVC
        2. ADF Layers and Components
      4. ADF Code Libraries
        1. Some ADF Libraries
      5. ADF Development Method and IDE Support
        1. The Steps
    5. 5 Java Language Concepts for JDeveloper Work
      1. Why Java?
        1. Benefits
        2. Drawbacks
        3. Transitioning to Java
      2. Object Orientation Concepts
        1. Handling and Storing Data
        2. Inheritance
        3. Other Primary Object-Oriented Concepts
      3. Java Language Review
        1. Annotated Java Code Example
        2. Annotated Use of the Box Example Class
        3. Other Java Language Concepts
      4. Hands-on Practice: Create Java Class Files
        1. I.Make an Application Workspace and Project
        2. II.Create and Test Java Class Files
    6. 6 Naming Conventions
      1. The Importance of Using Naming Conventions
        1. The Consistency Issue
      2. General Naming Convention Considerations and Guidelines
        1. Use Prefixes and Suffixes
        2. Consider the Capabilities of the Language
        3. Be Aware of Case Sensitivity
        4. Use a Dictionary of Allowable Words
        5. Use Abbreviations Carefully
      3. Recognized Naming Conventions in Java
        1. Constants (Final Variables)
        2. Classes
        3. Class Instances, Exceptions, Methods, and Variables
        4. Packages
      4. JDeveloper-Specific Naming Conventions
        1. Types of Objects to Name
        2. Workspaces
        3. Projects
        4. Connections
        5. Class Source Files
        6. Libraries
        7. Client Data Models
        8. UML Diagram Elements
        9. ADF Business Components
        10. Java Client Application Files
        11. Java Client UI Components
        12. Web Client Components
    7. 7 J2EE Architectures and Deployment Alternatives
      1. An Overview of J2EE
        1. J2ME
        2. J2SE
        3. J2EE
      2. Deploying a J2EE Application
        1. J2EE Archive Files
        2. Deployment Descriptor Files
        3. Deploying Archive Files
      3. JDeveloper and J2EE
        1. Deploying J2EE Applications in JDeveloper
      4. Java Client Architectures
        1. Java Applications
        2. Applets
      5. Hands-on Practice: Deploy a Java Application
        1. I.Prepare a Simple ADF BC Java Application
        2. II.Create a Java Application JAR File
        3. III.Create a Batch File and Run the JAR File
      6. JavaServer Pages Architecture
        1. Java Servlet Overview
        2. JSP Technology Overview
        3. Where Does OC4J Fit?
      7. Hands-on Practice: Deploy a JSP Application
        1. I.Create a JSP Application
        2. II.Set Up OC4J
        3. III.Deploy the JSP Application
  7. Part II Business Services
    1. 8 Introducing ADF Business Components
      1. Why Use ADF BC?
      2. ADF Business Components, XML, and Java
      3. ADF Business Component Groups
        1. Business Domain Components
        2. Data Model Components
      4. Hands-on Practice: Examine a Default ADF BC Layer
        1. I.Create an Application Workspace with a Default ADF BC Layer
        2. II.Explore the Business Domain Components
        3. III.Explore the Data Model Components
        4. IV.Test the Default Business Components
    2. 9 Creating Business Domain Components
      1. Creating Default Business Domain Components
      2. Entity Attributes
        1. Adding and Deleting Attributes
        2. Changing Datatypes
        3. Representing Column Constraints
        4. Synchronizing Entity Object Definitions with the Database
      3. Representing Relationships Between Tables
        1. Association Cardinality
        2. Association Directionality and Accessor Attributes
        3. Compositions
      4. Representing Oracle Object Types
      5. Business Components and Database Object Generation
        1. Creating Entity Object Definitions for Table Generation
        2. Creating Table Constraints for Generation
        3. Creating Domains for Oracle Object Type Generation
        4. Generating Database Objects
      6. Hands-on Practice: Represent the HR Schema
        1. I.Create an Application Workspace and Default Business Domain Components
        2. II.Change Entity Attributes
        3. III.Clean Up Accessor Attribute Names
        4. IV.Create Business Domain Components for Table Generation
        5. V.Generate the New Table and Constraints
        6. VI.Create a Many-to-Many Association
        7. VII.Test the Business Domain Components
    3. 10 More Complex Business Rules
      1. Overview of the Entity Classes
        1. Entity Object Classes
        2. Entity Definition Classes
        3. Entity Collection Classes
      2. Manipulating Attribute Values
      3. Attribute-Level Validation
        1. Validation Rules
        2. Validation Domains
        3. Setter Method Validation
        4. Choosing a Validation Style
      4. Entity-Level Validation
        1. Entity-Level Validation Rules
      5. The validateEntity() Method
        1. Choosing a Validation Style
        2. Entity-Level Validation and Compositions
      6. Hands-on Practice: Add Validation to the HR Business Domain Components
        1. I.Remove Unneeded Entity Object Classes
        2. II.Apply a Built-in Validation Rule
        3. III.Create and Use a Custom Validation Rule
        4. IV.Create and Use a Validation Domain
        5. V.Provide Entity-Level Validation
      7. Adding Default Values to Entity Attributes
        1. Static Default Values
        2. Dynamically Calculated Default Values
        3. The SequenceImpl Class and the DBSequence Domain
      8. Calculated Transient Attributes
      9. Using Associations in Business Rules
        1. Getting a Unique Associated Entity
        2. Getting Many Associated Entities
      10. Integrating with Business Logic in the Database
        1. Integrating with Database Triggers
        2. Using Stored Procedures to Perform DML Operations
      11. Hands-on Practice: Add More Business Rules to the HR Business Domain Components
        1. I.Add Defaulting Logic
        2. II.Calculate an Attribute
        3. III.Add Validation Logic That Uses an Association
    4. 11 Creating Data Model Components
      1. View Attributes, Entity Attributes, and Caching
        1. How Entity-Derived View Attributes Are Populated
        2. How SQL-Only Attributes Are Populated
        3. Entity-Derived vsSQL-Only View Attributes
      2. Entity Object Usages and Table Aliases
      3. Keys
      4. Refining a View Object’s Query
        1. Setting the WHERE and ORDER BY Clauses
        2. Expert Mode
      5. Hands-on Practice: Create View Object Definitions
        1. I.Create an Application Workspace for the Data Model Components
        2. II.Create a Simple View Object Definition
        3. III.Create a SQL-Only View Object Definition
        4. IV.Create a View Object Definition with Multiple Entity Object Usages
        5. V.Create a View Object Definition with an Entity Object Usage and an Expert-Mode Query
      6. Representing Relationships Between Query Result Sets
        1. View Link SQL
        2. View Link Definition Cardinality
        3. View Link Definition Directionality and Accessor Attributes
      7. Aggregating Data for Applications
      8. Hands-on Practice: Create View Link and Application Module Definitions
        1. I.Create View Link Definitions
        2. II.Create and Test an Application Module Definition
    5. 12 Exposing ADF BC to Applications
      1. ADF Model Layer Architecture
        1. Data Controls
        2. Binding Containers
      2. Creating Data Controls and Bindings
        1. The Data Control Palette
        2. The UI Model Tab
      3. Exposing a View Object Instance to an ADF Application
        1. Ranges
        2. Using Multiple Iterator Bindings
      4. Accessing a Range of Data
      5. Navigating Through Collections
        1. Moving the Current Row Pointer
        2. Scrolling the Range
        3. Key Objects
      6. Creating and Deleting Rows
      7. Accessing Individual Values
      8. Hands-on Practice: Create a Master-Detail JSP Application
        1. I.Create a Read-Only Form with Navigation
        2. II.Create a UI Table to Display Details
      9. Selecting from a List
        1. Navigation Mode
        2. Enumeration Mode
        3. LOV Mode
      10. Managing Transactions
      11. Hands-on Practice: Refine the JSP Application
        1. I.Refine the Master-Detail Form
        2. II.Create an Edit Form
    6. 13 Creating Custom Service Methods
      1. Overview of Data Model Component Classes
        1. Overview of Application Module Classes
        2. Overview of View Classes
      2. Custom Service Method Basics
      3. Exposing and Accessing Service Methods
      4. Finding View Object Instances in the Data Model
        1. Finding View Object Instances in a Nested Application Module Instance
      5. Retrieving View Rows
        1. Stepping Through a View Cache
        2. Row Keys
      6. Manipulating Data
        1. Reading and Changing Attribute Values
        2. Creating and Deleting Rows
      7. Restricting a View Object Instance’s Cache
        1. Using setWhereClause()
        2. Parameterized WHERE Clauses
        3. View Criteria Objects
        4. Re-Executing the Query
      8. Using View Link Definitions in Service Methods
      9. Hands-on Practice: Create and Invoke Service Methods
        1. I.Turn Off Batch Mode
        2. II.Choose View Classes
        3. III.Create a View Object Method Stub and a Service Method
        4. IV.Access the Service Method from a JSP Application
        5. V.Add Navigation Code to the View Object Method
        6. VI.Add Code to Filter Data
        7. VII.Add Code to Change Data
      10. Dynamically Creating Master-Detail Relationships
      11. Hands-on Practice: Create and Invoke Service Methods to Maintain a Dynamic Master-Detail Relationship
        1. I.Remove a View Link Instance from an Application Module Definition
        2. II.Create Service Methods to Maintain a Dynamic Master-Detail Relationship
        3. III.Use the Dynamic Master-Detail Relationship
        4. IV.Test the Service Methods
    7. 14 Business Service Technology Alternatives
      1. Enterprise JavaBeans Technology
        1. EJB Technology and the Business Domain
        2. EJB Technology and the Data Model
        3. EJB Technology and the ADF Model Layer
      2. Hands-on Practice: Build a Simple EJB Application
        1. I.Create an Application Workspace and EJB Diagram
        2. II.Create the Business Domain
        3. III.Create the Data Model
        4. IV.Create Data Control Definition Files
        5. V.Create a Master-Detail Form
      3. TopLink Technology
        1. TopLink POJO and the Business Domain
        2. TopLink POJO and the Data Model
        3. TopLink Technology and the ADF Model Layer
      4. Hands-on Practice: Build a Simple TopLink Application
        1. I.Create an Application Workspace
        2. II.Create Java Classes
        3. III.Create Descriptors and Direct Mappings
        4. IV.Create a Relationship Mapping
        5. V.Create a TopLink Query
        6. VI.Create Data Control Definition Files
        7. VII.Create a Master-Detail Form
      5. Web Services
        1. WSDL, SOAP, and Web Service Stubs
        2. Web Services and the ADF Model Layer
      6. Hands-on Practice: Create an Application That Uses a Web Service
        1. I.Register to Use the Google Web APIs
        2. II.Create an Application Workspace
        3. III.Create a Web Service Stub
        4. IV.Create a Wrapper Class for the Stub
        5. V.Create Data Control Definition Files
        6. VI.Create a Search Application
  8. Part III Java Client and Web Applications
    1. 15 Creating Java Client Applications
      1. The JDeveloper IDE for Java Client Development
      2. Building Java Client Applications
        1. Directory Organization for a Java Client Application
      3. Java Client Architecture Decisions
        1. How Many Independent Programs Will You Use?
        2. How Many Directories, Workspaces, and Projects Will You Create?
        3. Where Will the Model and Data Validation Take Place?
        4. What Type of Container Layout Should Be Used?
        5. How Many Packages Will You Create and How Will You Name Them?
        6. Other Issues
      4. ADF JClient
        1. Swing UI Architecture
        2. Developing a Client Data Model
        3. Binding Swing Components to ADF BC
        4. Binding Panels
      5. Working with Swing Components in JDeveloper
        1. The Data Control Palette
        2. The Component Palette
        3. Using Swing Components
        4. Adding Swing Components to a Program
        5. Categories of Swing Components
        6. Container Objects
        7. Modifying Swing Components
        8. Defining Events
      6. Getting the Right Information
      7. Hands-on Practice: Create a Tabbed User Interface Application
        1. I.Create the ADF BC Project
        2. II.Create the Java Application Project
        3. III.Create a Three-Tab User Interface
      8. Hands-on Practice: Customize the Component Palette and Create a JavaBean
        1. I.Create and Deploy a JavaBean
        2. II.Create a Library for the JavaBean
        3. III.Add a Component Palette Page and Add the Custom JavaBean
        4. IV.Test the Custom Component
    2. 16 Layout Managers
      1. How Does This Work in a J2EE Web Application?
      2. Layout Manager and Container Concepts
        1. Laying Out a User Interface
        2. The Default Layout Manager
        3. Setting Layout Manager Properties
        4. Java Visual Editor Tools
        5. Layout Managers in JDeveloper
      3. Overview of the Layout Managers
        1. A Word About the “null” Layout
        2. BorderLayout2
        3. BoxLayout
        4. CardLayout
        5. FlowLayout
        6. GridBagLayout
        7. GridLayout
        8. OverlayLayout2
        9. PaneLayout
        10. VerticalFlowLayout
        11. XYLayout
        12. Layout Manager Usage
      4. Multiple Layouts
      5. Hands-on Practice: Work with Layouts
        1. I.Set up an Application Workspace and Two Projects
        2. II.Use the BorderLayout Manager
        3. III.Use the GridBagLayout Manager
    3. 17 Working with Struts
      1. Struts Architecture
        1. Struts Elements
        2. ApplicationResources.properties Files
        3. The struts-config.xml File
        4. View-Level Struts Tag Libraries
      2. JDeveloper’s Implementation of Struts
        1. Working in the Page Flow Diagram
        2. Struts Elements in JDeveloper
        3. Data Controls
      3. Introduction to the Hands-on Practices
      4. Hands-on Practice: Create a Simple Struts Application
        1. I.Create the Application Workspace and ADF BC Project
        2. II.Create Browse and Edit JSP Data Pages
        3. III.Add the Ability to Save Edits
        4. IV.Add the Ability to Create Records
        5. V.Add Delete Functionality to the Application
        6. VI.Add a Logic Tag to Highlight the Current Record
        7. VII.Shade Every Other Row
        8. VIII.Test for a Value in the Table
      5. Hands-on Practice: Create a Struts Application with Data Actions for Custom Logic
        1. I.Create Another ViewController Project
        2. II.Create a Data Action and a JSP Data Page
        3. III.Add Edit and Update Functionality
    4. 18 Working with JSP Pages
      1. JSP Development Requirements
        1. Required Language Skills
        2. Understanding JSP Compilation and Runtime
        3. Additional Information Sources
      2. JSP Application Development in JDeveloper
        1. JSP/HTML Visual Editor
        2. Code Editor
        3. Structure Window
        4. Page Flow Diagram
        5. Property Inspector
        6. Component Palette
        7. Data Control Palette
        8. Steps for Creating a Struts JSP Application
      3. Some ADF BC JSP Coding Techniques
        1. Find Mode
        2. ADF Business Component Properties
        3. Using Control Hints for Labeling and Formatting
      4. Hands-on Practice: Build JSP Query and Results Pages
        1. I.Create the Application Workspace and Business Services
        2. II.Create the JSP Pages and Controller Actions
        3. II.IModify the Data Elements
        4. IV.Modify the Visual Aspects
    5. 19 Working with ADF UIX Pages
      1. ADF UIX Overview
        1. UIX Features
        2. UIX Page Design Structure
      2. UIX Application Development in JDeveloper
        1. Wizards and File Creation Dialogs
        2. UIX Visual Editor
        3. UIX Preview
        4. XML Editor
        5. Structure Window
        6. Page Flow Diagram
        7. Property Inspector
        8. Component Palette
        9. Data Control Palette
        10. Steps for Creating a Struts UIX Application
      3. Hands-on Practice: Build a UIX Application
        1. I.Prepare the Projects
        2. II.Create the Browse Page Using a Wizard
        3. III.Add Data and Action Components to the Browse Page
        4. IV.Create and Link the Edit Page
        5. V.Create and Link the Search Page
        6. VI.Modify the Look-And-Feel
  9. Part IV Appendixes
    1. A Other Resources
      1. Books
      2. Websites
    2. B Java Client User Interface Components
      1. AWT
      2. Code Snippets
      3. JClient Controls
      4. Swing
      5. Swing Containers
    3. C Overview of HTML, JavaScript, and Cascading Style Sheets
      1. HTML
        1. Editing HTML
        2. HTML Tags
        3. Sample HTML Code
      2. JavaScript in HTML
      3. Cascading Style Sheets
        1. Building a Cascading Style Sheet
        2. Using a Cascading Style Sheet
    4. D Overview of JSP, JSTL, and EL Tags
    5. Basic JSP Tags
      1. Where to Put the Code?
      2. Beginning and Ending Tags
      3. Processing of Standard Tags
    6. JSP Standard Tag Library
      1. JSTL Example
      2. Tag Libraries
      3. Expression Language
      4. An Annotated Example
  10. Index