Openbiz Architecture of Openbiz Technology Development Handbook

Source: Internet
Author: User

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

Openbiz Architecture

The Openbiz framework is designed to make designing, developing, and maintaining network applications fast and easy. The main innovation of openbiz architecture is its metadata based design. This means that the Openbiz object is created based on the description in the metadata file. For openbiz, building an application most of the time is equivalent to setting up his metadata file for nuclear development. Because of the nature of the XML language's self interpretation, openbiz applications are very easy to maintain, while openbiz is a rich extensible framework as well as an XML language.

Openbiz Core Objects

Any application can consist of two parts-the back end and the front end. The usual main business logic runs at the back end while the user interface is in front. In Openbiz, the backend is primarily a data object or a service object. The front end includes the form objects and view objects. ”

  

Data Objects

A data object (also named "Do") is a data unit. Openbiz Data Objects map tables and relationships in the database to system objects. It encapsulates operations such as creating, reading, updating, and deleting objects, and provides an advanced search interface.

A data object contains a set of fields that, in a typical usage, map a data object to a table in the database, and each field is mapped to a column or SQL expression in a datasheet.

Service object

A service object is a openbiz system unit that contains a set of functions (methods) implemented by the business logic. A typical example of a Openbiz service object is the user authentication service and the e-mail Service

Form objects

A Form object is a cell of a user interface block that contains a set of related form controls, which can be a standard HTML form, an HTML table with toolbars and navigation bars, a list of pictures, and so on.

A Form object contains a set of form controls that can be simple or advanced HTML controls. A typical way to use this is to map a form object to a data object and map the form controls on each Form object to the fields of the data object.

View objects

The View object actually acts as a page. An attempt object is a container for a Form object. You can imagine a View object (Web page) as a floor, and a Form object is a tile attached to it.

Core objects and metadata

The core Openbiz object is defined based on the openbiz metadata. The following excerpt is the metadata for a data object, and the meaning of the metadata is discussed in a later chapter.

  

The openbiz framework reads such metadata and dynamically creates these objects from the Openbiz object factory.

Openbiz Architecture Features

Multi-layered object-oriented design

Openbiz is a multi-layered object-oriented design. The openbiz application is divided into three-tier design, presentation layer, business logic layer and data integration layer, in openbiz:

The presentation layer is implemented by openbiz views and forms. Openbiz also has additional JavaScript libraries responsible for communicating with the presentation layer objects in the backend of the server via Ajax.

The business logic layer is implemented by Openbiz data Objects and openbiz service objects.

Third-party package, the bottom of the system by zend_db to handle the operation of the data integration layer.

Openbiz MVC

A key feature of openbiz is that it is a framework based on the module-View-Controller (MVC) design pattern. This feature makes it easier to manage applications based on openbiz development. Because the presentation layer (View) is clearly separated from the application's data and logic (Model). All user interaction with the application is handled by the front-end controller.

Comparing openbiz MVC with the dominant MVC framework in the marketplace such as JSF and Strusts, the openbiz framework is closer to JSF because they are also component-based structures. The view layer of openbiz includes components such as View objects, form objects, and form controls that are accessible when processing requests.

Openbiz Object Relational Mapping

Openbiz implements the necessary object-relational mapping to allow data objects to represent data and relationships in a database. The following list is the functionality implemented by the Openbiz Object Relational mapping.

  

Database Abstraction Layer

Openbiz Data Objects can connect various types of relational databases through zend_db, ZEND_DB provides a data abstraction layer on the PDO and local database client tools for the Openbiz bottom. Developers can use the Openbiz data Object API to implement most database operations, and call the ZEND_DB API directly to complete advanced functionality.

If you need to connect an Config.xml type of database, the user only needs to specify the database connection in the application root directory. The Openbiz data object invokes the correct database driver to connect to the database server. Openbiz currently supported database types are MySQL, MSSQL, Oracle, PostgreSQL, sqllite, etc.

Each Openbiz data object can have its own database reference. This feature helps you to connect multiple databases in one application at the same time. You can even connect multiple data sources on the same page.

Stencil engine

Openbiz Form objects and view objects use the Smarty template engine to render the default output, and since Smarty is the most popular templating system at the moment, developers can easily learn how to render (display) a openbiz page.

In the case of complex output, it is difficult to implement in the Smarty template. Openbiz allows users to use the PHP template engine, the PHP template system will also provide more efficient rendering (display) speed than smarty.

Openbiz Code Structure

Openbiz Core class library and code structure

openbiz_root/

---bin/(openbiz core PHP source code)

------data/(data-tier class library)

----------private/(data once private class library)

------easy/(after new presentation Layer Class library 2.4)

----------element/(HTML Form Control class library)

------service/(openbiz Core Service class library)

------ui/(Display Layer class library)

----------private/(display layer private class library)

------util/(Tool interpreter class library)

---languages/(language pack)

---medata/(openbiz metadata file)

------service/(openbiz service Pack)

---others/(Third party class library)

------smarty/(Smarty package)

------zend/(Zend Frame)

Openbiz Execution Process

The following figure is a typical execution process for a user-triggered data query in a openbiz application.

  

Openbiz and third party class libraries

Openbiz tries to integrate the best Third-party class libraries in the marketplace in the system, and the key class libraries that are heavily used in Openbiz include:

Zend Framework

Zend Framework. Openbiz uses the Zend framework in the following applications

· Database interaction

· Multilingual support

· Data validation

· e-Mail Service

· Advanced Cache Management

· JSON encoding and decoding

· PHP templates

Smarty

Smarty template System. Smarty is the primary template engine for the system and is applied to openbiz form objects and view objects. For templates that require more complex rendering logic, the Openbiz form object uses the PHP template engine provided by the Zend Framework

Javascript

Javascript Class Library

· Prototype. Openbiz AJAX clients use the prototype library to implement class inheritance and Ajax communication.

· JQuery. JQuery is used heavily in advanced UI controls in Openbiz Cubi

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.