Defining ADF Business Components Packages

Tweet about this on TwitterShare on Facebook0Share on LinkedIn9Share on Google+0

When we have to create ADF-BC in a real project, we don’t want that all files stay together in the same directory. One of best practises according to official guidelines, is separate these files by type. The good news is that JDeveloper allows you to configure the ADF-BC default packages and apply this to any new Model projects!

Remember to configure the ADF-BC packages before create the files, this way when you create the ADF-BC, the files will be put in the right place.

I will use br.com.waslleysouza as default package name for the application workspace. In extension to the default package name for the application workspace, the default package prefix for ADF BC model projects should include “model.adfbc”.

ADF-BC projects should make use of the following package guidelines:

Object Package Example
Model.jpx Resides in base package for project br.com.waslleysouza.model. adfbc.Model.jpx
Framework extensions .base br.com.waslleysouza.model.adfbc. base.HrEntityImpl.java
Application Modules .services br.com.waslleysouza.model.adfbc. services.AppModule
Diagrams .diagrams br.com.waslleysouza.model.adfbc. diagrams.AdfBcDiagram
Domains .domains br.com.waslleysouza.model.adfbc. domains.EmailDomain
Entity Objects .entities br.com.waslleysouza.model.adfbc. entities.Employees
Entity associations .entities.associations br.com.waslleysouza.model.adfbc. entities.associations.EmpDeptFkAssoc
Property sets .properties br.com.waslleysouza.model.adfbc. properties.ReadOnlyPropertySet
Validation rules .validations br.com.waslleysouza.model.adfbc. validations.EmailValidationRuleImpl.java
View Objects .views br.com.waslleysouza.model.adfbc. views.EmployeesView
View Links .views.links br.com.waslleysouza.model.adfbc. views.links.EmpDeptFkLink

To configure the ADF-BC default packages inside JDeveloper, navigate to Tools | Preferences | Business Components | Packages. Configure the packages and click on OK.

defining-adf-business-components-packages1

Create a Business Component to test.

defining-adf-business-components-packages2

defining-adf-business-components-packages3

defining-adf-business-components-packages4

defining-adf-business-components-packages5

defining-adf-business-components-packages6

Resource:
Oracle ADF Architecture Square – ADF Naming and Project Layout Guidelines v2.00: http://www.oracle.com/technetwork/developer-tools/adf/learnmore/adf-code-guidelines-v2-00-2096456.pdf

Tweet about this on TwitterShare on Facebook0Share on LinkedIn9Share on Google+0

Author: Waslley Souza

Consultor Oracle com foco em tecnologias Oracle Fusion Middleware e SOA. Certificado Oracle WebCenter Portal, Oracle ADF e Java.

Leave a Reply

Your email address will not be published. Required fields are marked *