Title: Oracle JDeveloper 10g Overview
1Web Development with
Karsten Schulz Terp-Nielsen Senior Principal
Consultant Oracle Denmark
2Agenda
- JDeveloper 10g overview
- Application Developer Framework (ADF)
- Struts
- ADF Components
- ADF UiX
3Oracle JDeveloper 10g Overview
Java Client Support
Web Server Support
App Server Support
Database Support
Integrated Development Environment
Core Java Platform
JDeveloper tilbyder en end-to-end løsning for
Internet applikationsudvikling Profiler,
Codecoach, TOAD functionality, Model driven J2EE
development etc.
4Full Lifecycle Support
Design
DataModeling
Application Modeling
Infrastructure
IDE Platform
Build
Coding
Test
Debugging
Tuning
Configuration Management
Deploy
Deployment
5Web Services Development
Model Visualize
Browse UDDI
Develop Deploy
WS-I Monitor,Debug Tune
GenerateWSDL Skeleton
GenerateStub Client
6Open Source Integration
- Apache Ant
- System build tool
- JUnit
- Unit testing
- CVS
- Version control
- Struts
- MVC Framework
- JBoss
- Linux
7JDeveloper Framework Support
- J2EE Frameworks
- Application Development Framework (ADF)
- Apache Struts support
- ADF Business Components
- Oracle 9i/AS10g Toplink
- UiX/Java Server Faces (JSF)
8StrutsModel 1 Architecture
- Browser access JSP pages JSPs access JavaBeans
that represent model - Control de-centralized current page display,
determined next page to display - Complex navigation requires use of scriplet code
- Blurs the line between presentation and
navigation code and making reuse difficult - Not a model to use in practice - maintenance
difficult and does not scale well
9StrutsModel 1 Architecture
Model 1
Decentralized controller - in each JSP page
10StrutsModel 1 Architecture
No MVC - Statically Linked Pages
Servlet/JSP
Servlet/JSP
Servlet/JSP
Servlet/JSP
Web Server
11StrutsModel-View-Controller Model 2
- Introduces a controller servlet
- Controller Servlet handle the data access and
navigational flow - JSPs handle presentation
- Controller centralizes the logic for dispatching
requests to the next view based on the request
URL, input parameters, and application state - Controller also handles view selection, which
decouples JSP pages and servlets from one another
12StrutsModel-View-Controller Model 2
Controller
HTTP
State Change
JavaBean
Request
Servlet
View Selection
User Actions
JDBC
Database
HTTP
Enterprise
Response
State Query
JavaBean
JSP
Change Notification
View
Model
13StrutsModel-View-Controller Model 2
Applying MVC to a Page Flow
Web Server
Servlet/JSP Controller
14StrutsWhat is It ?
- Open source Apache Jakarta Project
- An implementation of MVC paradigm
(Model-View-Control) - A framework written in Java, to build web tier
employing servlets, JSPs and XML - De facto standard for J2EE MVC applications
- Bundled with JDeveloper and works on OC4J(Oracle
Containers for Java)
15StrutsComponents
- ActionServlet class Part of controller that
receives user input and state changes and issues
view selections - Action class Part of controller that interacts
with model to execute a state change or query - ActionForm Beans Data (from Form) bundled into
Javabean for reuse and perform validation - ActionForward class stores path to a page where
the user is sent to - ActionMapping holds mapping that tells
controller which Actions, ActionForms,
ActionsForwards to use
16StrutsComponents (2)
- Struts-config.xml Glue of the framework - holds
declarations of the earlier listed components and
other details. ActionServlets reads this file
and create the configuration objects in memory - Strut Tag Libraries Custom tags that simplify
working with Struts aiding the view component and
access Model thru Java Beans - Property files store messages and handle
different languages
17StrutsStruts Pictorially
Web Browser
Jsp 1
Jsp 3
Jsp 2
Page 1
View Layer
request/session
App Server
JSP Engine
Form Bean 1
Form Bean 2
Other Bean 1
Controller
Struts- config. xml
Mappings
Action2 .java
Action3 .java
Action4 .java
Action1 .java
- path
- action
- form bean
- forwards
Business Logic Layer
Business Bean 1
Business Bean 2
Business Bean 3
JDBC
Data Layer
Database
18How it all Works
Jsp 1
Jsp 2
Jsp 3
Jsp 2
Jsp 2
Page 1
pure HTML sent to browser
Web Browser
processes custom tags fill form elements from
beans, display internationalized messages
Application Server
request/session
View Layer
incoming requests
Form Bean 1
Jsp Engine
Form Bean 2
relevant page called
if submit, auto populates form bean from request
params
creates/reuses any associated form bean
reads on start-up
Controller
Struts- config. xml
looks up path to determine action/ form bean
creates
passes control to relevant action to handle
returns appropriate forward
Mappings
Action2 .java
Action3 .java
Action1 .java
- path
- action
- form bean
- forwards
interacts with lower layers - acts as adaptor
between HTTP and layers below
gets data to display (adds to beans in
request/session)or saves data from beans via
business rules
Business Logic Layer
Business Bean 1
Business Bean 2
Business Bean 3
Data Layer
Business Data
19Oracle ADFEnd-to-end J2EE Framework
- Implements standard J2EE best practices
- Model-View-Controller (MVC) design pattern
- Focus on the application, not the plumbing
- Consolidation and evolution of previous frameworks
Web and Wireless Clients
Rich Clients
Controller
Model
Business Services
20ADF Productivity With Choice
Rich Client
Web / Wireless
View
Swing / JClient
JSP
ADF UIX
JSF
Controller
Struts
ADF Bindings
Model
ADF Data Control
BusinessServices
JavaClasses
EJBSessionBeans
WebServices
ADF Metadata Services
JDBC
TopLinkQueries
EJBFinders
DataAccess
PersistentBusinessObjects
Java Classes
EJB Entity Beans
TopLink Mapping
21ADF Business Components
Simplifies and optimizes O/R mapping
Simplifies and optimizes binding of View to logic
Deployed either as a Local Model or as a
remote Session Facade
22ADF BC High-level architecture
HTML, Java, and XML Interfaces
BusinessLogic
Data Presentation Manipulation
Task-BasedApp Service
View
Entity
Application
PaymentPlan Mgmt
SlowPayingCustomers
Customer
Bill
LatePayments
Payment
23ADF BC Application
Entity Objects
View Objects
TopCustomers
Customer
Ord
PendingOrders
Database
Application Module
24ADF Business Components
- The ADF Business Components framework comes with
an implementation of time-saving ingredients - A Query Bean named ViewObject implements the Data
Access Objects, Fast-Lane Reader, Value List
Handler and Page-by-Page Iterator patterns - A Generic Value Object Bean named Row implements
the Value Object pattern (can have a type-based
too) - An MVC Application Object Bean named
ApplicationModule implements the data model in a
Model/View/Controller pattern providing a Session
Facade - A generic JSPData Binding Tag Library handles all
of your JSP data-binding for any view you need
(can be based on Struts) - A generic JClient Data binding of Swing
components for any view you need - A generic UiX Binding (JSF impl.) for any View
you need
25ADF BC Features
- Integrated with JDeveloper
- Manage concurrency (optimistic/pessimistic)
- Row spilover functionality
- State failover support
- Forward/Reverse engineering support
- Build-in Caching
- Based on XML metadata
- Addresses lazy-loading of data
- Highly optimized JDBC data access
- Contains build-in metrics for DMS
26ADF UiXDefinition
- XML Meta data based View technology
- Designed for the JavaServer Faces standard
(JSR-127) - Supports a variety of clients
- HTML-compliant browsers
- mobile devices
- Rich UI components, layouts and render kits
- Powerful Runtime Features
- Partial page rendering
- Automatic sorting
- Look and feel customization
27ADF UiXUiX Basics
- UIX pages constitute the core visual aspects of
an application - You use UIX Components to create UIX pages
28ADF UiXUiX Basics
- A UIX page lets you specify the page layout, data
sources, and events for a user interface - Each UIX page is the logical representation of a
user interface in an application - The same logical page can be presented as an
output page for many client devices, e.g., an
HTML page for a web browser - Dynamic data content in a UIX page is achieved
through data binding with any data source - UIX has built-in data binding support for
Business Components for Java (BC4J) and JavaBeans
29ADF UiXUiX Basics
- A UIX page consists of a hierarchical tree of
user interface nodes - Each user interface node can have none, one, or
more child nodes this means a node can be a
parent and a child node at the same time
30ADF UiX UiX Visble and non-visible components
- User interface nodes define both the visible and
non-visible user interface components in a page - Examples of visible user interface components
include text and images, and standard HTML
controls such as buttons and checkboxes - Non-visible user interface components do not map
to visible objects but they organize and manage
the layout, appearance, and behavior of other
components - For example, the StackLayout component does not
define a visible object but it causes the child
components to lay out vertically in a page
31ADF UiX UiX Page Construction
- Thus, a logical tree-like structure of parent and
child nodes form the basis for the construction
of a visual, physical hierarchy of user interface
components on a page for a browser or a mobile
device - The page construction occurs dynamically through
client-specific renderers of the UIX Components
lthtmlgt ..... lt/htmlgt
32ADF UiX UiX Page Design
- By default UIX implements the Oracle Browser Look
and Feel (BLAF) for your UIX application by using
a cascading style sheet