Using Java in the Oracle Frameworks
-
Upload
floatingbrain -
Category
Documents
-
view
229 -
download
0
Transcript of Using Java in the Oracle Frameworks
-
8/14/2019 Using Java in the Oracle Frameworks
1/48
Release 11 i WorkshopsDallas, TX Santa Clara, CA
Cincinnati, OH Denver, CO Atlanta, GADetroit, MI Las Vegas, NV
www.solutionbeacon.com
Using Java in theUsing Java in theOracle FrameworksOracle Frameworks
Lance ReedyJava Architect
-
8/14/2019 Using Java in the Oracle Frameworks
2/48
22 2007 Solution Beacon, LLC. All Rights Reserved.
Are you an OAUG Member?Are you an OAUG Member?
Member Benefits include:Member Benefits include:uu AdvocacyAdvocacy opportunities to influence Oracle on product enhancements, usabiopportunities to influence Oracle on product enhancements, usabi lity,lity,
new features, Oracle support, pricing and qualitynew features, Oracle support, pricing and quality
uu KnowledgeKnowledge that showcases the latest trends and techniques used by industrythat showcases the latest trends and techniques used by industryleaders through our national and regional events and our publicaleaders through our national and regional events and our publica tions, such astions, such asOAUG Insight magazineOAUG Insight magazine
uu CommunicationCommunication with other OAUG members worldwide through participation inwith other OAUG members worldwide through participation inOAUG committees, leadership positions, interaction with Oracle COAUG committees, leadership positions, interaction with Oracle C orporation'sorporation'suser initiatives, frequent member surveys, and Oracle managementuser initiatives, frequent member surveys, and Oracle management briefingsbriefings
uu EducationEducation through the hundreds of careerthrough the hundreds of career --enhancing presentations in ourenhancing presentations in ourconference paper database archive, as well as discounts to confeconference paper database archive, as well as discounts to confe rences andrences andOracle educationOracle education
uu NetworkingNetworking with Oracle customers, industry experts, thirdwith Oracle customers, industry experts, third --party software firms,party software firms,and other Oracle Applications specialists through our Member Datand other Oracle Applications specialists through our Member Dat abase andabase andOnline Vendor DirectoryOnline Vendor Directory
Global Users. Global Solutions.Global Users. Global Solutions.
-
8/14/2019 Using Java in the Oracle Frameworks
3/48
33 2007 Solution Beacon, LLC. All Rights Reserved.
AgendaAgenda
uu Explore the use ofExplore the use ofJava technologies inJava technologies in
ll OAFOAFll ADFADFll OC4JOC4J
uu WrapWrap --upup
- (($SS O LFD W LR Q 6 H U Y H U
6 H U Y O H W
- 6 (
-
8/14/2019 Using Java in the Oracle Frameworks
4/48
44 2007 Solution Beacon, LLC. All Rights Reserved.
Relevant HistoryRelevant History
uu The move from native clients to web clientsThe move from native clients to web clientsll With the rise of the web browser, the vast majority ofWith the rise of the web browser, the vast majority of
codecode can reside on the server, and only the usercan reside on the server, and only the userinterface can exist on the clientinterface can exist on the client
uu The development of the Java 2 platformThe development of the Java 2 platformll A common language that can run on most flavors ofA common language that can run on most flavors of
UNIX as well as Win32UNIX as well as Win32
uu The development of new device platforms able toThe development of new device platforms able torun web browsersrun web browsersll Cell phone, PDA, bar code scanners,Cell phone, PDA, bar code scanners,
-
8/14/2019 Using Java in the Oracle Frameworks
5/48
55 2007 Solution Beacon, LLC. All Rights Reserved.
Early StandardsEarly Standards
uu Server side languages includedServer side languages includedll CGICGI --BIN programmingBIN programming first generationfirst generationll ServletsServlets first generation of Javafirst generation of Javall JSPJSP second generation, complementary to Servletssecond generation, complementary to Servlets
uu HTML and JavaScript on the clientHTML and JavaScript on the client
-
8/14/2019 Using Java in the Oracle Frameworks
6/48
66 2007 Solution Beacon, LLC. All Rights Reserved.
Java EditionsJava Editions
uu Java 2 Standard Edition (J2SE)Java 2 Standard Edition (J2SE)ll What we typically think of as Java on a serverWhat we typically think of as Java on a server
uuJava PlugJava Plug --ininll The J2SE environment that is designed specifically toThe J2SE environment that is designed specifically to
runrun inside inside a web browsera web browserll Not feature limited, but very ability limitedNot feature limited, but very ability limited
uuJava 2 Enterprise Edition (J2EE)Java 2 Enterprise Edition (J2EE)ll Designed to be a cross platform application serverDesigned to be a cross platform application serverll Sun provides the API specifications, and a referenceSun provides the API specifications, and a reference
implementation of themimplementation of them
-
8/14/2019 Using Java in the Oracle Frameworks
7/48
-
8/14/2019 Using Java in the Oracle Frameworks
8/48
88 2007 Solution Beacon, LLC. All Rights Reserved.
Adding JavaAdding Java
uu As a language Java has the flexibility of running on bothAs a language Java has the flexibility of running on bothsides of the client / server modelsides of the client / server model
uu Uses different programming models for each platformUses different programming models for each platform
-
8/14/2019 Using Java in the Oracle Frameworks
9/48
99 2007 Solution Beacon, LLC. All Rights Reserved.
JInitiatorJInitiator New ClientNew Client
uu Is OracleIs Oracle s licensed JVMs licensed JVMuu Used on client platform to provide a consistentUsed on client platform to provide a consistent
environmentenvironmentuu Executes within the clientExecutes within the client s web browser to runs web browser to run
things like Forms based modules in Ethings like Forms based modules in E --BusinessBusinessSuite 11Suite 11 i i
-
8/14/2019 Using Java in the Oracle Frameworks
10/48
1010 2007 Solution Beacon, LLC. All Rights Reserved.
What is OAFWhat is OAF
uu Based on early web standards and technologiesBased on early web standards and technologiesuu An attempt to introduce abstraction into applicationAn attempt to introduce abstraction into application
designdesignll Separation of components into layersSeparation of components into layersll Connections only between adjoining layersConnections only between adjoining layers
uu By separating the display from the business logicBy separating the display from the business logic
change becomes easierchange becomes easieruu Mechanism for personalization, design pattern forMechanism for personalization, design pattern forextensionextension
-
8/14/2019 Using Java in the Oracle Frameworks
11/48
1111 2007 Solution Beacon, LLC. All Rights Reserved.
AbstractionAbstraction
uu The idea of breaking an algorithm into discreteThe idea of breaking an algorithm into discretelayers, each of which is opaquelayers, each of which is opaque
uu Common in Object Oriented programmingCommon in Object Oriented programminguu Simplifies code while complicating solutions?!Simplifies code while complicating solutions?!
-
8/14/2019 Using Java in the Oracle Frameworks
12/48
1212 2007 Solution Beacon, LLC. All Rights Reserved.
HTML User InterfaceHTML User Interface
uu Tags and propertiesTags and propertiesused can become tooused can become toocomplex andcomplex andinterdependent tointerdependent tomanage easilymanage easily
uu Dependent upon theDependent upon thebrowserbrowser ssinterpretation of theinterpretation of theHTML languageHTML language
< b o d y >< p > Ex a m p le t a b le < /p >< ta b le c e lls p a c in g = 1
< ca p t io n > Ta b le1 < /c a p t io n >< tr>< td > H o m e r< /t d >
< td > ce ll2 < /td >< /tr >< /t a b le >< /b o d y>
-
8/14/2019 Using Java in the Oracle Frameworks
13/48
1313 2007 Solution Beacon, LLC. All Rights Reserved.
JSPJSP
uu A way to create HTMLA way to create HTMLwith programmaticwith programmaticcontent.content.
uu Embeds Java doeEmbeds Java doe((scriptletsscriptlets ) into HTML) into HTML
< b o d y > < p > A t a b le d ra w n v ia a J S P p a
< / p > < p >< t a b le c e lls p a c in g = 1
< c a p t io n > Ta b le 1 < /c a p t io n >< t r >< t d >< % = v is it o r. g e tN a m e ( ) % >
< /t d >< t d > ce ll2 < /t d> < /t r>< /t a b le >< /b o d y >
-
8/14/2019 Using Java in the Oracle Frameworks
14/48
1414 2007 Solution Beacon, LLC. All Rights Reserved.
ServletServlet
uu Java code that produces HTML as itJava code that produces HTML as it s outputs outputuu Distributed as compiled Class filesDistributed as compiled Class files
p u b lic c la s s _ t e s t1 {p u b lic v o id _ js p S e rv ic e ( {
r e s p o n s e . s e t C o n t e n t Ty p e _ _ o js p _ s _ o u t .w rit e ( < b o d y > ) ;_ _ o js p _ s _ o u t . w rit e ( v is it o r . g e tn a m e ( ) ) ;
-
8/14/2019 Using Java in the Oracle Frameworks
15/48
-
8/14/2019 Using Java in the Oracle Frameworks
16/48
1616 2007 Solution Beacon, LLC. All Rights Reserved.
MVC TechnologiesMVC Technologies
Servlet(s)
JavaBeans, EJB
JavaServer Pages
Each componentuses programmingconcepts andmodels best suited
for its demands
-
8/14/2019 Using Java in the Oracle Frameworks
17/48
1717 2007 Solution Beacon, LLC. All Rights Reserved.
MVC Declarative ProgrammingMVC Declarative Programming
View
Model
Controller
-
8/14/2019 Using Java in the Oracle Frameworks
18/48
1818 2007 Solution Beacon, LLC. All Rights Reserved.
Model DetailsModel Details
uu A Java class (commonly aA Java class (commonly aJavaBean) is used toJavaBean) is used torepresent a businessrepresent a businessentity that the applicationentity that the application
acts onacts on
-
8/14/2019 Using Java in the Oracle Frameworks
19/48
1919 2007 Solution Beacon, LLC. All Rights Reserved.
Controller DetailsController Details
Controller
uu A XML config fileA XML config fileis used to controlis used to controlbehavior of thebehavior of the
applicationapplicationuu A group of JavaA group of JavaClassesClassesimplement theimplement the
controllercontroller s APIs API
-
8/14/2019 Using Java in the Oracle Frameworks
20/48
2020 2007 Solution Beacon, LLC. All Rights Reserved.
MVC Declarative ProgrammingMVC Declarative Programming
View
uu Custom tags are usedCustom tags are usedin the JSP page toin the JSP page toreference datareference data
presented by, or sentpresented by, or sentto, the Model.to, the Model.
-
8/14/2019 Using Java in the Oracle Frameworks
21/48
2121 2007 Solution Beacon, LLC. All Rights Reserved.
PersonalizationsPersonalizations
uu Changes to page layout or content visibilityChanges to page layout or content visibilityuu Can be done by administrators or by end usersCan be done by administrators or by end usersuu
The personalizations are applied between theThe personalizations are applied between theHTML page being generated and it being sent toHTML page being generated and it being sent tothe clientthe client
uu Personalizations are stored via data, not codePersonalizations are stored via data, not code
changeschanges
-
8/14/2019 Using Java in the Oracle Frameworks
22/48
2222 2007 Solution Beacon, LLC. All Rights Reserved.
OAF Page RenderingOAF Page Rendering
uu A hierarchy of operations, many of which areA hierarchy of operations, many of which aredriven purely by datadriven purely by data
-
8/14/2019 Using Java in the Oracle Frameworks
23/48
2323 2007 Solution Beacon, LLC. All Rights Reserved.
What is ADFWhat is ADF
uu The next generation after OAFThe next generation after OAFuu Builds on OAF, addsBuilds on OAF, adds
ll More dynamic page refreshingMore dynamic page refreshingll Data BindingData Bindingll Ability to build content for limited devicesAbility to build content for limited devicesll JavaServer FacesJavaServer Faces
uuMoves further into the J2EE architectureMoves further into the J2EE architecture
-
8/14/2019 Using Java in the Oracle Frameworks
24/48
2424 2007 Solution Beacon, LLC. All Rights Reserved.
Standards Used by ADFStandards Used by ADF
uu MVC MVC
uu JSP, Servlets JSP, Servlets uu
JavaBeansJavaBeansuu Enterprise JavaBeansEnterprise JavaBeansuu JavaServer FacesJavaServer Faces
-
8/14/2019 Using Java in the Oracle Frameworks
25/48
-
8/14/2019 Using Java in the Oracle Frameworks
26/48
2626 2007 Solution Beacon, LLC. All Rights Reserved.
uu JavaBeans conform to particular coding rulesJavaBeans conform to particular coding rulesll Beans have data fields, each field must be accessedBeans have data fields, each field must be accessed
via a Get or a Set methodvia a Get or a Set methodll
They can be loaded dynamicallyThey can be loaded dynamicallyuu They are used to store data that needs to beThey are used to store data that needs to be
used programmaticallyused programmatically
JavaBeans and EJBJavaBeans and EJB
-
8/14/2019 Using Java in the Oracle Frameworks
27/48
2727 2007 Solution Beacon, LLC. All Rights Reserved.
Enterprise JavaBeansEnterprise JavaBeans
uu EJB expands the idea of the basic JavaBeanEJB expands the idea of the basic JavaBeanll Persistence in a databasePersistence in a databasell Remote accessRemote access
uu Java carries the C/UNIX idea of RemoteJava carries the C/UNIX idea of RemoteProcedure Call forward in the form of RemoteProcedure Call forward in the form of RemoteMethod InvocationMethod Invocationll An EJB container must facilitate the use RMI toAn EJB container must facilitate the use RMI to
allow remote clientallow remote client s to access Enterprises to access EnterpriseJavaBeansJavaBeans
-
8/14/2019 Using Java in the Oracle Frameworks
28/48
2828 2007 Solution Beacon, LLC. All Rights Reserved.
Java / SQLJava / SQL
uu A queryA querymechanism mustmechanism mustexist to allowexist to allowobjects to beobjects to beretrieved from theretrieved from theDB as neededDB as needed
uu DatatypesDatatypes must bemust bemapped betweenmapped betweenlanguages:languages:ll StringString vsvs varcharvarcharll AddressAddress vsvs a tablea table
-
8/14/2019 Using Java in the Oracle Frameworks
29/48
2929 2007 Solution Beacon, LLC. All Rights Reserved.
Object PersistenceObject Persistence
- (($SS 6HUYHU 9 L H Z
% XVLQ H VV /R JL F % XVLQ HVV'DW D
7RS/LQN
4 X H U L H V
&DFKH
&RQ QHFW LRQ3RRO
7UDQVD FW LRQ0JU
3 H U V L V W H Q F H
- (('%6HUYLFHV
'DW DE DVH
64/
uu The desire in a J2EEThe desire in a J2EEenvironment is to preventenvironment is to preventapplication code fromapplication code frominteracting directly with theinteracting directly with the
DBDBuu This is achieved byThis is achieved byallowing the J2EEallowing the J2EEcontainer to access tocontainer to access to
common DB servicescommon DB services
-
8/14/2019 Using Java in the Oracle Frameworks
30/48
3030 2007 Solution Beacon, LLC. All Rights Reserved.
EJB 3.0 PersistenceEJB 3.0 Persistence
uu Based on annotationBased on annotationuu Uses a tool toUses a tool to
generate the codegenerate the code ssskeleton andskeleton andannotationsannotations
uu Uses other tools atUses other tools atcompile and runtimecompile and runtimeto turn the annotationsto turn the annotations
into actual codeinto actual code
-
8/14/2019 Using Java in the Oracle Frameworks
31/48
3131 2007 Solution Beacon, LLC. All Rights Reserved.
TopLink versus EJB 3.0TopLink versus EJB 3.0
uu TopLink is an established Oracle standardTopLink is an established Oracle standarduu EJB 3.0EJB 3.0 s Java Persistence API is an emergings Java Persistence API is an emerging
industry wide standardindustry wide standard ll Java Persistence API was added in latest J2EE specJava Persistence API was added in latest J2EE specll Can be used outside of EJB, by J2SE appsCan be used outside of EJB, by J2SE appsll Based on ideas submitted by various J2EE vendorsBased on ideas submitted by various J2EE vendors
including Oracleincluding Oracle
-
8/14/2019 Using Java in the Oracle Frameworks
32/48
3232 2007 Solution Beacon, LLC. All Rights Reserved.
JSF and ADF FacesJSF and ADF Faces
uu JavaServer faces simplifies the design ofJavaServer faces simplifies the design ofHTML UIHTML UIll By providing tags to represent common dataBy providing tags to represent common data
elementselementsll By providing components which can help toBy providing components which can help to
validate data as itvalidate data as it s being entereds being entered
uu ADF brings tags representing commonADF brings tags representing commonOracle UI elementsOracle UI elements
-
8/14/2019 Using Java in the Oracle Frameworks
33/48
3333 2007 Solution Beacon, LLC. All Rights Reserved.
ADF FacesADF Faces Declarative UIDeclarative UI
uu Extends theExtends theJSP concept toJSP concept toexpose Oracleexpose Oracle ssown UIXown UIXwidgetswidgets
uu Replaces evenReplaces evensimple HTMLsimple HTMLtags withtags withabstractabstractelementselements
-
8/14/2019 Using Java in the Oracle Frameworks
34/48
3434 2007 Solution Beacon, LLC. All Rights Reserved.
OC4JOC4J J2EE ServerJ2EE Server
uu J2EE defines a specification for the applicationsJ2EE defines a specification for the applicationsserverserver
uu Defines clear interfaces and mechanisms forDefines clear interfaces and mechanisms forinteracting with other infrastructure, such asinteracting with other infrastructure, such asIdentity Management (LDAP)Identity Management (LDAP)
uu Individual vendors then select portions of the specIndividual vendors then select portions of the specthat they will implementthat they will implement
uu Focuses on server side technologiesFocuses on server side technologies
-
8/14/2019 Using Java in the Oracle Frameworks
35/48
3535 2007 Solution Beacon, LLC. All Rights Reserved.
J2EE TechnologiesJ2EE Technologies
uu A rich suite of APIsA rich suite of APIsbuilt on a commonbuilt on a commoncorecore
-
8/14/2019 Using Java in the Oracle Frameworks
36/48
3636 2007 Solution Beacon, LLC. All Rights Reserved.
Development in J2EEDevelopment in J2EE
uu Java is rich with OpenSource solutionsJava is rich with OpenSource solutionsll J2EE app servers: JBoss, Tomcat,J2EE app servers: JBoss, Tomcat, GlassFishGlassFishll Developer tools: Eclipse, NetBeansDeveloper tools: Eclipse, NetBeansll Frameworks: Struts, Tapestry, TurbineFrameworks: Struts, Tapestry, Turbinell Persistence: Hibernate, OJBPersistence: Hibernate, OJB
uu Some of these are sold as commercial applicationsSome of these are sold as commercial applicationswith vendor support and consultingwith vendor support and consulting
uu None of the developers tools offer tight integrationNone of the developers tools offer tight integrationinto proprietary application serversinto proprietary application servers
uu Few of them offer a complete development solutionFew of them offer a complete development solution
-
8/14/2019 Using Java in the Oracle Frameworks
37/48
-
8/14/2019 Using Java in the Oracle Frameworks
38/48
-
8/14/2019 Using Java in the Oracle Frameworks
39/48
3939 2007 Solution Beacon, LLC. All Rights Reserved.
J2EE Application DeploymentJ2EE Application Deployment
uu J2EE applications are composed of a number ofJ2EE applications are composed of a number ofcomponentscomponentsll Classes, ServletsClasses, Servlets
ll HTML, JSP, and imagesHTML, JSP, and imagesll XML configuration filesXML configuration files
uu Logical groups of Classes become Jar filesLogical groups of Classes become Jar filesuu All content is organized into a specific directoryAll content is organized into a specific directory
structurestructureuu Results are combined into a special Jar fileResults are combined into a special Jar file
-
8/14/2019 Using Java in the Oracle Frameworks
40/48
4040 2007 Solution Beacon, LLC. All Rights Reserved.
Packed ContentsPacked Contents
/ / /META /META --INFINF
application.warapplication.war
application.xmlapplication.xml
the actual application!the actual application!
-
8/14/2019 Using Java in the Oracle Frameworks
41/48
-
8/14/2019 Using Java in the Oracle Frameworks
42/48
4242 2007 Solution Beacon, LLC. All Rights Reserved.
The FutureThe Future
uu Driven by industry standardsDriven by industry standardsll Release of the Java EE 5 spec drives the use of EJBRelease of the Java EE 5 spec drives the use of EJBll J2EE is driving towards web services and SOAJ2EE is driving towards web services and SOA
uu Fusion makes the move to a SOA basedFusion makes the move to a SOA basedenvironmentenvironmentll Same Java syntax, new programming modelsSame Java syntax, new programming modelsll Event driven processingEvent driven processingll
Focus on business modeling and processesFocus on business modeling and processesll Distributed applications communicating via EnterpriseDistributed applications communicating via EnterpriseService Bus and Web ServicesService Bus and Web Services
-
8/14/2019 Using Java in the Oracle Frameworks
43/48
4343 2007 Solution Beacon, LLC. All Rights Reserved.
Past EnvironmentPast Environment
uu Components used in OAFComponents used in OAF
-
8/14/2019 Using Java in the Oracle Frameworks
44/48
4444 2007 Solution Beacon, LLC. All Rights Reserved.
Present EnvironmentPresent Environment
uu Components used in ADFComponents used in ADF
-
8/14/2019 Using Java in the Oracle Frameworks
45/48
4545 2007 Solution Beacon, LLC. All Rights Reserved.
Future StateFuture State
uu Components needed for SOA and web servicesComponents needed for SOA and web services
-
8/14/2019 Using Java in the Oracle Frameworks
46/48
4646 2007 Solution Beacon, LLC. All Rights Reserved.
J2EE in the ArchitectureJ2EE in the Architecture
-
8/14/2019 Using Java in the Oracle Frameworks
47/48
-
8/14/2019 Using Java in the Oracle Frameworks
48/48
Release 11 i WorkshopsDallas, TX Santa Clara, CA
Cincinnati, OH Denver, CO Atlanta, GADetroit, MI Las Vegas, NVwww.solutionbeacon.com
G o t O r a c l e ?G e t t h e B o o k !
I n s t a llin g , U p g r a d in g a n dMainta in ing
Orac le E-Bus iness Su i t e Appl ica t ions 11 .5 .10+
I t s ava i lab le in the OUAGBooks to re o r on l ine !
S ig n u p f o r t h eS o l u t i o n B e a c o n N e w s l e t t e r
w w w. s o l u t i o n b e a c o n . c o m