ADF is Oracle framework to create application in RAD way via JDeveloper IDE.
Minuteproject 4 ADF track provides a way to generate ADF compatible artifacts and application without using JDeveloper but still JDeveloper friendly
(Generated workspace and project can be open by JDeveloper).



Sample

For Hungry minds that what to quickly test, the sample petshop for ADF-FACES is available at
https://code.google.com/p/minuteproject/downloads/detail?name=petshop-ADF-FACES.zip

Generated Artifacts

ADF-FACES tracks runs on top of the bsla (basic spring layer architecture), the artifacts mentioned below only refers to ADF-FACES only.
  • Command line and ant build/deploy scripts
  • Menu configuration and navigation
  • CRUD pageflow for each DB entities
    • jspx for details/edit/create
      • associated pagedef
    • jspx for search/filter/sort and paginated list
    • Backing beans
    • taskflow
  • Data Bindings configuration
  • Data Controls configuration
  • Data Control class
  • Front end VO beans and beans as xml
  • jws workspace
  • jpr project

  • Integration with minuteproject track bsla (spring/JPA2/hibernate/DAO and service) at the backing bean and at DataControl level.

Architecture overview

adf-faces-mp-architecture.jpg

Dependencies

Tools

Ant
Maven

Build scripts dependencies

MP_HOME
JDEV_HOME (for using ojdeploy and associated jar)
WLS_HOME
WEBLOGIC_HOME

Build dependencies

mp-bsla-x.y.z.jar
mp-adf track for common classes and template (site, pagination)

Prerequisits

Server

Install

Install Weblogic 10.3.x with ADF
WL_HOME is the Weblogic home directory
JPA2 patch installed if necessary (https://forums.oracle.com/forums/thread.jspa?threadID=1093616)
For short alter setDomainEnv.sh add the following line after 'call "%WL_HOME%\common\bin\commEnv.cmd"'
set PRE_CLASSPATH=%BEA_HOME%\modules\javax.persistence_1.0.0.0_2-0-0.jar;%BEA_HOME%\modules\com.oracle.jpa2support_1.0.0.0_2-0.jar

Config

Create a ADF-domain. In this sample it runs on server 'localhost' port '7201'.

Generate Sample

in <MP_HOME>/demo/config
run model-generation mp-config-ADF.xml

Customisation

Adapt Weblogic-JDeveloper properties in mp-config-ADF.xml
<!-- build properties -->
<property name="WEBLOGIC_HOME" value="D:/SOFT/SERVER/ORACLE/WLS/10.3.5.0-jdev-11.1.1.6.0"></property>
<property name="WLS_HOME" value="D:/SOFT/SERVER/ORACLE/WLS/10.3.5.0-jdev-11.1.1.6.0/wlserver_10.3"></property>
<property name="JDEV_HOME" value="D:/SOFT/SERVER/ORACLE/WLS/10.3.5.0-jdev-11.1.1.6.0/jdeveloper"></property>
 
<!-- deployment properties -->
<property name="wls-username" value="weblogic"></property>
<property name="wls-password" value="weblogic01"></property>
<property name="wls-hostname" value="localhost"></property>
<property name="wls-port" value="7201"></property>
<property name="wls-deploy-target" value="AdminServer"></property>
The generation of the sample goes towards "c:/dev/output/ADF/MP4-petshop"
<targets outputdir-root="c:/dev/output/ADF/MP4-petshop" >

Run Sample

Go to where the ADF Faces code has been generated: c:/dev/output/ADF/MP4-petshop/ADF-FACES
Open a command line and run: Petshop-deliver-first-setup.bat

This command line:
  • set MP_HOME=<distribution of Minuteproject>
  • runs maven to package the backend (BTW you get out of the box a JSF primefaces version)
  • copies generic class and css bundled with minuteproject
  • compile and package ViewController.war
  • package application ear
  • deploys on weblogic ADF server
  • opens the browser at http://localhost:7201/petshop-FE/faces/homePage


Screenshots


Paginated list with filtering and search criteria


adf-list-mygooditem.png

View details


adf-item-details.png

Edit details


adf-item-edit.png

Create entity


adf-item-create.png

Validation

adf-item-edit-validation.png

Statement driven development


Query

Ad-hoc query to retrieve some address details based on a city name
                     <query name="get addresses by criteria" id="c">
                         <query-body><value>
<![CDATA[select * from address where lcase(city) like ?]]>
                            </value></query-body>
                         <query-params>
                             <query-param name="city" type="STRING" sample="'S'" convert="lowercase,append%" default="%"/>
                         </query-params>
                     </query>
adf-sdd-get-address-by-criteria.png

Graph

Displaying the city by number of associated address

select top ? city, count(*) as nb from address group by city order by count(*) desc
                     <query name="get address abstract" id="dashAddress" type="dashboard" category="bar-chart">
                         <query-body> <!-- dimensions column first -->
                         <value>
<![CDATA[select top ? city, count(*) as nb from address group by city order by count(*) desc]]>
                            </value>
                         </query-body>
                         <query-params>
                             <query-param name="top city" is-mandatory="false" type="INT" sample="37" default="10"></query-param>
                         </query-params>
                     </query>
adf-sdd-graph.png