1 Oracle Application Development Framework Copyright 2004 Oracle

  • Slides: 26
Download presentation
1 Oracle Application Development Framework Copyright © 2004, Oracle. All rights reserved.

1 Oracle Application Development Framework Copyright © 2004, Oracle. All rights reserved.

Objectives After completing this lesson, you should be able to do the following: •

Objectives After completing this lesson, you should be able to do the following: • Describe the Java 2, Enterprise Edition (J 2 EE) platform • Describe the benefits of framework-based application development • Describe the purpose and benefits of Oracle ADF • Describe the Model-View-Controller (MVC) architecture • Describe the technologies used in each of the MVC layers 1 -2 Copyright © 2004, Oracle. All rights reserved.

J 2 EE Platform • • Is a multitiered, distributed application model Supports component-based

J 2 EE Platform • • Is a multitiered, distributed application model Supports component-based J 2 EE applications Client Machine 1 -3 J 2 EE Server Database Server Client tier Web tier Business tier EIS tier Browser/ Application JSP/ Servlet Business Services Database Copyright © 2004, Oracle. All rights reserved.

Benefits of the J 2 EE Platform • • • “Write once, run anywhere”

Benefits of the J 2 EE Platform • • • “Write once, run anywhere” provides simplified component development. J 2 EE separates client requirements from business logic. J 2 EE provides multiple development and design scenarios: – Multitier – Web – Stand-alone client • 1 -5 J 2 EE separates development tasks into specific skill areas. Copyright © 2004, Oracle. All rights reserved.

J 2 EE Platform: Architecture Details Client Machine Browser Client container Application Client J

J 2 EE Platform: Architecture Details Client Machine Browser Client container Application Client J 2 EE Server Business Web container JSP/ Servlet Business Services JNDI RMI JTA JDBC JMS Java. Mail JAF APIs 1 -6 Copyright © 2004, Oracle. All rights reserved. EIS tier Database

Building J 2 EE Applications • • 1 -7 Building J 2 EE applications

Building J 2 EE Applications • • 1 -7 Building J 2 EE applications can be complex. Development time can be extensive. Choosing and implementing appropriate design patterns can be overwhelming. “Do it yourself” applications often repeat existing application code. A large portion of “Do it yourself” code is dedicated to common tasks. The more code you write, the greater is the chance of errors. Using an existing application framework enables you to concentrate on your business needs. Copyright © 2004, Oracle. All rights reserved.

What Is Framework-Based Application Development? A framework: • Is a productivity layer for building

What Is Framework-Based Application Development? A framework: • Is a productivity layer for building applications • Is a set of intelligent cooperating software components • Is designed to be specialized for your business • Handles the majority of common tasks with sensible behavior • Enables easy customization of default behaviors • Uses standard, proven techniques and design patterns 1 -8 Copyright © 2004, Oracle. All rights reserved.

Understanding Framework-Based Application Development Provides “hook points” to standard functions Framework A framework provides

Understanding Framework-Based Application Development Provides “hook points” to standard functions Framework A framework provides base functionality: • • • 1 -9 Standard behaviors Data access methods Transaction management You can augment or circumvent base functionality. Your objects have only your code. No messy code generation Copyright © 2004, Oracle. All rights reserved.

Oracle Application Development Framework • • Reduces the complexity of J 2 EE development

Oracle Application Development Framework • • Reduces the complexity of J 2 EE development by providing visual and declarative development Increases development productivity – Less coding, more reuse – Focus on the application, not the “plumbing” • • 1 -10 Encourages J 2 EE best practices by implementing standard J 2 EE design patterns (MVC) Provides a flexible and extensible environment by allowing multiple technology choices and development styles Copyright © 2004, Oracle. All rights reserved.

Visual and Declarative Development • Visual – WYSIWYG editors – UML modelers – Structure

Visual and Declarative Development • Visual – WYSIWYG editors – UML modelers – Structure pane • Declarative – Structure pane – Property Inspector • Code view/design view synchronization – No separate generation step—always synchronized – Underlying code always accessible 1 -11 Copyright © 2004, Oracle. All rights reserved.

Design Patterns • Design patterns: – Are proven solutions to specific problems – Are

Design Patterns • Design patterns: – Are proven solutions to specific problems – Are a means to an end, not the end itself – Address programming tasks, not business problems – Are reusable – Provide a framework for re-creatable results • 1 -12 The MVC architecture is an example of a design pattern. Copyright © 2004, Oracle. All rights reserved.

Model-View-Controller Architecture MVC provides logical separation of an application. Client tier Web tier Browser/

Model-View-Controller Architecture MVC provides logical separation of an application. Client tier Web tier Browser/ Application Model Business Services Controller Business tier View 1 -13 Copyright © 2004, Oracle. All rights reserved. EIS tier Database

MVC Structure Controller • Handles routing to the correct page • Maps UI data

MVC Structure Controller • Handles routing to the correct page • Maps UI data changes to the Model Display 1 -14 Submit page Data and transactions View Model • Renders the UI • Requests data from the Model • Sends “Events” to the Model • Allows the Controller to select the next View • Stores the application state • Responds to data requests • Encapsulates business logic Request data Copyright © 2004, Oracle. All rights reserved.

What Is the Model? • It is a wrapper and abstraction for business services:

What Is the Model? • It is a wrapper and abstraction for business services: – Handles data events from the Controller – Feeds data to the View • It manages and presents data from different Business Service types in a common way. View Controller Model 1 -15 Copyright © 2004, Oracle. All rights reserved.

The Model Layer Model ADF Bindings ADF Data Control Business Services EJB Session Beans

The Model Layer Model ADF Bindings ADF Data Control Business Services EJB Session Beans Java Classes JDBC Top. Link Queries Java Classes ADF Application Module EJB Finders ADF View Object EJB Entity Beans Top. Link Mapping 1 -16 Copyright © 2004, Oracle. All rights reserved. ADF Entity Object Web Services

Components of the Model Layer • Bindings: – Metadata that describes how the UI

Components of the Model Layer • Bindings: – Metadata that describes how the UI components on a page use the values and actions provided by the Business Service • Data controls: – Metadata that describes the data model returned by the Business Service • The metadata has the same format for all business services. ADF Bindings ADF Data Control 1 -17 Copyright © 2004, Oracle. All rights reserved.

What Is the Controller? On a Web page, everything significant happens on submit or

What Is the Controller? On a Web page, everything significant happens on submit or a link. • A Controller intercepts a request and dispatches it to the correct page. • The source page does not have to know how to handle an event or where to go next. • The handling code does not need to know what page to display in response. • The Controller separates the Model and the View. • The Controller manages the flow of a Web application. 1 -18 Copyright © 2004, Oracle. All rights reserved.

Struts in JDeveloper uses Apache Struts as a Controller. • It is popular among

Struts in JDeveloper uses Apache Struts as a Controller. • It is popular among J 2 EE developers. • It has been around since 2000. • It is designed to handle views based on HTTP technology. 1 -19 Copyright © 2004, Oracle. All rights reserved.

Controller: Summary • • • 1 -20 Controllers are key to MVC separation and

Controller: Summary • • • 1 -20 Controllers are key to MVC separation and to promote code and layer reuse. Apache Struts is the de facto standard for Web application controllers. Oracle JDeveloper 10 g supports Struts as a controller. Copyright © 2004, Oracle. All rights reserved.

What Is the View? • • The MVC View is the UI of the

What Is the View? • • The MVC View is the UI of the application. It is what the end user sees and interacts with. View Controller Model 1 -21 Copyright © 2004, Oracle. All rights reserved.

View Concept • • • 1 -22 A View does not contain application code;

View Concept • • • 1 -22 A View does not contain application code; it contains code to represent the UI and pass events to the Controller. Views are interchangeable without rewriting controller or model logic. A single application can have different Views that are compatible with different types of devices (HTML browser, handheld devices, and so on). Copyright © 2004, Oracle. All rights reserved.

View Technologies in Oracle JDeveloper 10 g • Java. Server Pages (JSP) • UIX

View Technologies in Oracle JDeveloper 10 g • Java. Server Pages (JSP) • UIX • ADF JClient Creating databound clients is the same in JDeveloper for any of these supported client technologies. 1 -23 Copyright © 2004, Oracle. All rights reserved.

View: Summary • • 1 -24 Views contain only display code. Views do not

View: Summary • • 1 -24 Views contain only display code. Views do not contain application logic. Views do not contain navigation logic. Views are independent of the Controller and the Model. Copyright © 2004, Oracle. All rights reserved.

ADF Technology Stack View JSP Controller 1 -25 JSF Swing/ ADF JClient Struts ADF

ADF Technology Stack View JSP Controller 1 -25 JSF Swing/ ADF JClient Struts ADF Model Business Services ADF UIX ADF Business Components EJB Session Beans Web Services Copyright © 2004, Oracle. All rights reserved. Java. Beans/ Other

ADF: Summary • Productive end-to-end development – Model-View-Controller – Visual – Declarative • Standard

ADF: Summary • Productive end-to-end development – Model-View-Controller – Visual – Declarative • Standard J 2 EE framework – – 1 -26 Implements J 2 EE best practices Uses the latest standards Provides architecture choices Is built on the MVC design pattern Copyright © 2004, Oracle. All rights reserved.

Summary In this lesson, you should have learned how to: • Identify the benefits

Summary In this lesson, you should have learned how to: • Identify the benefits of framework-based application development • Describe the Java 2, Enterprise Edition (J 2 EE) platform • Define the components of the Model-View. Controller architecture • Describe the benefits of Oracle Application Development Framework (ADF) • Describe the technologies used in each of the MVC layers 1 -27 Copyright © 2004, Oracle. All rights reserved.