6648222 Oracle ADF Development Guidelines

  • Published on
    28-Oct-2014

  • View
    51

  • Download
    7

Transcript

Oracle Application Development FrameworkDevelopment Guidelines Oracle JDeveloper 10g (9.0.5.2)

August 2004This document describes the components available in Oracle JDeveloper 10g that help you to create MVC-style applications for the J2EE platform.

Oracle Application Development Framework Development Guidelines, Oracle JDeveloper 10g Release (9.0.5.1) Part No. N/A Copyright 2004 Oracle. All rights reserved. The Programs (which include both the software and documentation) contain proprietary information; they are provided under a license agreement containing restrictions on use and disclosure and are also protected by copyright, patent, and other intellectual and industrial property laws. Reverse engineering, disassembly, or decompilation of the Programs, except to the extent required to obtain interoperability with other independently created software or as specified by law, is prohibited. The information contained in this document is subject to change without notice. If you find any problems in the documentation, please report them to us in writing. This document is not warranted to be error-free. Except as may be expressly permitted in your license agreement for these Programs, no part of these Programs may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose. If the Programs are delivered to the United States Government or anyone licensing or using the Programs on behalf of the United States Government, the following notice is applicable: U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the Programs, including documentation and technical data, shall be subject to the licensing restrictions set forth in the applicable Oracle license agreement, and, to the extent applicable, the additional rights set forth in FAR 52.227-19, Commercial Computer Software--Restricted Rights (June 1987). Oracle Corporation, 500 Oracle Parkway, Redwood City, CA 94065 The Programs are not intended for use in any nuclear, aviation, mass transit, medical, or other inherently dangerous applications. It shall be the licensee's responsibility to take all appropriate fail-safe, backup, redundancy and other measures to ensure the safe use of such applications if the Programs are used for such purposes, and we disclaim liability for any damages caused by such use of the Programs. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. The Programs may provide links to Web sites and access to content, products, and services from third parties. Oracle is not responsible for the availability of, or any content provided on, third-party Web sites. You bear all risks associated with the use of such content. If you choose to purchase any products or services from a third party, the relationship is directly between you and the third party. Oracle is not responsible for: (a) the quality of third-party products or services; or (b) fulfilling any of the terms of the agreement with the third party, including delivery of products or services and warranty obligations related to purchased products or services. Oracle is not responsible for any loss or damage of any sort that you may incur from dealing with any third party.

Oracle Application Development Framework Development Guidelines ManualContentsChapter 1, Introduction to J2EE Application Development in JDeveloper........................................ 3 Summary ............................................................................................................................................ 3 Introduction........................................................................................................................................ 3 Considering the Application Architecture ......................................................................................... 4 Partitioning Application Development in JDeveloper....................................................................... 5 Speeding Development with Frameworks in JDeveloper.................................................................. 7 Development Methodology in JDeveloper ........................................................................................ 8 Proceeding with Application Development in JDeveloper................................................................ 9 Related Information ......................................................................................................................... 10 Chapter 2, Business Services and the Oracle Application Development Framework...................... 11 Summary .......................................................................................................................................... 11 The Available Business Service Technologies ................................................................................ 12 Which Business Services Technology Should I Use? ..................................................................... 14 Business Service Layers .................................................................................................................. 15 Detailed Comparison of Business Service Architectures ................................................................ 17 Chapter 3, ADF Business Components in Depth ................................................................................. 27 Summary .......................................................................................................................................... 27 ADF Entity Object Definitions ........................................................................................................ 28 ADF Associations ............................................................................................................................ 32 ADF Domains .................................................................................................................................. 34 ADF View Object Definitions ......................................................................................................... 36 ADF View Link Definitions ............................................................................................................ 38 ADF Application Module Definitions ............................................................................................. 39 ADF Business Components Design Decisions ................................................................................ 42 Chapter 4, Overview of the Oracle ADF Model Layer ....................................................................... 45 Summary .......................................................................................................................................... 45 Role of the Model Layer .................................................................................................................. 46 Benefiting from the Oracle ADF Model Layer................................................................................ 48 Oracle ADF Data Control Runtime Integration with Business Services......................................... 52 Creating the Oracle ADF Model Layer in JDeveloper .................................................................... 54 Summary of Oracle ADF Data Control Operations......................................................................... 62 Summary of Oracle ADF Bindings.................................................................................................. 63 Chapter 5, Overview of Oracle ADF Integration with Struts ............................................................ 71 Summary .......................................................................................................................................... 71 Highlights of the Struts Framework................................................................................................. 72 Oracle ADF Extensions to Struts..................................................................................................... 73 Struts Design Time Integration with Oracle ADF ........................................................................... 80 Struts Runtime Integration with the Oracle ADF Model Layer ...................................................... 82 Data Pages and Data Actions in the Databound Struts Page Flow .................................................. 83 Best Practices ................................................................................................................................... 87 Oracle ADF Development Guidelines 1

Chapter 6, Overview of Oracle ADF Data Binding in View Technologies........................................ 91 Summary .......................................................................................................................................... 91 Role of the View Layer.................................................................................................................... 92 JDeveloper Design Time Integration with the Oracle ADF Model Layer....................................... 93 Web Application Runtime Integration with the Oracle ADF Model Layer .................................. 103 JClient Application Runtime Integration with the Oracle ADF Model Layer............................... 104 Best Practices ................................................................................................................................. 110 Summary of UI Components in Oracle ADF Web Pages.............................................................. 112 Summary of UI Components in Oracle ADF Java Clients ............................................................ 115 Appendix A, JDeveloper Runtime Problems and Solutions ............................................................. 119 Appendix B, Oracle ADF Problems and Solutions ............................................................................ 127

Oracle ADF Development Guidelines

2

Chapter 1, Introduction to J2EE Application Development in JDeveloperThe Oracle Application Development Framework (Oracle ADF), available with Oracle JDeveloper 9.0.5.1 and later, offers developers greater flexibility and openness when deciding how to implement the layers of a J2EE enterprise application. Oracle ADF brings data control abstraction to back-end business services (data sources) and generalizes Oracles existing data binding objects to support it. These features of Oracle ADF give developers a consistent and pluggable model layer to the J2EE application architecture. This chapter provides an overview of the ways in which Oracle ADF supports J2EE application development in JDeveloper.

Summary

Introduction Considering the Application Architecture Partitioning Application Development in JDeveloper Speeding Development with Frameworks in JDeveloper Development Methodology in JDeveloper o Iterative Development and Visual Tools o Roles and Code Integration Proceeding with Application Development in JDeveloper Related Information

IntroductionThis document addresses the enterprise application developer who wants to use JDeveloper to implement enterprise business solutions for the J2EE platform (Java 2 Platform, Enterprise Edition). Enterprise applications are built from various components that derive from standards-based technologies. As a J2EE-compliant development tool, JDeveloper supports building enterprise applications using these same standard technologies:

JavaServer Pages technology to handle the presentation of the user interface Servlet and JavaBeans technology for the Apache Struts framework to manage the application flow Enterprise JavaBeans to manage application state and define the business logic

In addition, JDeveloper extends the J2EE paradigm by giving developers alternatives to the standard technology stack. Developers can elect to work with a wide variety of technologies, as illustrated by the following diagram.

Oracle ADF Development Guidelines

3

The purpose of this document is to show how developers can combine technologies to suit their particular application needs. Recommendations are made in the interest of ease of development and recognized best practices that exploit the design time of the JDeveloper IDE. The remainder of this chapter describes the application development choices JDeveloper provides in more detail. These choices comprise best practices that can improve application reliability, increase your productivity, and decrease the overall time to deployment. Where to find additional information:

For information about JDeveloper IDE features that support team development, testing, and production deployment to the J2EE platform, see the JDeveloper help system. These topics are beyond the scope of the present document. For a list of J2EE-related learning resources, see Related Information links at the end of this chapter.

Considering the Application ArchitectureThe enterprise application is typically deployed across multiple servers to achieve its distributed component architecture. On the client side, the part of the application that users interact with, the application can be browser-based or it may be a standalone client based on Java Swing components. JDeveloper supports two databound web application user interface technologies and one standalone client:

Standard JSP pages and HTML elements Oracles own ADF UIX pages with its own set of ADF UIX user interface components Standard Java/Swing components with Oracles own ADF JClient bindings

The JDeveloper IDE for building enterprise applications provides equal support for all styles of application clients. Screen designers, whether creating web pages or Swing forms, work with databound UI components through a single, easy-to-use design time tool, known as the Data Control Palette. Oracle ADF Development Guidelines 4

For the middle tier, several technologies are available in JDeveloper to help define the applications business logic. In the J2EE platform, Enterprise JavaBeans components provide the persistence layer for the application and manage transactions between the client and the back-end data store. However, in JDeveloper, business logic developers can choose to implement this functionality using a variety of technologies:

Standard Enterprise JavaBeans components Oracle ADF Business Components technology, which implements many of the design patterns required by transactional applications OracleAS TopLink mapping objects based on JavaBeans components

Or when the middle tier...

Recommended

View more >