0% found this document useful (0 votes)
102 views

Quick Web Dev Using JDeveloper 10g

Uploaded by

dvega1970940
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
102 views

Quick Web Dev Using JDeveloper 10g

Uploaded by

dvega1970940
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 44

Java-Based Oracle Web

Development

By Bradley D. Brown, TUSC


1
Abstract

• JDeveloper 10g is an amazing development


environment. With the Oracle Application Developer
Framework (ADF), which includes TopLink, and
BC4J, you can quickly and easily develop a
GUI/HTML-based Web application using this point-
and-click, drag-and-drop development tool. This
presentation will discuss:
– How ADF allows you to map a database object into an
ADF Business Component
– ADF Business Component view objects
– ADF Business Component Application Modules
– The ADF Data Bindings and Control components
– The Java Server Page
• In one hour you'll learn how to quickly develop an
application using JDeveloper 10g

2
Topics Covered - Agenda

• What is JDeveloper?
• What is ADF?
• Quick Web
Development
• Tips and Tricks

“If you never accept a challenge,


you will never feel the excitement
of victory.” 3
What is JDeveloper 10g?

“Oracle JDeveloper 10g is a J2EE™ development


environment with end-to-end support for
modeling, developing, debugging, and
deploying e-business applications and Web
services. Oracle JDeveloper 10g allows
developers to build J2EE applications and Web
services either from scratch or by using a
J2EE framework. Whatever implementation is
chosen, JDeveloper offers all the productivity
tools needed to get the job done.”

4
New Features as of 10g

• Application • IDE Enhancements


Development – New look and feel
Framework (ADF) – Code editor
– Faster Development improvements
– Integrated MVC – Better modeling
patterns • Database
• New J2EE Features Development
– New wizards – Database modeling
– TopLink integration – Editing DB objects
– Web Service
improvements

5
New with 10.1.3

• JSF – Java Server Faces


• Replacement for Oracle’s UIX
and industry standard
• Provides for easy templates for
consistent application look and
feel

6
What is ADF?

“Oracle ADF is a comprehensive


productivity layer for J2EE
developers. It simplifies
building applications as a set of
business services with Web,
Wireless, and Rich Client
interfaces. ADF accelerates
development with ready-to-use
J2EE Design Pattern
implementations and metadata-
driven components that you'd
otherwise have to code, test,
and debug by hand.”

7
Quick Web Development

• From table to
HTML with
navigation in no
time
• Full best practice
implementation
– Model – Business
components
– View – JSP / JSF
– Controller

8
5 Steps to Success

• Create a
– 1 – Create Application
– 2 – Create Business
Components
– 3 – Create Default Data
Model Components
– 4 –Create Pages
– 5 - Run the Application

9
Create a New Application
Step 1

• Right click on
Applications in
Navigator
• Click on “New
Application…”

10
Name the Application

• Name the
application
whatever you
wish
• Use the “Web
Application”
template
• Click OK

11
Model and ViewController

• 2 new projects
are
automatically
created under
the application
– Model
– ViewController

12
Create Business Components
Step 2

• Right click on
Model
• Click New

13
New Business Components
from Tables

• From the
gallery, choose
– “ADF Business
Components”
under “Business
Tier” Category
– Business
Components
from Tables
• Click OK
14
Pick Your Database

• Select a database
– Oracle
– Oracle Lite
– SQL Server
– SQL92
– DB2

15
Connecting to the DB

• Click New or…


• In Navigator
– Select
“Connections” at
the top tab
– Right click on
“Database”
– Select “New
Database
Connection”

16
Database Connection Wizard

• 4 Steps
– Name the connection
– Specify a username and
password to connect to
– Specify the connection
parameters (i.e. the
database and machine
to connect to)
– Test the Connection

17
Create Business Components from
Tables Wizard

• Intro page
• Entity Objects
• Updatable View
Objects
• Read-only Objects
• Application Module
• Business
Components
Diagram
18
Create Default Data
Model Components
Step 3

• Binds everything together based


on the referential rules
• Can be done manually too

19
Business Services are
Complete

• All of our
business
components have
now been created
– Entity Object
– View Object
– Application
Module
• It’s time to create
the GUI
application

20
Created Model
Entity Objects

• Building the model


• Implement the Data
Access Object design
pattern
• Responsible for
persisting, caching and
validating data
• Created by dragging a
table object and
dropping in the
diagram

21
Created Updatable View Objects

• This object gathers


and filters the data
stored in the entity
object
• Uses a SQL Query
to form a collection
of data
• Can be comprised
of multiple entity
objects (i.e. join
tables)
22
Application Modules

• The Application
Module is a
service object
that coordinates
view objects for
a specific task
(i.e. a form to
display the
employee data)

23
Create Pages
Step 4

Edit the Controller (faces-config.xml)

• This is our
ViewController
section of the
MVC
• The controller
separates the
visual
representation of
web pages (view)
from their flow
and actions
24
Creating a Page

• Double-click
faces-config.xml
in the navigator
• Then click “JSF
Page” in the
Component
Palette
• Then click in the
diagram window
to place the Page
• Change the name
from “/emp.jsp”
(don’t remove the
forward slash)

25
Designing the JSF Page – View

• Create JSF page

26
Creating the Page

• Drag the JSF


Page icon
• Name the Java
Server Page
(JSP)
• Use defaults for
each page
• Can select
template
27
Dropping Business
Components
• Utilizing the
business
service you
created in the
model, we’ll
create the JSP
• In the “Data
Control
Palette”, select
the view object
(i.e. EmpView)
• Drag and drop it
onto the page
• Choose object
28
The ADF Input Page

• By dragging and
dropping the
EmpView object
as an “ADF
Form” each
column from the
table(s) is
displayed
• Include
Navigation and
Submit Button
29
The Page

• JDeveloper creates
an initial page
layout for you
• You can edit this
page as you wish

30
Running the Application
Step 5

• Back to the
diagram
• Right-click on the
object and choose
Run

31
The Final Page
• The form is
complete and fully
functional!!!
– Insert, update,
delete, query
– HTML-based
• Full locking
• Easy to deploy
using the one-click
deployment
• How easy is that?

32
Adding a List of Values

• Delete the
DeptNo input
field
• Find the DeptNo
in the Data
Control Palette
• Select “ADF
Select One
Choice”

33
Associate LOV

• Can build a
static or
dynamic LOV
• Choose the LOV
table and joining
columns

34
Other Notables

• JDeveloper CSS
– Editing a CSS
• Can edit source or design
• A main menu is easy to create
• Built-in support for UML
• Can reverse engineer too
• Business Components Browser
– Right Click on Module, Test
35
How Much is All
This Functionality?

• It’s Free!
– June 22, 2005

• http://www.info
world.com/articl
e/05/06/22/HNora
clejdeveloperfre
e_1.html

36
Create a Many to Many

• Pick the FK Link


• Choose the
Many to Many
• Drop the link
into the main
section of the
page
• Add buttons

37
Great Reference

• http://www.oracle.com/technolo
gy/obe/ADF_tutorial_1013/ADF_t
utorial.pdf
• http://www.oracle.com/technolo
gy/products/adf/learnadf.html

38
Other Java Components
to Learn About

• Web Services
• XML Toolkit
• Wireless
• Tools written in Java
– OEM
– Discoverer

39
Other Components
to Consider

• Apex
• PL/SQL is still important
• Web Services / SOA
• Portal (integrates w/ Java apps)
• Collaboration (iMeeting, Files)

40
Conclusion

• Powerful product!
TUSC’s Vision
• Some great new
features Passionate
• Enhancements to about the
visual creating and Oracle
Technology

editing
• Application Developer
Framework is key Best in Economic
• Decreases the World engine
development time
• Reduced learning
curve

41
Questions and Answers

42
Where to Get More
Information

• metalink.oracle.com
• technet.oracle.com
• otn.oracle.com
• jakarta.apache.org
• www.tusc.com
• JDeveloper Help –
Tutorials are great

43
Special Thanks To…

• Please report errors to TUSC. Neither


TUSC, or the author warrant that this
document is error-free.
• TUSC © 2007. This document may not be
copied or reproduced without the
express written consent of TUSC.

44

You might also like