Thursday, September 6, 2012

Adding MP 4 ADF-BC-SDO track

Intro

In order to add a new track on minuteproject we have to understand the target architecture, the target architecture artifacts and the link between them.
This article focuses on what contains ADF Faces project for manipulating (CRUD) RDBMS contains, and how are ADF Faces artifacts reference each other.
The goal is to provide a MP 4 ADF roadmap: to have an ADF application very quickly based on reverse-engineering facilities of minuteproject using some navigation defaulting.
On top of this a SDO stack can also be generated.
This is a lean process so, comments are welcomed!

 

Context

I am a ADF newbie so point discussed here might changed.
I start from what is generated by JDeveloper and follow the tutorials to create an ADF web app.

 

ADF Model Artifact Overview

 When create a webapp 2 ADF projects are created: Model and ViewControler.
This part focuses on the model artifacts.
The following artifacts are placed under the technical package 'model'.
The overview help defining the minuteproject artifact metadata.

AppModule.xml

It catalogs the views and view links usage.
One Artifact per model, and has a fix name.

Entity.xml

Holds the description of the database entity, mapping information, keys with validation, accessorAttributes. Can be considered to some extends as Domain Objects.
It is per DB entity, it does not depend of other xml artifacts.
Can sometimes reference Impl.java that gives custom implementation.

View-name.xml

Correspond to a access (select) of some Domain Object, contains view attributes.
It depends on .xml, it is referenced by AppModule.xml
Multiple view can exist for an entity. So the question is how to deduce the name of the view.
The view can be deduced:
  • a default one: with all selection
  • a reference one: based on the semantic reference of the entity
  • search ones: based on the fact that a field is searchable (entity enrichment in MP).

 Assoc.xml

 Define a relationship between entity, master part, cardinality...
Is dependent on the .xml
One per relationship

View-link.xml

 Define the view of the Assoc.xml. 
One per Assoc.xml file.
Referenced in AppModule.xml

Bundles artifacts for views 

View can have bundles for internationalisation

Other artifacts

Model.jpx
ModelBundle.properties


ViewController artifacts overview


Todo

SDO artifacts overview

At the view Level

View-nameSDOImpl.java

Linked to the view-name.xml

View-nameSDO.java

Linked to the view-name.xml

View-nameSDO.xsd

Linked to the view-name.xml


Service interface

At the application level

AppModuleServiceImpl.java

Java class
Stateless webservice done with EJB and Oracle annotations

AppModuleService.java

Java interface
JAX-WS annotation
Defines methods of WS

AppModuleService.wsdl

Wsdl containing messages, portType, binding, services
Importing static schema as well as AppModuleService.xsd

AppModuleService.xsd

xsd that import static oracle xsd as well as view-nameSDO.xsd
defines types used in AppModuleService.wsdl

ADF artifacts

Todo

 

References

http://docs.oracle.com/cd/E18941_01/tutorials/toc.htm

http://www.oracle.com/technetwork/developer-tools/adf/documentation/adf-faces-rc-demo-083799.html

http://www.oracle.com/technetwork/developer-tools/jdev/index-095536.html

http://go2kavinkumar.wordpress.com/2011/08/28/using-viewcriteria-in-find-operation-of-adf-bc-service/