ADF Business components: creating a basic Fusion webapp (FMW)

After explore diferent ways, trying to cover the business layer with Spring/Eclipse and after that with EJB 3. If you want to develop with Oracle ADF framework, our best choice is ADFbc (business components). The reason, simple, it is better integrated with top layers (data controls and view) than EJB, this is the reference solution of the company (Oracle).

Read the rest of this entry »

ADF View: Master/Detail editable with LOVs, and Excel exporting option

Based on an earlier post where show how to make a master detail page, today we will add a box where we will be able to modify the aployee data.

It is useful too to know how to make List of Values (combos) with this technology, and see an example of how to export the detail table to Excel.

Example application in HRApplication.zip.

Read the rest of this entry »

Browsing Form, Master/Detail

In administrative environments we find with the requirement of a master/detail form. For example to browse the employee in a certain department, or the clients who bought each one of our products.

Based on the Human Resources Oracle application we will make a master/detail to navigate over the company departments.

Example application in HRApplication.zip.

Read the rest of this entry »

Design: ADF Templates and skins

Usually, in all our web projects, we want all the pages have a coherent style in ehole site, to improve the usuability. The usual strategy is fix the header (with the login for example), a menu in the top or both sides, and a footer.

  • And all this parts are included in all our pages with no repeat the code.
  • Every change in the template will show in whole site.
  • And, if is possible, our WYSIWYG editor shows me the design (it is not possible with Eclipse for the moment).

Read the rest of this entry »

JDeveloper Data Controls

Data Controls are objects which acts as an intermediate layer between the view layer and business layer on JDeveloper Architecture. These takes a consistent way to manipulate data collection to show at the view in programming time. They maps the model, and business services, binding, and managing the data transactionality, keeping the view coherent.

Read the rest of this entry »

EJB 3.0: Business Layer

In this phase we will see how JDeveloper solves the business layer. EJB 3.0 is the standard to solve it. This is about to construct the business process, which will be called by the view, web services, …

We will base on a past post, where we 聽created the persistence layer for our little application.

Read the rest of this entry »

JPA: persistence model

In this post we will create a persistence model for our little employee management application. Based on an earlier post where we created a basic JDeveloper Web application.

Over the project with contextual menu, New > EJB > Entities From Tables. We will use the EJB 3.0 technology, annotating entity beans as JPA 2.0:

Creating persistence model

Select Departaments and Employees tables.

As seen in an earlier post, we can obtain the ER diagram from a made data base. I created it in the package lebrijo.diagrams:

Entity-RelationShip diagram

We can create a New > EJB Diagram, and drag-drop the created entities, we have the whole draw:

EJB diagram

I refactored the employees attribute by manager, because it defines the relationship better.

Refactoring manage relation

This is refreshed automatically to the EJB diagram (theory, in practice I have to drag the entities again).

As last exercise, we can create the ‘find by name’ query, in the query annotation at Employees entity:

@Entity
@NamedQueries({
@NamedQuery(name = "Employees.findAll", query = "select o from Employees o")
,
@NamedQuery(name = "Employees.findByName", query = "select o from Employees o where o.firstName like :p_name")
})

Weblogic / JDeveloper: Creating the base application

Open JDeveloper with “Default role” option, to activare al environment features. We are interested in JEE and database development features.

File > New > Java EE Web Application, then we are creating the new application estructure:

Creating app

Put the name “HRApplication”, and it creates two projects on the app:

  • ViewController: contains the view of our application, which corresponds with ADF technology based on JSF standard.
  • Model: contains EJB session beand and JPA entities.

To create a database connection go to the “Database Navigator” tab, and with right buton> New, introduce the connection configuration:

Creating db connection

Drag and drop the connection to our application:

Adding HR connection to our application

Then we are ready to start modeling and programming.

JDeveloper Architecture with Weblogic

Seems obvious that the best tool to develop Weblogic/OracleDB is JDeveloper. But for me, until now, it was not so obvious, because Eclipse is my favorite IDE, it is the standard for Java development (Jboss, Spring, Android,…).

If your architecture is Oracle/Weblogic, have no fear to change, and your obsesion is to increase your productivity, then, your tool is JDeveloper. I am gonna write some posts trying to demonstrate this point. But if you want an advancement, you can see this video, you will see howcan be really ssimple make RIA applications over complex enterprise environments.

Read the rest of this entry »

Data Model Design with JDeveloper

I consider JDeveloper as a great data base design tool for some reasons:

  • It can navigates through the Oracle databases
  • It has a very good ER editor.
  • It can change the data base schema when you modify the diagram

We can download from Oracle’s web the last JDeveloper version for our operating system. Installing is very easy, you just must have installed the JDK.

Read the rest of this entry »