Q1. What is Oracle
ADF?
Ans : Oracle Application
Development Framework, usually called Oracle ADF, provides a commercial Java
framework for building enterprise applications. It provides visual and
declarative approaches to Java EE development. It supports rapid application
development based on ready-to-use MVC design patterns, metadata-driven and
visual tools.
Q2 How does ADF fall
in MVC architecture?
Oracle ADF Architecture is based on the Model-View-Controller
(MVC) design pattern.MVC consists of three layers which are model layer, view
layer, controller layer. Oracle ADF implements MVC and further separates the
model layer from the business services to enable service-oriented development
of applications.
What is difference between faces-config.xml and adfc-config.xml?
faces-config :- is
the plain jsf controller. Here you can define navigation rules, define managed
beans, register converters, validators
adfc-config :- is the adf extended controller also called as unbounded task flow.
Note :- Adf controller is divided in to 2 : bounded and unbounded
you can achieve all the functionalities that faces-config gives (other than valuators and converters, Navigation rule etc), but this is more advanced.
The Oracle ADF architecture is based on four layers:
The Business Services layer (I;e Business
Component)
This layer provides access to data from various sources and
handles business logic. ADF Component comes in this section are ViewObject,
EntityObject, ViewLink, Association etc.
The Model layer
This layer provides an abstraction layer on top of the Business
Services layer, enabling the View and Controller layers to work with different
implementations of Business Services in a consistent way. ADF Component comes
in this section are PageDefn, DataBindings, DataControls (AppModuleDataControl,
WebServiceDataControl).
The Controller layer
This layer provides a mechanism to control the flow of the Web
application. ADF Component comes in this section are as below:
·
Bounded Task Flow
·
Unbounded Task Flow
·
Faces-config.xml
·
Adfc-config.xml
The View layer
This layer provides the user interface of the application. ADF
components comes in this section are as below
·
Jsff : Refer to JSF Fragment.
·
jspx : Use JSPX as page fragment.
Q3 How will JDeveloper support rapid
development?
Ans : Oracle ADF is an
Oracle product Ide used to develop ADF application which is Oracle JDeveloper.
This IDE is has all component which support in rapid developer starting form
designing Application using the UML to Java, Visual Designer, DataBase
development, Testing Webservices to Deployment. Most of the feature are just
drag and drop. hence this IDE become the perfect choice for ADF development.
Although it bit slow and hangs sometime but still we don't have any other
option.
Q4 What are the
different type of Business Component in Oracle ADF?
Ans : Different kinds of
Business component support by ADF are EntityObject, ViewObjects, ViewLinks,
Association.
Q6 What is Entity
Object in ADF Framework?
Ans: EnitityObject in
ADF are similar to Table in database. Any number of ViewObejct can create on
single Entity.
Q6 What is ViewObejct
in ADF framework?
Ans : ViewObject is
represent the data collection. These view object can be created in different
ways which are as follows:
· Entity Based ViewObject: These viewobejct will hold the reference of
underlying entity. These view object can hold data from single or multiple
entities. While defining Viewobject based on Entity you can select the
attribute which you want to keep in entity.
· SQL Based ViewObject: These ViewObejct are based on sql quarries.
These viewobejct will have underlying SQL Query. At runtime they will hold data
return by SQL.
· Programatic View Object: User can define the view attribute which
defining viewobejct. Data will insert programmatically into these ViewObject.
· Static ViewObject : While defining user will
define attribute for view and in later he has to provide the values for those
attribute. These kind of viewobejct will have fixed no of rows.
Q7 What is Association
in ADF?
Ans: Association represent the relationship between 2 and more tables like foreign key relationship. If you create Entities from database association will automatically got created for entity. User can also define custom association if there is no foreign-key is define in database. In this way user can handle foreign key in ADF application and can remove overhead from database.
Ans: Association represent the relationship between 2 and more tables like foreign key relationship. If you create Entities from database association will automatically got created for entity. User can also define custom association if there is no foreign-key is define in database. In this way user can handle foreign key in ADF application and can remove overhead from database.
Q8 What is view link?
Ans: ViewLink
represent the relationship between data of same or multiple Entities or table.
It works in same manner as association work for entity. While defining the
ViewLink user can define the reference of already created association if
ViewObejct based on Entity Object else can manually select the column and
define link between 2 ViewObject.
Q9 Why we used applicationmodule in ADF framework?
Q9 Why we used applicationmodule in ADF framework?
Ans:Applicationmodule
is the component of ADF BC which hold the references of ViewObject and
instantiate them while running the application. ViewObejct reference define in
Application Module can be used to define the jsff/jspz page. If you want to use
any ViewObject on you page you must have to provide the reference in
Application Module.
Application module also provide the transaction management with commit and rollback operation
Q10 What is the controller in ADF in respect of MVC architecture?
Application module also provide the transaction management with commit and rollback operation
Q10 What is the controller in ADF in respect of MVC architecture?
Ans:Controllers in ADF
framework are TaskFlows, Faces-config.xml, adfc-config.xml. In all there file
you can define navigation between the pages.
Declare the manage-bean in different scope.
Q11 What are the different kind of resource bundle supported in ADF?
Ans: ADF support different types of resource bundle which are as follows:
Declare the manage-bean in different scope.
Q11 What are the different kind of resource bundle supported in ADF?
Ans: ADF support different types of resource bundle which are as follows:
·
Property file based
(txt file which contains key-value pair)
·
xliff file based (xml
file which contains key-value pair)
·
List Resource bundle
Q12 How to provide common
resource bundle for entire proejct?
Ans: Go to property file of you Project and select resouce bundle
From here you can select one bundle for entire project.
Ans: Go to property file of you Project and select resouce bundle
From here you can select one bundle for entire project.
Q13 How to provide separate resource bundle for each jsff/jspx?
Ans: Refer Q 12 answer there is option using that you can select One Bundle per file.
Q14 What is the
difference in jspx and jsff?
Ans: jspx and jsff file are same in most of manner. Only difference is that you can run jspx directly on browser while jsff file container which will run on browser.
Ans: jspx and jsff file are same in most of manner. Only difference is that you can run jspx directly on browser while jsff file container which will run on browser.
Q15 What is taskflow ?
how many type of taskflow adf support?
Ans: Taskflow is the Component of Oracle ADF which is used to define simple task. After successfully defining task-flow can consume any number of time.
ADF support two kind of taskflow:
Ans: Taskflow is the Component of Oracle ADF which is used to define simple task. After successfully defining task-flow can consume any number of time.
ADF support two kind of taskflow:
·
Bounded
TaskFlow : Bonded taskflow
require the page on which they will consume.
·
UnBounded
TaskFlow : Unbounded
taskflows can directly run on browser
Q16 How to develop
reusable taskflow in ADF?
Ans: Please fins the step below
Ans: Please fins the step below
·
Define taskflow
·
Define deployment
profile as ADF Library jar
·
Deploy adf jar file
·
Open new project where
you want to consume the task flow.
·
Add newly created jar
of taskflow project
·
go to component palate
You will fine you jar name select it.
·
It will show list of
taskflow you developed
·
Drag drop your
taskflow as region on jsff/jspx page and run ur application
Q17 Can bounded
taskflow run on browser?
Ans: NO
Ans: NO
Q18 What are different
scope of adf taskflow?
Ans: Isolate/Shared
Shared scope will share data among the multiple instance of taskflows while Isolated doesn't.
Q19 How can you force ADF taskflow to use new transaction everytime taskflow is called?
Ans: Go taskflow overview and you will file below item
Select always begin new transaction fron dropdown
Shared scope will share data among the multiple instance of taskflows while Isolated doesn't.
Q19 How can you force ADF taskflow to use new transaction everytime taskflow is called?
Ans: Go taskflow overview and you will file below item
Select always begin new transaction fron dropdown
Q20 How to use same
transaction in ADF taskflow?
Q 21 How can you pass
parameter to adf taskflow?
Ans: Go to overview select parameters link it will show screen like
Here you can add multiple parameter which you want to pass takflow while loading it.
Ans: Go to overview select parameters link it will show screen like
Here you can add multiple parameter which you want to pass takflow while loading it.
Q22 Explain the
purpose of using Controls flow in adf?
Ans: Controls flow defined in taskflow can be called anytime from any page of that taskflow.
if you have same flow for multiple pages just define the control flow once in taskflow. You can invoke it anytime from any action event.
Ans: Controls flow defined in taskflow can be called anytime from any page of that taskflow.
if you have same flow for multiple pages just define the control flow once in taskflow. You can invoke it anytime from any action event.
Q23 What is the
behavior of router in ADF taskflow?
Ans : Based on some condition router can decide which route need to be follow. If none of condition match in that case router will follow default route defined by used.
Ans : Based on some condition router can decide which route need to be follow. If none of condition match in that case router will follow default route defined by used.
Q24 How can navigation
define in taskflow?Ans : Navigation can be defined in taskflow using control flows and invoked by jsff/jspx page using action event like button link etc.
Q25 Can ADF task flow
hold more than 1 view activity?Ans: Yes. ADF taskflow can have multiple view activity but 1 activity has to be defined as default activity.
Q26 What is the Parent
Action in ADF Taskflow?Ans:Parent action is activity using that you can invoke the Control flow define in parent taskflow from child taskflow.
Q27 What is method
activity in Adf Taskflow?
Ans: Using this activity you can invoke and method defined in manage-bean.
Ans: Using this activity you can invoke and method defined in manage-bean.
Q28 How to initialize
ADF Taskflow?
Ans: Open the taskflow in Overview Mode select general like there is initiallizer property.
you can provide the any method reference which will get invoked whenever taskflow instance created.
Ans: Open the taskflow in Overview Mode select general like there is initiallizer property.
you can provide the any method reference which will get invoked whenever taskflow instance created.
29.
JSF Page Flow Vs ADF Task Flow
|
JSF
Page Flow
|
ADF
Task Flow
|
|
The entire application
must be represented in a single page navigation file (faces-config.xml).
Although you can have multiple copies of faces-config.xml in a project, the application
loads these files as one at runtime.
|
The application can be
broken up into a series of modular flows that call one another.
|
|
All nodes within a JSF
page flow must be JSF pages. No other types of objects can exist within the
JSF page flow
|
You can add to the
task flow diagram nodes such as views, method calls, and calls to other task
flows
|
|
Navigation is only
between pages
|
Navigation is between
pages as well as other activities, including routers
|
|
Application fragments
cannot be reused
|
ADF task flows are
reusable within the same or an entirely different application. After you
break up your application into task flows, you may decide to reuse task flows
containing common functionality
|
|
No shared memory scope
between multiple requests except for session scope
|
Shared memory scope
(for example, page flow scope) enables data to be passed between activities
within the task flow. Page flow scope defines a unique storage area for each
instance of an ADF bounded task flow
|
|
Can be converted to an
ADF taskflow
|
Cannot be converted
back to JSF Page Flow
|
30. Page(.jspx) Vs Page
Fragment(.jsff)
|
Page
|
Page Fragment
|
|
.jspx or .jsf page is
JSP/XML representation
|
.jsff (JSF fragments)
page is fragment of JSF(Java Server Faces) page
|
|
Standalone page and
can run without any supporting or base page
|
Cannot run
independently, it requires a base .jsf(JSF page) or .jspx (JSP/XML) page
|
|
Regular pages, can
contain other fragments
|
Page fragments
|
|
Cannot be embedded
|
Can be used in
regions, dialogs, pages etc
|
|
Typically has the
components like af:document, af:form, f:view
|
Cannot have the
components like af:document, af:form, f:view
|
31. Unbounded Task
Flow(UTF) Vs Bounded Task Flow(BTF)
|
Unbounded Task
Flow(UTF)
|
Bounded Task Flow(BTF)
|
|
No boundaries, pages
are public
|
Well-defined boundary
|
|
Cannot be reused
|
Reusable
|
|
No Security
|
Has security control
|
|
Multiple Entry points
|
Has a single entry
point
|
|
Cannot be
parameterized
|
May accept input
parameters
|
|
Cannot return values
|
May generate return values
|
|
No Transaction Control
|
Provides transaction
Control
|
|
No default activity
|
Always has a default
activity
|
|
Typical application
has one Unbounded TF
|
Typical application
can have many BTFs
|
|
Created with pages
|
Created with
pages(.jspx) or page fragments(.jsff)
|
|
Bookmarkable
|
Cannot be bookmarked
|
|
Cannot be based on a
template
|
Can be based on a
template
|
|
Eg: Home, Help,
Contact Us, Privacy Policy, Search etc
|
Eg: Add to Cart,
Checkout, Shipping details, Payment etc.
|
ADF Lifecycle phases:
1. initialize
This phase initializes the values of the associated request, binding container and lifecycle. The method that is used from the Interface Lifecyle for this purpose is :
initializeMethodParameters(LifecycleContext lcContext, oracle.jbo.uicli.binding.JUCtrlActionBinding actionBinding)
This method is invoked before any ControlBinding or custom method is being executed.
2. prepareModel
This phase prepares and initializes the Model. Page parameters are set and methods in the executable section of the page definition of the ADF page are executed. The interface LifeCycle method used :
prepareModel(LifecycleContext lcContext)
3. applyInput
This phase handles the request parameters. These may come by adding the request parameters in the URL or as a result of HTML form post action. A list of events is build using these request parameters. These are actually mapped to the bindings in the pageDef. This phase resolves the list of request parameters bind to attributes in the page def. This results into a list of updatedValues which is used in Update Model phase.
The interface LifeCycle method used :
buildEventList(LifecycleContext lcContext)
Builds the list of events with their possible associated action binding from the request parameters.
4. validateInput
This phase validates the list of values built in the Apply input values field with model.
5. updateModel
This phase updates data model with the list of values created in apply input values phase.
The interface LifeCycle method used :
processUpdateModel(LifecycleContext lcContext)
Update the data model with values submitted in the request.
6. validateModelUpdates
This phase validates the Updates in the previous phase by calling the associated lifecycle's binding container .
The interface LifeCycle method used :
validateModelUpdates(LifecycleContext lcContext)
Forces model-level validation to occur.
7. Process Component Updates
This phase handles any events in the list built during the apply input values phase. Named events as well as all the events tied to the databindings created in the pagdef are handled in this phase.
The interface LifeCycle method used :
processComponentEvents(LifecycleContext lcContext)
Handle any events in the action binding list previously built in processUpdateModel using the buildEventList method.
8. Metadata Commit
This phase commits the runtime metadata changes to the model. This phase is always executed before prepare render phase.
9. Prepare Render
This is the final phase where page is sent for rendering. prepareRender event is sent to all the registered listeners. This notification signals bindings to prepare or process the data for rendering. Binding container is also refreshed. This helps
in updating any changes that happened during validation phases.
1. initialize
This phase initializes the values of the associated request, binding container and lifecycle. The method that is used from the Interface Lifecyle for this purpose is :
initializeMethodParameters(LifecycleContext lcContext, oracle.jbo.uicli.binding.JUCtrlActionBinding actionBinding)
This method is invoked before any ControlBinding or custom method is being executed.
2. prepareModel
This phase prepares and initializes the Model. Page parameters are set and methods in the executable section of the page definition of the ADF page are executed. The interface LifeCycle method used :
prepareModel(LifecycleContext lcContext)
3. applyInput
This phase handles the request parameters. These may come by adding the request parameters in the URL or as a result of HTML form post action. A list of events is build using these request parameters. These are actually mapped to the bindings in the pageDef. This phase resolves the list of request parameters bind to attributes in the page def. This results into a list of updatedValues which is used in Update Model phase.
The interface LifeCycle method used :
buildEventList(LifecycleContext lcContext)
Builds the list of events with their possible associated action binding from the request parameters.
4. validateInput
This phase validates the list of values built in the Apply input values field with model.
5. updateModel
This phase updates data model with the list of values created in apply input values phase.
The interface LifeCycle method used :
processUpdateModel(LifecycleContext lcContext)
Update the data model with values submitted in the request.
6. validateModelUpdates
This phase validates the Updates in the previous phase by calling the associated lifecycle's binding container .
The interface LifeCycle method used :
validateModelUpdates(LifecycleContext lcContext)
Forces model-level validation to occur.
7. Process Component Updates
This phase handles any events in the list built during the apply input values phase. Named events as well as all the events tied to the databindings created in the pagdef are handled in this phase.
The interface LifeCycle method used :
processComponentEvents(LifecycleContext lcContext)
Handle any events in the action binding list previously built in processUpdateModel using the buildEventList method.
8. Metadata Commit
This phase commits the runtime metadata changes to the model. This phase is always executed before prepare render phase.
9. Prepare Render
This is the final phase where page is sent for rendering. prepareRender event is sent to all the registered listeners. This notification signals bindings to prepare or process the data for rendering. Binding container is also refreshed. This helps
in updating any changes that happened during validation phases.



