ADF Mobile Design -> 10 Mobile Design Principals

  1. Know your end users. 
    Before designing, spend time getting to know the role of your end users and the specific needs that they will have while mobile. Understanding key characteristics of your users, their work environments, and the tasks that they perform will help ensure that your product has the right features and optimal user experience. We have created a set of mobile personas that are based on international ethnographic research for the following roles: sales representative, field service technician, manager, retail merchandiser, and Generation Y.
  2. Define the essential mobile tasks. 
    A mobile application must be able to stand alone and not depend on an understanding of a related desktop version. When assessing how to convert an existing desktop application into a mobile design, be aware that the key task for the desktop may be quite different from that of the mobile. We strongly encourage you to think through the mobile use case rather than relying on the desktop workflows. Do not hesitate to eliminate tasks that are not essential to the mobile requirements. Successful mobile applications are frequently simplified to primary tasks, such as searching for coworkers or managing task lists.
  3. Design contextually.
    Mobile applications are used in trains, warehouses, taxis, oil platforms, and more. Designs must work in the target work environment and maximize context awareness of the mobile device. A GPS-enabled device that maps sales representatives’ locations helps them arrive at their next appointments on time. A device that scans and displays information about an asset, such as details of the last service, helps a technician bring the right parts and make the appropriate repairs.
  4. Create a flattened navigation model.
    Users do not want to traverse deep structures to complete a task. Flatten the navigation model for quick access to key task flows. Once users navigate to begin their work, provide a clear understanding of where they are and how they can return to their starting point. Instead of having a user log in, access a section, find an object, and then perform a task, a flattened navigation model provides quick access to the mobile task immediately after login.
  5. Design for the two-minutes-to-get-it-done mobile work style. 
    Typically, mobile devices are used in short bursts, while personal computers are used for extended work sessions. Mobile users will not tolerate designs that require a lot of data entry or multistep flows because they need to get to work faster and complete their tasks more quickly. Tasks should be simple and quick to complete.
  6. Integrate analytics. 
    Analytics and business intelligence are not limited to the desktop. Mobile users need analytics that work for small screens. A regional sales manager might see a screen that highlights store locations with the biggest sales data from last quarter or last year. A color-coded grid of locations versus key metrics draws attention to good, moderate, and bad situations. The first step in determining which analytics will be useful is to understand the mobile use case and how to integrate analytics that help decision making. A needless insertion of analytics takes up valuable real estate and makes it harder for mobile workers to do their jobs.
  7. Simplify search requirements. 
    Search is an important part of mobile applications and must be quickly accessible. Because mobile data entry is more difficult, simplify search entry requirements to a single field when possible and place the field above related data. If a user is on an inventory screen within a handheld application and initiates a search for an item, all results should relate to inventory attributes. When multiple-field searches are required, load field values with default data that the user can change with choice lists and lists of values. Do not require the user to enter text in multiple fields.
  8. Embed collaboration. 
    Embed collaboration into workflows, and include triggers to call a person, connect to a social network, and text using SMS and IM. The proliferation of social networking within the work environment demonstrates the increased importance of keeping in touch with colleagues and affiliated professionals. Mobility extends this trend by keeping coworkers in contact more often and in more places.
  9. Progressively disclose information.
    Because screen real estate is precious on handheld devices, carefully consider the type and quantity of data that you display when designing the application. Information must be concisely summarized with basic overviews and limited actions. Details and additional actions should be available in drill-down pages. An example of progressive disclosure is used by mobile email programs that simplify functions in the overview interface and require a user to select an email address and only then provide functions for reply, delete, forward, and so on from the resulting details screen.
  10. Leverage the mobile platform. 
    Mobile applications can be built to run in the browser or as native applications installed on the device. Enterprise applications should leverage mobile capabilities that enable a user to tap a phone number to call or text, touch an address to map its location, and rotate the device for an alternate view. Native enterprise applications enable more integration than those applications run in the browser and provide the ability to transfer enterprise data to local built-in applications, such as calendars and contacts, so that users can view important business information without signing in. Understanding each platform and maximizing the appropriate mobile actions will ensure a productive and natural mobile experience.

How to create Entity Object for Oracle ADF Components Layer

How to create Entity Object for Oracle ADF Components Layer in Application

Lets look how we accutaly built Oracle ADF Components layer for our application. The first step is usually creating Entity Objects and this involves following steps.1) Mapping to database tables
2) Choosing specific attributes
3) Set attribute propertiesStart Oracle JDeveloper, Click on New Application and from Categories select Application and from Item select Fusion Web Application (ADF)

Enter Application Name and than click on Finish

Right Click on Model and choose New

From the Business Tire category select ADF Business Components and from items select Business Components from Tables

Create the Connection to the Oracle Database

Query the Database Schema and move the Entities from Available to Selected window. In my case I am moving Department and Employees Entities. Rename the Package model from model.eo (for ease to remember)

Create the Entities based Views and rename the package as shown and than click on Finish

We can define two types of attribute

a) Control Functionality and behaviour such as Mandatory fields, Default values of the fields and also set the database interaction properties etc.
b) UI Hints – default UI representation such as Label of the fields, Tooltip, Format mask and control types etc

Expand the model.eo package and open the Employees entity. Click on Attributes and select the hiredate field from Employees entity. Now we will set the following attributes on the hiredate field.

1) Setting the default date value using the Groovy Expression
2) Setting the Label, Tool Tip, Format Type and Format on hiredate field

Save the Project. Expand model.vo package, right click on AppModule and choose run.

Oracle ADF provides swing based interface to interact our View Object. Double Click on EmployeesView1 and than click on plus sign to create a record. You will see that the default value of the hiredate date filed, Label is also set as we did. Move the mouse cursor to the hiredate field, Tool Tip will also appear automatically.

Field Level Validation in Oracle ADF

Perform Field Level Validation in Oracle ADF

We can also define the field level validation at Entity Object Level. The purpose of validation is to validate data before sent to the database. Declarative validation involves following steps:-

1) Add validation
2) Define Validation
3) Set Error Message

In this post we will continue the previous post example and perform validation on Salary Field.

Open the employee entity from model.eo package. From attribute select Salary field, open the Validation Rule tab and click plus sign to Add the Validation.

Select the Compare as Rule Type. From the Rule Definition choose GreaterThan operator and compare with Literal Value. Enter Literal Value to 0.

To set the error message open Failure Handling tab. Choose Error as Validation Failure Severity. Enter the Error Message in Message Text box.

Finally run the AppModule from model.vo package. Open the EmployeeView1, enter -1 in Employee Salary Field and than leave the filed. You will prompt the same validation message as we defined above.

About Oracle ADF Business Components

Oracle ADF Business Components

Oracle ADF Business Components is part of the Oracle ADF framework that is responsible for simplifying the way that we build  Java EE based business services that interact with database it focus on delivering familiar development approach for developers who are comming from the 4 Generation Lanugage tools such as Oracle Forms, Powerbuilder or Visiual Basic and its provide very declarative approach to creating those business services and relational databases.
In funcianility Oracle ADF bussiness component is responsible for simplifing the way that we access the data. It also simplifies the way that we write business logic on top of this data. It uses SQL is the way to define the views of the data that we getting. Its separate actual data views from business logic and perform validation in our application. It is also easy to customize it.
ADF Business components consist of three layers
1) Entitiy Objects and Associations
2) View Objects and View Link
3) Application Module with View Object Instances
Entity Objects and Associations funcationality
1) Entity Objects
a. Maps to a row in a database table
b. Handles insert, update,delete operation
c. Define behaviours of attributes
d. Can contain validation and business logic
2) Associations
a. Define a relationship bnetween Entity Objects
b. Facilitate access to data in related entity objects
c. May be based on databse constraints
d. May be independent of databse constraints
e. Are used in defining validations and LOV
f. Consist of a Master, Detail entity
View Objects
1) Represent a query
2) Are used for joining, filtering, projecting, and sorting business data
3) Enable us to have a view of data that is specific to one par of our application
4) Can be constructed from a SQL statement, static values, or populated programmatically
5) Can also be based on any number of entity objects
Application Modules
1) Contain an active data model that the client uses to interact with view object instances
2) Control the connection to the database and keep track of all changes that affect data in the database
3) Provide remotely accessible methods to implement application module behavior
4) Are easily reused

How to create Filter or Criteria List of Values (LOV) in Oracle ADF

show you how to create LOV with View Criteria. Do the following steps:-

1) Create View Object
2) Add Bind Variables to Views
3) Create View Criteria
4) Finally Create LOV

This post the enhancement of previous post and in this post we will create LOV on Manager ID field. We are going to add two business rules on Manager ID LOV:-

1) Manager cannot manage themselves i.e ( EmployeeId <> CurrentEmployeeId)
2) Employee can be manage by other employees in the same department or in Executive Department which ID is 1. (DepartmentId = 1 OR (DepartmentId = CurrentDepartmentId))

Creating View Object

Right click on adf.demo.modle.quries package and select New View Object

Change name as EmpManagerLOV

Move Employee View from Available to Selected area and un-check the updatable option.

On Attribute page choose DepartmentId, EmployeeId, FirstName and LastName

On Query page choose Order by as FirstName and LastName

Adding Bind Variables to View

On EmpManagerLOV.xml go to Query tab page and in the Bind Variables section create two bind variables:-

1) CurrEmpID and its Type Number Required No
2) CurrDeptID and its Type Number Required No

After two Bind Variables your Bind Variable Section should look like

Creating View Criteria

In View Criteria click Add Button. Enter the Criteria Name as EmpManagerLOVCriteria click the Add Item button along with Group and choose the settings as shown in the slide to complete the 1st Rule required (EmployeeId <> CurrentEmployeeId)

To add 2nd Rule, Select the top-level node EmpManagerLOVCriteria and click Add Group button and select new group node and set the Conjunction as AND.

Click Add Item and set the expression as DepartmentId = 1. Select the AND Group node and click Add Item again. set all fields as shown in the slide

After adding Rules your View Criteria Section look like

Creating LOV

On the Attributes Tab of  EmpView.xml select ManagerId entity and create List of Value.

Add a List Data Source item, and select EmpManagerLOV, Change the Name to EmpManagerLOVAccessor and move it to the View Accessors area

Select the EmpManagerLOVAccessor and press Edit on the Top. Move the EmpManagerLOVCriteria to the Selected area. In the Bind Variables Section enter the values for both Variables as shown

Set LOV Configuration as shown

Go to UI Hints Screen and do the following settings

On Employee.jspx page delete ManagerId field Drag and Drop ManagerId from Data Control and choose List of Values as ADF LOV Choice List

Finally right click and Choose Run on Employee.jspx page, click Manager ID LOV item

Press Search link appearing in the LOV ADF will open a pop to display all values. You can filter your values

How to Create List of Values (LOV) in Oracle ADF

Create List of Values – LOV in Oracle ADF

In this post i will continue to enhance my previous post’s Employee Form and create my first List of Values (LOV) in Oracle ADF Form. Creation of LOV in ADF is as simple as in Oracle Forms. In this post i am going to create LOV for Department and Job entities. Do the following steps to create LOV in ADF.

1) Add Departments and Jobs Entities
2) Add View Objects for Departments and Jobs LOVs
3) Create LOVs

4) Finally Link LOVs to JSF Page
Right click on adf.demo.model.view in Model project and choose Re-factor than Rename the  adf.demo.model.view to adf.demo.mode.queries for good naming convention.
Adding Departments and Jobs Entities
Right clicking on adf.demo.model.entities package in Model project and choose New Entity Object to Add Departments Entity.
Enter Name as DeptLOV and Choose Schema object as DEPARTMENT
Choose All columns in attributes page and click Finish
Repeat the same step for Jobs entity
Adding View Objects for Departments and Jobs LOVs
Right click on adf.demo.model.queries package and Choose New View Object
Enter name as DeptLOV and Click Next
Select the DeptLOV entity and move to selected area. Uncheck the Updatable option also
Select all Attributes to Selected area
Choose Dept ID in Order by section by pressing EDIT button and Click Finish
Repeat same steps for Jobs LOV
Creating LOVs
Double click EmployeeVO in adf.demo.model.queries section.Select DepartmentId attribute in the attribute page and Click “+” green button at the bottom under List of Values section
Click the green + button with List Data Source. Select DeptLOV in Available Objects change the Name at the bottom to DeptLOVAcesssor and move it to View Accessors to Create LOV
Choose Dept in List Attribute Return Values will populate automatically
Go to UI Hints tab Leave the List type as Choice List . Move DeptName from Available to Selected Area. Choose Labeled Item(First of List)  at very bottom include No Selection..  and set it accordingly
Repeat Same Steps for JobId attribute
Your EmpView page should looks like this
Linking LOVs to JSF Page
Open employee.jspx page in View Controller Project. Delete JobsId and DepartmentId attribute by selection them in Structure Window
Refresh the DataControl page. Expand the Data Control, Select DepartmentsId attribute from EmpView and Drag and Drop it to FormLayout. Menu will appear select  ADF One Choice List from Single Selection
Repeat the same step for JobId and adjust entities accordingly on your AFD Form. Now Finally Right click and Choose Run. Your Page should looks like this on Runtime

How to create simple ADF Form using Oracle JDeveloper 11g

Create Simple ADF Form using Oracle JDeveloper 11g

In this post i will show you how to create simple ADF Form using Oracle JDeveloper 11g. I have create simple employee form based on employee table i.e. created in database. Using following steps i have create the form.
1) Create Application and Entity Objects
2) Create View Objects based on entities
3) Linking View Objects with Application Modules
4) Finally Create JSF Page
1) Oracle JDeveloper 11g
2) Employee Table in Oracle Database
Create Application and Entity Objects
 Open JDeveloper and chose default role.
Choose New Application from  Menu.
Enter Application Name MyFistADFApp Application Package adf.demo and Select Fusion Web Application (ADF) in Application Template.
Create Connection in Application Resource Section on the left pane. Right Click on Connections Select New Connection and Choose Database.
Create Database Connection Screen will open, enter connection name as DBCONN, enter Database username and password and Test connection it should appear Success
Click Right on Model Project choose NEW
select ADF Business Components and choose Business Components from Tables from Items Click OK as shown in the slide

By Default DBCONN Connection will appear Click OK
Choose the Employee table to selected area and rename the Package name to adf.demo.model.entities
On the Application Module Step rename Application Module as HIRSModule and package to click Finish
The above all steps will create the Employee Entity with Application Module in the Model Project
Creating View Object based on Employee Entities
Click Right and choose New on Model Project Choose View Object
Enter View Object Name EmpView change package name to adf.demo.model.view click Next
Move the Employee entity to the selected area and check the updatable option
Move all Fields to the selected area
Click Finish Now Model Project is ready to create ADF Form
Linking View Object with Application Module service
In the Model Project Section Open HIRSModule.xml under and go to Data Model Page
Select EmpView on the Available pane and move it to Data model side under HIRSModule and Save all
Creating JSF page
 Right click adfc-config under Page Flow directory in ViewController Project and select Open
Drag & Drop View Activity from component palette named it employee
Double click the employee view activity select Blank Page click OK. Jdeveloper will open one default layout.
Select the EmpView from the Data Controls section
Drag and drop it to employee.jspx page and Choose ADF > ADF Form from the Menu
Select all fields as shown in the slide and check Include Submit Button and Navigation Controls
Your form should appear like this
Click in the structure pane the af:document and set the Title property on the right side the to Employee
Save all and Right click to Choose Run on employee page. That’s all Output will be appear on browser.

How do we start learning Oracle ADF and JDeveloper 11g

How Do I Start Learning Oracle ADF and JDeveloper 11g

First step –
Learn the Java language (at least the syntax) – while you can do a lot in JDeveloper without coding any Java lines – at one point or another you will need to code – so start by picking up your favorite “Java for dummies in 7 days with no previous knowledge” type of book and learn the basics of the language.
Don’t have money to spend on an actual book try these two resources:

Thinking in Java – a good free online book
Sun’s online tutorials

While you are learning the basics of the language – you can use JDeveloper as your coding/running/debugging environment it can also help you with code template code complete and syntax error highlighting.
To understand how to do this use the Introduction to the IDE Tutorial

ok, so you got the basics of the language down and you know how to do a loop and define new variables. Next, you probably want to start learning ADF as a way to simplify your overall development.
I would suggest that you start with the Reviewer’s Guide.
Start by reading the data sheets to understand what the framework does, and watch a demo to understand what we are aiming to do with ADF

Next start with the tutorial (11.1.2 version here)- which will take you about 2-3 hours to complete – and will give you an impression of the development process and if you actually read the explanation in it and not just follow the step-by-step instructions you will also understand what you are doing and not just how you are doing things.
You can deepen your knowledge with two other tutorials:
An ADF Faces focused tutorial (11.1.2 version here), and one about ADF TaskFlows (11.1.2 version here).
There are many other tutorials that you can follow here (11.1.2 version here).

Here it is important to note that some people prefer to go to instructor lead type training. We have those as well.
This page has the Java/ADF course list:

You’ll see a basic Java course to help you learn the language, and another course which is called “Oracle Fusion Middleware 11g: Build Applications with ADF I” – this is the ADF basics course.

Now comes what I regard as the “must do step” whether you took the course or chose the self learning trail – read through the Fusion Developer Guide (11.1.2 version). After you played a bit with JDeveloper and ADF, this book will give you the inside scoop on what ADF does and how it does it.
It’s a big book but it is worth reading it before you start doing any serious development – having the knowledge before you start to code will save you a lot of hours later on.
Note that there are additional developer guides (11.1.2 versions) that focus on the ADF Faces, Mobile and Desktop parts.

Another option for good books that will teach you ADF are:

Quick Start Guide to Oracle Fusion Development and the
Oracle JDeveloper 11g Handbook.
Once you are done with these books, you might want to go to the next level of knowledge which is covered in Oracle Press’s “Oracle Fusion Developer Guide” book.

At this stage you should have quite a good foundation that will let you start developing your application. Once you do serious development you are sure to run into questions that weren’t answered in your previous reading, this is where the JDeveloper and ADF discussion forum comes into the picture as the source for the community knowledge.

Note that you can also tap into the community knowledge by searching through the internet. A lot of JDeveloper and ADF developers maintain blogs with tips – we try to collect those entries in this searchable ADF/JDeveloper blog repository.

Some of those experts also created the Oracle ADF Enterprise Methodology Group – which you should join – for some advanced discussion of concepts and best practices.

Add to these the annual Oracle Develop conference which runs as part of Oracle Open World, and the other technical conferences such as ODTUG and IOUG and you have your learning experience complete.

Now it is time for you to start sharing the knowledge you have gathered and help the newbies – start a blog, do a presentation in a conference, post answers on the OTN forum, or just add entries to the Oracle Wiki and help build the JDeveloper community.