Wednesday, 11 February 2015

ADF Questions

Basic Oracle ADF Interview Question and Answers
     What are the components of ADF?
   Oracle ADF consists of 4 components      
   ADFc-ADF Controller 
   ADFm-ADF model
   ADFbc-ADF Business Component
   ADFdi Desktop integration with Microsoft Office 2007

    What is ADF Controller?
   ADFc:The controller component in ADF is an extension of the JSF navigation model
  and promotes modularization and reuse. In addition, ADFc provides declarative transaction
   handling and clearly defined process boundaries.

  What is ADF model?
ADFm The binding layer and model are represented by data controls and the binding
container object. ADFm is built on JSR-227 and abstracts the view layer model access
from the implementation details of the underlying business service.

   What is ADF Business Components?
ADF Business Components provides a foundation of lightweight Java classes and XML metadata
configuration files for building database-centric business models that include business logic,
validation, queries, transaction handling, and data access.

 What is ADF Desktop Integration?
ADFdi Desktop integration with Microsoft Office 2007 allows developers to access the
Server-side ADF binding layer from Excel workbooks.
      
  What is Application Module?
One or more modules that expose the data model based on the
defined view objects and their relations. The root application module represents the
transaction context on which commit and rollback operations are executed

    What is Entity Object?
Java object that represents a row in a database table. It automatically
handles data validation, storage and persistence.

   What is View object?
A query definition that provides data based on SQL queries, programmatic
Java, and stored procedure access and static lists. SQL query-based view objects that
reference one or many entity objects make the query result updateable, allowing Data
Manipulation Language (DML) operations. A set of one or more view objects used in
an application module define the business service access layer.

   What is Association?
Entity object associations define the relationships between two entity
objects. The association can be read from defined database constraints or manually
defined. Associations allow programmatic navigation between related objects to
implement complex business rules as well as simplify building join queries over sets
of related business data.

  What is View Link?
Relations that are based on entity associations or defined manually, providing
master-detail coordination between view objects.


Oracle ADF Interview Question And Answers part-2

What is Oracle ADF?
Oracle ADF is an commercial java/j2ee framework, which is used to build enterprise applications.
It is one of the most comprehensive and advanced framework in market for J2EE

What are the advantages of using ADF?
Following are the advantages of using :
·         It supports Rapid Application Development.
·         It is based on MVC architecture
·         Declarative Approach (XML Driven)
·         Secure
·         Reduces maintenance cost and time
·         SOA Enabled
What is the return type of Service Methods?
Service Methods can return Scalar or Primitive Data types.

Can Service Methods return type Void?
Yes, Service Methods can Return type Void

 Can Service Methods return Complex Data types?
No, service methods can return only primitive/scalar data types.

 Which component in ADF BC manages transaction ?
 Application Module, manages transaction.

Can an entity object be based on two Database Objects(tables/views) or two Webservices ?
 No entity objects will always have one to one relationship with a database object or web service.

Where is that we write business rules/validations in ADF and why?
We should be writing validations at Entity Object level, because they provide highest degree of reuse.

What is Managed Bean?
Managed bean is a java class, which is initialized by JSF framework. It is primarily used to hold view and controller logic. It is also used to execute java code to be executed on a user action like Button Click.

 What are Backing Bean?
Backing beans are those managed beans which have 1:1 mapping with a page. They have getters and setters for all the components in the related page.

What is difference between managed and backing beans?
Backing bean has 1:1 relation with page where as managed beans can be used in multiple pages.
Backing beans scope is limited to the page whereas managed beans can have other scopes too.

What is a Taskflow?
Task flow is the controller of an ADF application, it provides us an declarative approach to define the control flow. It is used to define the navigation between pages and various taskflow activities.

What are the different types/categories of Taskflows ?
 Taskflows are of two categories : Bounded and UnBounded.

 What is the difference between Bounded and UnBounded taskflows?

Bounded Task Flow
Unbounded Task Flow
 Bounded task flows can be secured
Unbounded can’t
  Bounded task flows can accept parameter and return values
unbounded task flows don’t support  parameters

 Bounded task flows has a single entry point or a default activity
Unbounded task flows have multiple entry points.

 Bounded task flows can be called from other bounded/unbounded task flows
Unbounded cannot be called or reused.

Bounded task flows support transactions
unbounded don’t support Transactions
What are the various access scopes supported by ADF?
ADF Faces supports the following scope.      
1.       Application Scope
2.
      Session Scope
3.
      PageFlow Scope
4.
      Request Scope
5.
      BackingBean Scope.

 Describe life cycle of a ADF Page?

ADF page is an extension of JSF and has following phases in its lifecycle

Initialize Context: In this phase the adf page initializes the LifecycleContext with information that will be used during the Lifecycle.


 
Prepare Model: In this phase ui model is prepared and initialized. In this phase page parameters area set and methods in the executable section of the page definition of the ADF page are executed.

 
Apply Input Values: This phase handles the request parameters. The values from the HTML are sent    to the server and applied to the page binding in page definitions.

 
Validate Input Values:This phase validates the values that were built in the Apply input values phase

 
Update Model:  Validated values supplied from user are sent to ADF business components data model.

Validate Model Updates: In this phase the business components will validate user supplied values.

Invoke Application: This phase will process the events stack built during the life cycle of page and also fire navigational events.

Prepare Render: This is the final phase where HTML code is generated from the view tree.

 What is PPR and how do you enable Partial Page Rendering(PPR)?
PPR is a feature supported by ADF Faces, using which we can render a small portion of a HTML Page, without refreshing the complete page.It is enabled by.
1.      Setting Auto Submit property to true on the triggering element.
2.
      Setting the Partial Triggers property of target component to refer to component id of the triggering element.

Interview Question and Answers part-3

Explain MVC-Architecture?

Model-View-Controller is a frequently used design pattern that defines a separation of application code into three layers, as shown here.

Model:
 The Model layer defines and validates the data used by the application. It includes code to validate business rules and to communicate data to and from the database. It interacts with the View layer to notify it of changes in the data. It interacts with the Controller layer by receiving and processing requests to update data in the application.

View: The View layer provides the user interface that displays data from the Model layer. It interacts with the Controller layer by receiving requests to update the user interface and by sending it user events (for example, a button press).
Controller: The Controller layer determines what happens after a user event occurs in the View layer. It interacts with the View layer to request user interface updates it sends requests to the Model layer when data needs to be updated. The Controller layer is responsible for task flow—the determination of what the View layer will render, and what changes to data the Model layer will make, after a certain data or user event.

Explain ADF Life Cycle?

Init Context: sets up the life cycle, working out what PageDefs to load.
Prepare Model: creates the bindings object and adds it to the HTTP request. 
Apply Input Values: processes the values posted from the page and builds up an internal list of bindings to update and methods to execute as required.
Validate Input Values: applies the client-side validators to the list of updates presented by the applyInputValues phase. These validators are defined as nested f: validator and af: convertNumber components within an input component.
Process Update Model: sends the validated changes to bound objects to the model layer (ADF BC in this case).
Validate Model Updates: manages validation errors from the Model layer. For example, an inserted record may violate a primary key constraint. This phase will capture and report  that error.Process Component Events processes any listeners and action events queued up from the applyInputValues phase.
Metadata Commit: manages part of the runtime customization capabilities of the framework. If the user has customized the page in some way such as moving components on the screen or adding in task flows via WebCenter, then those personalizations to the screen are saved away to the metadata repository this
What are the components in Task Flow?

There are six components in task flow
Method Call
Router
URL View
View
Control Flow Case
Wild Card

What is Method Call?Why it is used?

Invoke a Managed bean method within a task flow's.
Uses:
 Specify methods to perform tasks such as initialization before displaying a page.
 Clean up after exiting a page,
 Handling exceptions

What is Router?

A router has multiple control flows leading from it to different activities.

What is URL View ? why it is used?

Use to redirect the root view port.
Uses:
 In browser page to URL addressable resource Ex:www.google.com.
on URL Click it will navigate to google website.
and even from within the context of an ADF region.

What is View in task flow?

View is the page fragment(JSFF) is a JSF document that is rendered as content in another JSF page.
 Page fragments are typically used in bounded task

What is Control Flow Case?

Use to define a control flow originating from one point to another point.

What is Wild Card?

Wild card control flow is available in unbounded and bounded task flows.
you can pass control from any activity in the task flow to wildcard control flow rule. 
.
Prepare Render: is the last phase to execute before the page is displayed.



 




No comments:

Post a Comment