Defining ADF Business Components Packages

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:

ObjectPackageExample
Model.jpxResides in base package for projectbr.com.waslleysouza.model. adfbc.Model.jpx
Framework extensions.basebr.com.waslleysouza.model.adfbc. base.HrEntityImpl.java
Application Modules.servicesbr.com.waslleysouza.model.adfbc. services.AppModule
Diagrams.diagramsbr.com.waslleysouza.model.adfbc. diagrams.AdfBcDiagram
Domains.domainsbr.com.waslleysouza.model.adfbc. domains.EmailDomain
Entity Objects.entitiesbr.com.waslleysouza.model.adfbc. entities.Employees
Entity associations.entities.associationsbr.com.waslleysouza.model.adfbc. entities.associations.EmpDeptFkAssoc
Property sets.propertiesbr.com.waslleysouza.model.adfbc. properties.ReadOnlyPropertySet
Validation rules.validationsbr.com.waslleysouza.model.adfbc. validations.EmailValidationRuleImpl.java
View Objects.viewsbr.com.waslleysouza.model.adfbc. views.EmployeesView
View Links.views.linksbr.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

Waslley Souza

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 *