Openbiz 2.x architectureOpenbiz 2.x is a metadata-driven framework. All openbiz objects are declared in their own metadata files. Openbiz 2.x architecture follows the Model-View-Controller (MVC) design pattern, it also implements basic Object/Relational Mapping (ORM) to reduce the time you spend coding CRUD operations. Metadata-driver frameworkOpenbiz is XML metadata-driven framework, which means openbiz objects are constructed based on metadata files containing pre-defined attributes. Building an Openbiz application means creating metadata files that are read by Openbiz to produce functional web pages. Due to the self-expanatory nature of XML, the application is easy to maintain and extend. The diagram below shows metadata based objects in Openbiz framework. These objects cover most functional needs of web application development.
The main XML files used in an Openbiz application are BizView, BizForm and BizDataObj. Let's take a moment to briefly describe each before getting into their role with the MVC model. A BizDataObj represents a series of records from one or more tables in your database. It contains XML attributes that are used to create basic CRUD functions in your application. Information like the columns that should be included in the Object as well as what tables to join to the object. A BizForm describes how a BizDataObj is to be displayed. This includes the actual data columns and rows as well as what CRUD operations are available to the end users. A BizView groups one or more BizForm onto a single web page. BizViews also provide rules for how BizForms should be displayed. Ie. Together on one page or in a Wizard format. Openbiz's implementation of MVCOne of the key advantages of Openbiz is that it is a framework that follows the Model-View-Controller (MVC) design pattern. This makes Openbiz applications much more manageable because the presentation code (View) is cleanly separated from the application data and logic (Model). All user interactions with the application are handled by a front-end controller.
Comparing Openbiz MVC design with existing MVC frameworks as JSF and Struts shows that Openbiz is more similar to JSF because both share a component based architecture. Openbiz's View layer comprises components of BizView, BizForm and ojects within a BizForm. These components are accessible during request processing. Many developers prefer JSF over struts. Here are the Top Ten Reasons to Prefer JSF over Struts as well a table showing how Openbiz provides similar advantages.
Openbiz's implementation of persistent object and ORMSimilar with the popular Hibernate approach, Openbiz uses sessions to maintain the persistency of objects. Unlike J2EE web containers who have objects pools in memory, PHP objects are be constructed and released for each request (this is called share-nothing architecture). To keep the persistency of objects (BizDataObj, BizForm ...) Openbiz saves a set of states in session, then reconstructs the object with these same states. Also to avoid multiple object instances of same class in the same session, Openbiz uses an ObjectFactory class to protect from duplications.
Openbiz implements the necessary object/relational mapping (ORM) features to allow BizDataObj to represent the data and relationships of database tables. The following table list the features of Openbiz ORM.
Openbiz security modelOpenbiz supports web security in three ways - user authentication, view access control and data access control. Openbiz mainly uses plugin services to control security. This implementation allows customers to implement their own logic within these services. This subject will get a full treatment in the developer guide - Implement authentication, view and data access control. Basic user authentication flow: View access control flow:
Openbiz 2.0 package organizationOpenBiz simplifies small to medium applications by using the following multi-layer architecture.
Usually a business application can be boiled down to three layers namely a Data layer, Business Logic layer and Presentation layer. In OpenBiz architecture, these 3 layers map to several packages. The Presentation layer is implemented by the BizView package and GUI layers which is implemented by the jbForm javascript package. Business Logic layer is implemented by the BizDataObj package. Openbiz uses the Zend Framework, which is based ond PDO, to make SQL queries. Finally, a Plugin service provides functional service components that can be invoked by both the presentation and data layer.
Class diagram of multi-layer architecture |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||







