Summary: Describes the characteristics and structure of the ADF and describes the process of developing the Java EE application using the ADF.
Keywords: ADF ORACLE java EE MVC
Introduction to the ADF
The ADF (Application Development framework) is a specially developed solution for Oracle Company to simplify the complexity of Java program development, and the ADF simplifies the development of Java EE by reducing the amount of code that implements design patterns and application frameworks. Its advantages are mainly embodied in the following four aspects:
(1) Development environment: Most of the Java EE Framework is not equipped with the development tools, Oracle for the ADF provides the JDeveloper development tool, it and the ADF to achieve a perfect combination, facilitate the development of the program.
(2) Platform independence: The ADF can run on any application server that complies with the Java EE standard.
(3) Technology options: For different layers of the application, developers can use their own expertise to develop.
(4) End-to-end solution: The ADF not only focuses on one layer of the application, but provides a complete solution for each layer of the application.
Architecture for Oracle ADF
The architecture of the Oracle ADF is based on the MVC design pattern, and its architecture is shown in Figure 1. As we can see from Figure 1, the ADF divides the application into four tiers, and here we introduce each:
1) Business Service layer
The Business Service layer consists of three small layers (see Figure 1), the persistence layer (persistent Business Objects), the data Access layer (database access), and the interface layer (ADF application Module). These three layers are established in the order that the entity object (Entity object) of the persistence layer is established first, then the View object (ViewObject) of the data access layer is established, and the interface layer is finally established. The entity objects that establish the persistence layer are mainly related to the database table or synonym object, and the View object (ViewObject) of the data access layer is established based on entity object, which is mainly for accessing the database, and the interface layer is the whole business Service Layer and model layer interface, the view object established in the data access layer needs to be registered into the interface layer so that it can be accessed in the model layer.
2) Model Layer
The layer consists of two parts (see Figure 1), namely, the ADF bindings and the ADF DataControl, where the ADF bindings is a binding technique provided by the ADF, which refers to the view object that we have registered in the interface layer ( ViewObject). This layer in the actual development of the basic need not to do too much work developers.
3) Controller Layer
The ADF extends the Apache Foundation's struts framework in the controller layer, providing struts with a page-flow diagram to simplify application development. Developers can simply drag the Struts component into this diagram, which automatically synchronizes updates to the Struts-config.xml file, where our most common use is the DataPage component, which functions primarily to create a page and Automatically create a dataforwardaction for it, if we have some custom methods, you can write an action and then overwrite dataforwardaction.