Runtime Architecture of an Application Based on MYOB Acumatica Framework

In this topic, you can review the architecture of an application created based on MYOB Acumatica Framework, such as MYOB Acumatica, customizations of MYOB Acumatica, and applications based purely on MYOB Acumatica Framework.

An application written with MYOB Acumatica Framework has n-tier architecture with a clear separation of the presentation, business, and data access layers, as shown in the following diagram. You can find details about each layer in the sections below.


Data Access Layer

The data access layer of an application written using MYOB Acumatica Framework is implemented as a set of data access classes (DACs) that wrap data from database tables or data received through other external sources (such as Amazon Web Services).

The instances of data access classes are maintained by the business logic layer. Between requests, these instances are stored in the session. On a standalone MYOB Acumatica server, session data is stored in the server memory. In a cluster of application servers, session data is serialized and stored in a high-performance remote server through a custom optimized serialization mechanism.

For details about data storage in session, see Session. For details on working with the data access layer, see Accessing Data.

Business Logic Layer

The business logic is implemented though the business logic controller (also called graph). Graphs are classes that you derive from the special API class (PXGraph) and that are tied to one or more data access classes.

Each graph conceptually consists of two parts:
  • Data views, which include the references to the required data access classes, their relationships, and other meta information
  • Business logic, which consists of actions and events associated with the modified data.

Each graph can be accessed from the presentation layer or from the application code that is implemented within another graph. When the graph receives an execution request, it extracts the data required for request execution from the data access classes included in the data views, triggers business logic execution, returns the result of the execution to the requesting party, and updates the data access classes instances with the modified data.

For details on working with the business logic layer, see Implementing Business Logic.

Presentation Layer

The presentation layer provides access to the application business logic through the UI, web services, and MYOB mobile application. The presentation layer is completely declarative and contains no business logic.

The UI consists of ASPX webpages (which are based on the ASP.NET Web Forms technology) and reports created with MYOB Acumatica Report Designer. The ASPX webpages are bound to particular graphs.

When the user requests a new webpage, the presentation layer is responsible for processing this request. Webpages are used for generating static HTML page content and providing additional service information required for the dynamic configuration of the web controls. When the user receives the requested page and starts browsing or entering data, the presentation layer is responsible for handling asynchronous HTTP requests. During processing, the presentation layer submits a request to the business logic layer for execution. Once execution is completed, the business logic layer analyzes any changes in the graph state and generates the response that is sent back to the browser as an XML document.

For details on the configuration of ASPX webpages, see Configuring ASPX Pages and Reports.

Web services and mobile app pages provide alternative interfaces to the application business logic. From the side of the graph, a request from a webpage, the web services, or an mobile app page are identical and, thus, cause the execution of exactly the same business logic.