Thursday, 27 September 2012

Oracle ADF 11g interview questions

Q : What are various components in ADF?
A : Oracle ADF has following components

· ADF Business Components(Model)
· ADF Faces (View)
· ADF Taskflows(Controller)
Q : What is Oracle ADF?
A : 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

Q : What are the advantages of using ADF?
A : 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
Q : What is the return type of Service Methods?
A : Service Methods can return Scalar or Primitive Data types.

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

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

Q : What is Managed Bean?
A : 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.

Q : What are Backing Bean?
A : 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.

Q : What is a Taskflow?
A : Taskflow 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 activites.

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

Q : What is the difference between Bounded and UnBounded taskflows?
A : Differences between Bounded and UnBounded taskflows :

· Bounded taskflows can be secured but Unbounded can’t.
· Bounded taskflows can accept parameter and return values but unbounded taskflows don’t support parameters
· Bounded taskflows has a single entry point or a default activity but unbounded taskflows have multiple entry points.
· Bounded taskflows can be called from other bounded/unbounded taskflows but unbounded cannot be called or reused.
· Bounded taskflows support transactions unbounded don’t

Q : What are the various access scopes supported by ADF?
A : ADF Faces supports the following scopes

The DataBindings.cpx keeps track of the individual page definitions files used within the project, as well as the DataControls mapping to such things as ADF Business Components Application Modules.

Till Jdeveloper 10.1.3 release there was no way to have multiple DataBindings.cpx files which was very much desirable as the project the size grows and being worked by multiple teams. Jdeveloper 11g added this capability to have multiple DataBindings.cpx files.

There is a new file in 11g called adfm.xml which is used to keep track of all such DataBindings.cpx files in the system. So, when breaking your DataBindings.cpx you need to take care to create an entry in the adfm.xml. You also need to make sure to have unique application id attribute value for each entry.
Q: How to Skip Validation?
A: At view layer Keep immediate=true

Q : Describe life cycle of a ADF Page?
A : ADF page is an extension of JSF and has following phases in its lifecycle

1. Initialize Context: In this phase the adf page initializes the LifecycleContext with information that will be used during the Lifecycle.
2. Prepare Model: In this phase ui model is prepared and initialized. In this phase page parameters are set and methods in the executable section of the page definition of the ADF page are executed.
3. 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.
4. Validate Input Values: This phase validates the values that were built in the Apply input values phase
5. Update Model: Validated values supplied from user are sent to ADF business components data model
6. Validate Model Updates: In this phase the business components will validate user supplied values.
7. Invoke Application: This phase will process the ui events stack built during the life cycle of page and also fire navigational events
8. Prepare Render: This is the final phase where HTML code is generated from the view tree.

Q: What is Association and Viewlink ?
A: They define the join or the link among EO’s and VO’s.Association defines link between EO’s.They can be considered as PrimaryKey/ForeignKey relationship between tables.
The Viewlink is for a VO.It defines the Join conditions.A viewlink can be based on an association or based on attributes,Basing viewlinks on associations have the same advantage of entity cache and few more which are unveiled later.