Wednesday, 8 May 2024

Oracle ADF Interview Questions and Answers Latest 2024



Oracle ADF Interview Questions & Answers Latest

---------------------------------------------------------------

1) What is Oracle ADF ? 

Answer: 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 design patterns, metadata-driven, and visual tools.

2) ADF Features-

Answer:  Making Java EE Development Simpler.
Oracle ADF implements the Model-View-Controller (MVC) design pattern and offers an integrated a solution that covers all the layers of this architecture with a solution to such areas as:
·        Object/Relational mapping, 
·        Data persistence, 
·        Reusable controller layer, 
·        Rich Web user interface framework, 
·        Data binding to UI, 
·        Security and customization.
·        Its supports Rapid Application Development.
·        Declarative approve (XML Driven)
·         Reduce Maintenance Cost and time
·        SOA Enabled

3) What is ADF BC (Business Components)? Describe them.

Answer: All of these features can be summarized by saying that using ADF Business Components for your J2EE business service layer makes your life a lot easier. The key ADF Business Components that cooperate to provide the business Service implementation is:

Entity Object: An entity object represents a row in a database table and simplifies modifying its data by handling all DML operations for you. It can encapsulate business logic for the row to ensure your business rules are consistently enforced. You associate an entity object with others to reflect relationships in the underlying database schema to create a layer of business domain objects to reuse in multiple applications.

Application Module: An application module is a transactional component that UI clients use to work with application data. It defines an updatable data model and top-level procedures and functions (called service methods) related to a logical unit of work related to an end-user task.

View Object: A view object represents a SQL query and simplifies working with its results. You use the full power of the familiar SQL language to join, project, filter, sort, and aggregate data into exactly the “shape” required by the end-user task at hand. This includes the ability to link a view object with others to create master/detail hierarchies of any complexity. When end users modify data in the user interface, your view objects collaborate with entity objects to consistently validate and save the changes.

4) How does ADF fall in MVC architecture?

Answer: Oracle ADF Architecture is based on the Model-View-Controller (MVC) design pattern.MVC consists of three layers which are a 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.
The Oracle ADF architecture is based on four layers:

The Business Services Layer

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 TaskFlows(Bounded and unbounded, 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 jsff, jspx page.

5) Oracle ADF Life Cycle Step by step easy way to answer :

Answer: It has the following phases :

a) Restore view :

When we hit the URL in the browser it will build the component tree corresponding to the tags given in the JSF pages.
for the first time, it will build the tree and saves in the server memory.
For the second time onwards, it will try to restore the existing component tree from the server memory.
Otherwise, if there are any changes in the page components it will rebuild the tree again.

b) Initialize Context :

In this phase the databinding.cpx file will be read and the bindingcontext object will be created based on that. 
Binding context is nothing but a mapping of pages and page definitions.
From the binding context, it will identify the page definition corresponding to the page. 
it will read the page definition file and creates the binding container objects.  

c) Prepare model  : 

Once the binding Container is ready it will try to prepare the model objects bypassing any parameter values 
and if there are any task flow parameters are all evaluated in the phase

d) Apply Request Values :

If we enter any values in the browser against the form fields, those values will be applied against the component tree objects. 

e) Process validation :

Once the values are applied to fields they will be validated if there any client-side validation is specified. like a mandatory min-max length.

f) Update model values : 

Once UI validation is passed values will be applied to model objects like VO and EO

g) Validate Model Updates :

If there is any validation specified at entity level that will be executed. 

h) Invoke action :

Event-related actions like the action method and action listener code will be executed

i) Metadata commit : 

If there are any MDS related changes will be saved.

j) Render response : 

Based on the action it will either navigate to the next page and display the response in the browser are continuing on the same page. 

6) What are the various components in ADF?

Answer: Oracle ADF has following components
ADF Business Components: VO, EO & AM
ADF Model : DataBinding (.cpx, .xml) & DataControls(.dcx)
ADF View: JSP, JSF, ADF Faces etc.
ADF Controller: Task flows (adf-config.xml), faces-config.xml


7) How to enable security to ADF Application?

Answer:
1. Go to the menu Application -> Secure -> Configure ADF Security and go through the wizard of creating login pages. 
2. Go to the menu Application -> Secure -> Application Roles and create an application role for this application.
3. Create a test user and assign an application role to it.
4. Grant all required application resources to this role.

8) How can you manage the transaction in ADF?

Answer: In ADF transaction can we manage at ApplicationModule as well as task flow level.
Task flow supports different mode of transaction like:

• No Controller transaction 
• Always begin new transaction 
• Always use existing transaction 
• Use Existing Transaction if possible

9) What is the purpose of Chanage Indicator?

Answer:
While committing data to the table, database will check those columns to check weather we are committing on the latest data or not. 

10) What is PPR in ADF?

Answer: PPR means Partial Page Rendering. It means that in ADF we can refresh the portion of the page. We don't need to submit the whole page for that.

11) how to develop  Master-details view in ADF?

Answer: For Developing the Master-details view in ADF. You have to create a relationship between the 2 view object. That relationship can be created using the view link or association between entity Object. using that relationship you can create the master-details view of data. That master-details view can be Form-Form, Form-Table, Table-Table, Table-Form.

12) What is the difference between Action and ActionListener?

Answer:
ActionListener: ActionListener is the method which got invoked when the user clicks on the Component like button, command link, etc.
Action: Action is the outcome of where you want to move once Actionlistener is completed. This can be defined in the task flow as an activity.  So when listener completed application is redirected to define activity. 

13) Definitions :

Answer:
jazn-data.xml - Store the security rules or permissions that you will create for the application, as well as providing a simple credential store for testing purposes.
JDeveloper also updates the following files, which already exist:

web.xml – Name of the login and error pages have been added to this file. 

weblogic.xml - The Section “security role assignment” of this file is used to map users (also called “principals”) to roles in WebLogic. 

adf-config.xml -   
Applications level settings like this 
MDS configuration, 
Database locking mode, 
View Object Max fetch size.  

faces-config.xml:
The JSF configuration file is where you register a JSF application's resources such as custom validators and managed beans, and define all the page-to-page navigation rules. While an application can have any JSF configuration file name, typically the file name is the faces-config.xml file. Small applications usually have one faces-config.xml file.When you use ADF Faces components in your application, JDeveloper automatically adds the necessary configuration elements for you into faces-config.xml

adfc-config.xml:
The adfc-config.xml file is the default page flow diagram JDeveloper provided when you created an application based on the Fusion Web Application (ADF) template. adfc-config.xml is the default file name for an unbounded task flow. On this diagram, you can create a new page based on the template, which is not part of the existing orders-flow task flow.

adf-settings.xml: 

we will register Page Phase listener


14) What Is Binding Context And Binding Container?
Answer:
Binding context is a runtime map between the data controls and page definition of pages in the application which is used to access the binding layer. It is accessible through the EL expression in your jspx pages. Binding container is a request-scoped map that is used to instantiate the page bindings. This is accessible through the EL expressions. Also, since it is request-scoped map, it is accessible during every page request.

15) Which component in ADF BC Manages transaction?

Answer:Application Module, manages transaction.

16) Where is that we write business rules/validations in ADF and why?
Answer:
We should ideally be writing validations at an Entity Object level because they provide the highest degree of reuse.

17)  What is the Controller in ADF in respect of MVC architecture?

Answer: Controllers in the ADF framework are TaskFlows, Faces-config.xml, adfc-config.xml. In all there file you can define navigation between the pages.

18) What is an Entity object in ADF Framework?

Answer: Entity object in ADF is similar to Table in the database. Any Number of view object can create on single Entity.

19) What is the View object in the ADF framework?

Answer: ViewObject is representing the data collection. These view object can be created in different ways which are as follows:
Entity-Based ViewObject: This view object will hold the reference of the 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 the entity.
SQL Based ViewObject: These view objects are based on SQL quarries. This view object will have an underlying SQL Query. At runtime, they will hold data return by SQL.
Programmatic View Object: User can define the view attribute which defining view object. Data will insert programmatically into these ViewObject.
Static ViewObject: While defining user will define an attribute for view and in later he has to provide the values for those attribute. This kind of view object will have fixed no of rows.

20) What are Control Hints in Entity Object configuration?

Answer: Control hints are associated with the current view or entity attribute. All view objects inherit the hint values at run time.
Control hints for data controls and bindings, including Labels, Date & currency formatting.

21) Can an entity object be based on two Database Objects(tables/views) or two Webservices?

Answer: No, Directly it's not possible to create EO using multiple tables.
Entity objects will always have one to one relationship with a database object or web service.
But using views you can create Entity Objects on multiple tables.


22) What is the return type of Service Methods?

Answer: Service Methods can return Scalar or Primitive Datatypes.

23) How do you decide whether the application should be deployed as an EAR or a WAR?

Answer: If the application contains run-time customizations using MDS, it must be bundled as an EAR. For simple WebCenter portal application with no such customizations, WAR can be created.

24) Explain Data binding & its types, sub-types?

Answer:Oracle Application Development Framework (Oracle ADF) provides several types of binding objects to support the attributes and operations exposed by the Oracle ADF data controls for a particular business object:
ITERATOR BINDING, one per accessor attribute that your page or panel displays. Iterates over the business objects of the data collection and maintain the row currency and state.
VALUE BINDINGS, one for each data-bound UI component. Provides access to data.
ACTION BINDING, specifically defined for a button component. Provides access to operations defined by the business object.
Value Binding Types:
      1.  Attribute Value Binding
2. Boolean Value Binding
3. List Value Binding
4. Range Value Binding
5. Scroll Value Binding

25) What is Association in ADF?

Answer: Association represents the relationship between 2 and more tables like a foreign key relationship. If you create Entities from the database association will automatically get created for the entity. User can also define custom association if there is no foreign-key is defined in the database. In this way, the user can handle foreign key in ADF application and can remove overhead from the database.

26) What is the view link?

Answer: ViewLink represents the relationship between data of the same or multiple Entities or table. It works in the same manner as association work for the entity. While defining the ViewLink user can define the reference of the already created association if view object based on Entity Object else can manually select the column and define the link between 2 ViewObject.

27) Why we used an application module in the ADF framework?

Answer: Application module is the component of ADF BC which hold the references of ViewObject and instantiate them while running the application. view object reference defines in Application Module can be used to define the JSF/JSP page. If you want to use any ViewObject on your page you must have to provide the reference in Application Module


28)  What Is The Difference Between Visible Property And Render Property?

Answer: The visible property is set to true/false based on the requirement whether we want to see the field on the page or not at run time. The field or component still exists on the page, though hidden.
The render property is used to conditionally load the component based on a criteria.

29) How Do You Define Pagination In Adf?


Answer: In ADF 12c, there is ScrollPolicy property for af:table.
If we give ScrollPolicy = page then pagination will be added automatically. 

30) Can Service Methods return type Void?

Answer: Yes, Service Methods can Return type Void

31) Can Service Methods return Complex Datatypes?

Answer: No, service methods can return only primitive/scalar data types.

32) What Is The Difference Between Databindings.cpx And Datacontrol.dcx?

Answer:
The DataBindings.cpx file contains the Oracle ADF binding context for your entire application and provides the metadata from which the Oracle ADF binding objects are created at runtime. The DataControls.dcx file is created when you register data controls on the business services. This file is not generated for Oracle ADF Business Components. It identifies the Oracle ADF model layer data control classes(factory classes) that facilitate the interaction between the client and the available business service.

33) What do you mean by Bean Scope?

Answer: Bean Scope typically holds beans and other objects that need to be available in the different components of a web application.

34) Setting the range of table?

Answer:
<af:table rows=”#{bindings.LoggedInUserServiceRequests.rangeSize}”…/>

35) what is a region in Oracle ADF?

Answer: An ADF dynamic region is an ADF region where the task flow binding dynamically. Determines the value of its taskFlowId attribute at runtime. This allows the Fusion. web application to determine which bounded task flow to execute within the ADF

36) How to skip validation in ADF?

Answer:Add immediate="true" to the button. This way all input fields which don't have immediate="true" will be skipped in processing.
This method mainly used for view layer validation skip.


37) What Are Validators And Converters In Adf ?

Answer:
validators :

If somehow you need to create your own validation logic to meet your business needs. You can either create a validation method on the page’s backing bean (if you want custom validation for a component on a single page) or create JSF validator classes (if you want to reuse the validation logic by various pages in the application).In the real world, of course, creating the custom JSF validator classes would be adopted for ADF application for better reuse and maintenance.

converters :

converters are used for converting the values from one type to another, like decimal to bigdecimal or from string to date or date to string.

38) How to make any field mandatory?

Answer: Add attribute required="true" to that specific field.

39) What are the various access scopes supported by ADF?

Answer: ADF Faces supports the following scopes
1. Application Scope
2. Session Scope
3. PageFlow Scope
4. Request Scope
5. BackingBean Scope.

40) How to pass ''af:selectOneChoice'' value to other page?

Answer:Add valuePassThru="true" attribute to select list. 

41) What are the types of ADF Faces components?

Answer:ADF Faces components:
Data components
Input components
Layout components
Navigational components
Output components

42) What is PPR and how do you enable Partial Page Rendering(PPR)?

Answer: PPR is a feature supported by ADF Faces, using which we can render a small portion of an HTML Page, without refreshing the complete page.
It is enabled by.- Setting AutoSubmit property to true on the triggering element.
- Setting the PartialTriggers property of the target component to refer to the component id of the triggering element.

43) Explain Role Of Javascript In Adf?

Answer: ADF Component allows JavaScript function to listen for ADF Faces component events, like select or disclosure events, and browser DOM events like focus, mouse hover, mouse click or keyboard events. The component has its client Component property set to true.

44) What is the association in ADF?

Answer: Oracle ADF associations are business components that defines a relationship between two Oracle ADF entity object definitions (the "source" and "destination" entity objects) based on sets of entity attributes (the "source" and "destination" attributes) from each.

45) What are the different types/categories of Taskflows?

Answer: Taskflows are of two categories : Bounded and UnBounded.

46) When we drag drop VO from DataControl which binding occurs?

Answer: Value binding occurs.


47)  What is a Taskflow?

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

48) What is the difference between Bounded and UnBounded task flows?

Answer: Differences between Bounded and UnBounded taskflows :
Bounded taskflows can be secured but Unbounded can’t.
Bounded taskflows can accept the 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

49) What Is Policy Store And Identity Store In Oid?
Answer: Identity Store is used to store information about users and groups while the Policy Store is used to store information about security policies.

50) What are the Data Control scopes available in ADF?

Answer: Isolate/Shared
Shared : Data Control instances will be shared across the task flows 
Isolated: New set of data control instances will be created

51) Can bounded task flow runs on the browser?
Answer: NO

52) Explain the purpose of using Controls flow in ADF?

Answer: Controls flow for Navigation from one activity to other activity with in the Task flow. 

53) What is the behavior of the router in ADF task flow?

Answer:
Based on some condition router can decide which route need to be followed. If none of the condition match in that case router will follow the default route defined by use.

54) How can navigation define in task flow?

Answer: Navigation can be defined in task flow using control flows and invoked by jsff/jspx page using action event like button link etc.

55) Can ADF task flow hold more than 1 view activity?

Answer: Yes. ADF task flow can have multiple view activity but 1 activity has to be defined as the default activity. 

56) What is the Parent Action in ADF Taskflow?

Answer: Parent action is activity using that you can invoke the Control flow define in parent task flow from child task flow. 

57) What is the method activity in Adf  Taskflow?

Answer: Using this activity you can invoke any method defined in manage-bean.

58) How to initialize ADF Taskflow?

Answer: Open the task flow in Overview Mode select general like there is initializer property. 
you can provide any method reference which will get invoked whenever task flow instance created.

59) What is Managed Bean?

Answer: Managed bean is a java class, which is initialized by the 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.

60) What is Backing Bean?
Answer: 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.

61) What is the difference between managed and backing beans?

Answer: Backing bean has 1:1 relation with page whereas managed beans can be used in multiple pages.
Backing beans scope is limited to the page whereas managed beans can have other scopes too.

62)  What is a different kind of resource bundle supported in ADF?

Answer: ADF supports different types of resource bundle which are as follows:
Property file based (text file which contains key-value pair)
xliff file based (XML file which contains key-value pair)
List Resource bundle

63) What is the difference between jspx and jsff?
 Answer: jspx and jsff file are the same in most of the manner. The only difference is that you can run jspx directly on the browser while jsff file container which will run on the browser.

64)  Following three main component attributes are used to enable partial page rendering:

Answer: autoSubmit: When the autoSubmit attribute of input or select component is set to true, and appropriate action takes place (such as a value change), the component automatically submits the form it is enclosed in.
partialSubmit: When the partialSubmit attribute of a command component is set to true, clicking the button or link causes the page to be partially submitted.
partialTriggers: All rendered components support the partialTriggers attribute. Use this attribute to list the IDs of components whose change events are to trigger this component to be refreshed.

65) ADF View Criteria

Answer: View Object in ADF is representing a table database object supports Select query against the table. View Criteria is adding ‘Where clause’ to the View Objects but Unlike SQL query View Object support multiple View Criteria. The purpose of allowing multiple ADF view criteria is you can choose the ADF View Criteria you want on your pages.

For example, I have an employee table has a column ‘type; with value ‘manager’ and ‘director’. I want to display the list of managers in one page and list of directors on another page. For this, I simply create two View Criteria, One for employee and another for director and use employee VC for employee page and manager VC for manager page.

66) What are the different types of bindings in ADF?

Answer: ADF contains the following types of bindings: 

Method Bindings: This binding is used when you want to use custom methods to be executed.

Attribute Bindings: This is the binding to retrieve the value of a single view attribute in the iterator binding’s current view row. For eg; #{bindings.CustomerId.InputValue}

Tree Bindings: This is used for tables, tree-tables, and trees. It is used to expose rows of a  table in the iterator binding’s current range. Eg; All Customers-#{bindings.AllCustomers.labels.CustomerId}

Action Bindings: This binding type is used when buttons or command links are dropped on the user interface and require an action to be performed on them. We can use data control operations on them, for eg, Create, Delete, First, Last, Commit, Rollback, etc.

Iterator Binding: This binding is created by the application to access the ADF binding context. It contains a reference to the page bound data collection, helps access it and iterates over its data objects.

67) Memory Scope for ADF Managed Beans
Answer:
Application Scope:

The application scope lasts until the application stops. Values that you store in a managed bean with this scope is available to every session and every request that uses the application.
Avoid using this scope in a task flow because it persists beyond the life span of the task flow.

Session Scope:


The session scope begins when a user first accesses a page in the application and ends when the user's session times out due to inactivity, or when the application invalidates the session. Use this scope only for information that is relevant to the whole session, such as user or context information. Avoid using it to pass values from one task flow to another. Instead, use parameters to pass values between task flows. Using parameters gives your task flow a clear contract with other task flows that call it or are called by it. Another reason to avoid the use of session scope is that it may persist beyond the the life span of the task flow.

Page Flow Scope :
Choose this scope if you want the managed bean to be accessible across the activities within a task flow. A managed bean that has a pageFlow scope shares state with pages from the task flow that access it. A managed bean that has a pageFlow scope exists for the life span of the task flow.If another task flow's page references the managed bean, the managed bean creates a separate instance of this object and adds it to the pageFlow scope of its task flow.

View Scope :
Use this scope for managed bean objects that are needed only within the current view activity and not across view activities. It defines the scope for each viewport that ADF Controller manages, for example, a root browser window or an ADF region. The life span of this scope begins and ends when the current viewId of viewport changes. If you specify a view, the application retains managed bean objects used on a page as long as the user continues to interact with the page. These objects are automatically released when the user leaves the page.

Request Scope :
Use request scope when the managed bean does not need to persist longer than the current request.

Backing Bean Scope :
A backing bean is a convention to describe a managed bean that stores accessors for UI components and event handling code on a JSF page. It exists for the duration of a request and should not be used to maintain state.
Use this scope if it is possible that your task flow appears in two ADF regions on the same JSF page and you want to isolate each instance of ADF region.

68) Can we change DB connection for any particular AM?

Answer:
YES, follow steps to change DB connection:
1. Double click on AM.
2. GO to the configuration tab, click on configuration file bc4j.xml
3. Here we have attribute JDBCName under element AppModuleConfig, change the connection which is created for other DB.

69) What is the difference between setting an immediate=true on a button and immediate=true on a text field?

Answer:
When immediate is true on a button, the command’s action and ActionListeners, including the default ActionListener provided by the JavaServer Faces implementation will be executed during the Apply Request Values phase of the request processing lifecycle, rather than waiting until the Invoke Application phase.

In case of a text field, by default, values are converted and validated together in the Process Validators phase. However, if you need access to the value of a component during Apply Request Values – for example, if you need to get the value from an actionListener on an immediate commandButton – then setting this to “immediate” makes that possible.

70) How can one bounded task flow can call another?

Answer:
One task flow can call another bounded task flow using a task flow call activity or a URL.

71) Task Flow Activities:

Answer:
Method Call: Invokes a method, typically a method on a managed bean. A method call activity can be placed anywhere within an application’s control flow to invoke application logic based on control flow rules.
Parent Action: Allows a bounded task flow to generate outcomes that are passed to its parent view activity. 
Router: Evaluates an EL expression and returns an outcome based on the value of the expression. For example, a router in a credit check task flow might evaluate the return value from a previous method call and generate success, failure, or retry outcomes based on various cases. These outcomes can then be used to route control to other activities in the task flow. 
Save Point Restore: Restores a previous persistent save point, including application state and data, in an application supporting save for later functionality. 
Task Flow Call: Calls abounded task flow from an unbounded task flow or another bounded task flow.
Task Flow Return: Identifies when a bounded task flow completes and sends control flow back to the caller. (Available for bounded task flows only). 
View: Displays a JSF page or page fragment. Multiple view activities can represent the same page or same page fragment. 
Control Flow Case: Identifies how control passes from one activity to the next in the application. 
Wildcard Control Flow Rule: Represents a control flow case that can originate from any activities whose IDs match a wildcard expression.


72) What is the difference between Trinidad.config and Trinidad.skins?
Answer:
Trinidad.config file is created when you create a WebCenter Portal application. This is used to register the skin-family you are going to use for your entire application. Trinidad.skins are used when we use the skin as a jar file. This file provides a mapping between the skin id and the actual path where the skin exists.

73) JMS Integration with ADF:
Answer:
1. in the web logic console, we need to create JMS Server, JMS Queue.
2. In the application, we need to create MessageDrivenBean implements MessageListener mapping the same jndi name of JMS Queue. We need to override onMessage() method.

Whenever we recieve some message into the JMS queue, this onMessage() will be invoked with the Message as parameter.

74) Exception Handling :
Answer:
We need to extend DCErrorHandlerImpl class and override reportException() method. We need to register that class in the DataBindings.cpx file.
When any exception is thrown in the ADF application, it will come to this metChod.

75) Contextual Event in ADF:
Answer:
Contextual Event is way to communicate between two taskflows. Sometimes we have taskflow to open in a region and have to get some values from task flow.

Contextual Events have two parts : 

Publisher Event (Producer) : As button or any component that can raise event

Handler Event  (Customer) : That listines and process event published by the producer

76) SOAP Web service invocation from ADF:
Answer:
there are 2 options:

1. Web service data control
2. Web service proxy

Data control :

Right click on any project --> New --> Web Services --> Web service data control
We need to give wsdl url and next, next ....finish... It will create web service data control almost similar to our Application module data control
we can drag n drop the methods and objects on to the page.

Proxy :

Right click on View Controller --> New --> Web services --> Web services Proxy
We need to give wsdl url and next, next ...finis... It will create java classes to invoke the web service. We will generally use that logic to invoke in button action listener or in some managed bean methods



Best Coding Practices in Oracle ADF:

Answer:
ü  Configure resource bundle before creating business components
ü  Avoid code duplication, Use utility classes instead – ADFUtil, JSFUtil, etc
ü  Avoid using editable tables, Use forms to edit data of tables
ü  Avoid editable primary key attribute
ü  Close iterators after use
ü  Use ADF Logger instead of System.out.println
ü  Choose bean scope carefully, lots of problems occur due to the wrong bean scope
ü  Don’t use getDBTransaction().postChanges unless you have a commit operation in the same request
ü  Check for null values instead of using try/catch block everywhere
ü  Avoid circular dependency on the list of values
ü  Use createRowSetIterator() for view object programmatic iteration instead of using AllRowsInRange
ü  Always use readOnly view object for view-based or reference data, This helps in performance as it avoids EntityCache
ü  Write business logic in model level implementation classes as AMImpl/VOImpl and call those methods in bean using binding layer
ü  Implement bean serialization for applicationScope, sessionScope, pageFlowScope beans
ü  ADF Faces requires only one root component per fragment
ü  Ensure uniqueness of task flow name, managed bean name and application module name in the entire application
ü  Always check for null values while calculating transient attributes default values
ü  Don’t write bulky and the unnecessary code in accessors of components or attributes as accessors are called multiple times so it’ll affect performance
ü  Catch Jbo Exceptions while calling pl/SQL functions/procedure and show as a message on the page instead of showing ADF/DB generated messages
ü  To apply validation and autoSuggest like feature in search form uses custom search instead of af:query component
ü  Ensure that component bindings should be in a request scoped bean not greater than that
ü  Instead of using setWhereClause() use query-based bind variable to improve performance
ü  Use basic tuning in ViewObjects to fetch rows from DB to improve performance
ü  Don’t set immediate true for editable input components
ü  Don’t use cached application module reference in bean instead of caching, look for AM when required as it is a pooled resource that’s why it is never guaranteed that you will get the same AM instance over a period of time. You’ll end up getting lots of Null Pointer Exceptions
ü  Don’t use RowId as a primary key in entity object, To avoid this define the primary key in DB table itself
ü  Never use SELECT * FROM in viewObject instead specify required column names
ü  Avoid ViewObject expert mode for entity-based viewObject. To add where clause, order by clause use viewObject or view object based bind variable