MSKCC ADF 11g Application & Project Structure

Oracle offers several patterns for 11g ADF application/project structure, this information has been well documented by Chris Muir and you can see his presentation here.  Together working with our developers on several prototypes, we have determined the ideal path for us to start 11g development by a gradual transition from a 2 Application setup (Stage 2) to a multiple application stage (pillar architecture). This intermediate step will grant us time to become familiar with ADF 11g and develop internal best practices.

I have separated our documentation into 3 posts listed below:

Part 1

Part 2 – This is the pattern we will be using formal development.

Part 3

Supporting tools we are using:

  • SVN
  • Hudson/Glassfish
  • Internal ALM

ADF Version & Key Technologies:

Advertisements
Posted in Uncategorized | Leave a comment

MSKCC ADF Project Structure Part 3

Stage 3 – Multiple application “pillar” architecture for advance development. We plan on transitioning to this stage in the future once entire team becomes familiar with ADF 11g.

Based on “Pillar” Architecture

Pillar

Source: Angels in the ADF Architecture

Actual components:

viewresources.jar

  • archive for custom ADF META-INF resources.
  • icons
  • javascripts

CommonApp

Architectural Projects (4):

  • CommonModel -Architectural, framework extensions, and cross modules BC components.
  • CommonViewController-Architectural e.g. framework extensions, ui/taskflow templates.
  • CommonDeclarativeComponent -Declarative components only.
  • Common-Tier independent components, e.g. Utils, Constants, Resource Bundles.

SubsystemApp (1-*)

  • Model -Module specific ADF BCs
  • ViewController -Module specific ADF Faces.

Pros:

  • Size of project files/folders are smaller and easier to work with.
  • Package and deploy modules independently.
  • Flexible and can scale to facilitate high level of reuse.
  • Can utilize“weblogic shared library” deployment benefits.

Cons:

  • Complex dependency management if modules are related and require reuse.
  • Integration and deployment steps are increased, i.e. applications need to be deployed individually as adf libraries.
  • Additional configuration for each application, i.e. AM Pooling parameters, Dynamic JDBC, web.xml, framework extension in project  properties.
  • Harder to adopt if new to ADF.

Stage 3 application dependency

CommonApp dependency

Project Dependency Dependent on Build/deploy type  
viewresources.jar

0

jar (META-INF/adf)
MVCShare

0

class output
CommonModel

1

MVCShare adflib
DeclarativeComponent

2

MVCShare, viewresources.jar adflib
CommonViewController

3

CommonModel, DeclarativeComponent,viewresources.jar adflib

SubsystemApp dependency

Project Dependency Dependent on Build/deploy type  
Model

1

CommonModel class output
ViewController

4

Model, CommonViewController, DeclarativeComponent,viewresources.jar ear
Posted in Uncategorized | Leave a comment

MSKCC ADF Project Structure Part 2

Stage 2 – Two Applications for our initial 11g ADF development. This stage is an intermediate step before Pillar Architecture stage. We will be building our ADF 11g application based on the following structure.

General structure (thanks to Chris Muir for the template!):

stage2

Actual components:

viewresources.jar

  • archive for custom ADF META-INF resources.
  • icons
  • javascripts

CommonApp

Architectural Projects (4):

  • CommonModel -Architectural, framework extensions and cross modules BC components.
  • CommonViewController-Architectural e.g. framework extensions, ui/taskflow templates.
  • CommonDeclarativeComponent -Declarative components only.
  • Common-Tier independent components, e.g. Utils, Constants, Resource Bundles.

MSKCCApps

Module Projects (2):

  • Model – Module specific ADF BCs separated by package.
  • ViewController- Module specific ADF Faces separated by package.

Pros:

  • Team can focus on code instead of configuration.
  • Code can be reused in future pillar Architecture stage.

Cons:

  • Cannot sustain for long period as it could potentially turn into a “Colossal App”.
  • Will have to refactor/rebuild some code when transition into pillar Architecture stage.

Stage 2 application dependency: 

CommonApp dependency

Project Dependency Dependent on Build/deploy type  
viewresources.jar

0

jar (META-INF/adf)
MVCShare

0

class output
CommonModel

1

MVCShare adflib
DeclarativeComponent

2

MVCShare, viewresources.jar adflib
CommonViewController

3

CommonModel, DeclarativeComponent,viewresources.jar adflib

MSKCCApps dependency

Project Dependency Dependent on Build/deploy type  
Model

1

CommonModel class output
ViewController

4

Model, CommonViewController, DeclarativeComponent,viewresources.jar ear

Stage 2 package & directory structure:

commonstructure

MSKCCApps

Posted in Uncategorized | Leave a comment

MSKCC ADF Project Structure Part 1

Stage 1- Single Application for beginner skilled team. This was a similar pattern we used for our ADF 10g application minus the 11g specific components.

Based on “Monster” aka “Colossal” structure:

monster

Source: Angels in the ADF Architecture

Actual components:
viewresources.jar (See Frank Nimphius’s article on sharing images)
• archive for custom ADF META-INF resources.
• icons
• javascripts

MSKCCApps
Architectural Projects (4):
• CommonModel -Architectural, framework extensions, and cross modules BC components
• CommonViewController -e.g. framework extensions, ui/taskflow templates
• DeclarativeComponent -Declarative components only
• MVCShare-Tier independent components, e.g. Utils, Constants, Resource Bundles
Module Projects (2):
• SubsystemModel -Module specific ADF BCs
• SubsystemViewController – Module specific ADF Faces.

Pros:
• Project dependency is simple.
• Reuse can be easily managed.
• Integration & deployment methods are identical to our current procedure.
• Development & Integration familiarity as it is easy to learn.
• Configuration is defined once, i.e. AM Pooling parameters, Dynamic JDBC.

Cons:
• Build/deploy is an all or nothing action.
• Many files & folders within Model/ViewController project.
• Large memory footprint with single deployment file.
• No facility for “weblogic shared library” option.
• Can only be deployed as a whole.
• It will turn into a “Colossal App”.

MSKCCApps dependency

Project Dependency Dependent on Project build/deploy type
viewresources.jar

0

jar file (META-INF/adf)
MVCShare

1

viewresources.jar class output
CommonModel

1

MVCShare class output
SubsystemModel

1

CommonModel class output
DeclarativeComponent

2

MVCShare, viewresources.jar adflib
CommonViewController

2

CommonModel, DeclarativeComponent class output
SubsystemViewController

4

CommonModel, ModulesModel,

CommonViewController, DeclarativeComponent

ear
Posted in Uncategorized | Leave a comment

Solution: ADF Faces & BC, oracle.mds.core.MetadataNotFoundException: MDS-00013: no metadata found for metadata object

refactor

Cliffs: If you encounter MDS-00013 exception referring to a .jpx file after refactoring an ADF BC project, check for references within your projects that has an invalid reference.

Complex refactoring can be a daunting task with ADF! A tough lesson learned when I attempted to refactor a package structure for a set of ADF BC files (Vos,Eos,AMs). After which I encountered the following exception upon running my jsf pages:

oracle.mds.core.MetadataNotFoundException: MDS-00013: no metadata found for metadata object "/org/mskcc/team/common/model/Model.jpx"
at oracle.mds.core.MetadataObject.getBaseMO(MetadataObject.java:1285)
at oracle.mds.core.MDSSession.getBaseMO(MDSSession.java:3210)
at oracle.mds.core.MDSSession.getMetadataObject(MDSSession.java:1220)
at oracle.mds.core.MDSSession.getMetadataObject(MDSSession.java:1166)
at oracle.jbo.mom.MOMParserMDS.parse(MOMParserMDS.java:193)
...

Since there is no mechanism within JDeveloper (11.1.2.4) that I know of to refactor the Model.jpx file, I had to move it manually into a new directory structure, i.e. from /org/mskcc/team/common/model/Model.jpx to /org/mskcc/common/model/Model.jpx. The problem was that there are other files which reference this .jpx file, one of which turns out to be one of many bc4j.xcfg files. Closer inspection of the generated code reveals the cause of the error:

<AppModuleConfig name="CommonAppModuleLocal" … jbo.project="org.mskcc.team.common.model.Model” …>

Which can be easily fixed by replacing the jbo.project attribute with the right value.

Another tip is to use the “Find in files” dialog to search for text within files.

find

review the results and open the code to check for invalid references.

findresults

My JDeveloper version: 11.1.2.4

Posted in Uncategorized | 2 Comments

Solution: How to setup standalone Weblogic 11g (10.3.5) with ADF Runtime 11g (11.1.2.4)

While attempting to setup a standalone environment for ADF 11g, I found the easiest way to quickly get one running was to use the JDeveloper installer to add the ADF Runtime libraries into a wls directory.

This was the exact steps documented by Rohit Barthwal over at
http://adfandjdeveloper.blogspot.in/2012/11/installation-of-adf-runtime-environment.html.

Another great tool I found useful after the domain setup was to verify the ADF runtime using an app that Jan Vervecken created
http://www.consideringred.com/files/oracle/2012/ADFLibrariesVersionsApp-v0.01.zip

Timo Hahn has a useful table of ADF Runtime/WLS versions and what steps are required to properly setup a standalone version of wls.
http://tompeez.wordpress.com/2011/09/14/jdeveloper-versions-vs-weblogic-server-versions/

Here is a quick video I made on how to setup weblogic 11g with ADF runtime.

Posted in Uncategorized | 1 Comment

JDeveloper jobs statistics 2013 Q2

I will try to publish this info on a quarterly basis. indeed might be a bit off, I often find many repeats by different agencies. If you have suggestions for other sites to keep track of, let me know.

indeed

monster

dice

linkedin

Edit:
Data points can be found:
https://docs.google.com/spreadsheet/ccc?key=0AlGbDLPprBPCdDc0WFp6RTlxandNckgwV09KUE9ZZXc&usp=sharing

Posted in Uncategorized | 7 Comments