Web-team multi-layer system framework (Please advise)

Source: Internet
Author: User

Multi-layer system framework

For more information about the intermediate layer, see handouts.

Http://www.cnblogs.com/dksoft/category/10146.html

Topic: section 1 of the <plug-in type> intermediate layer framework

Topic: section 2 of the <plug-in type> intermediate layer framework | DLL exception how do you handle it? | How to handle exceptions thrown by interfaces in different hosts?

For the client framework solution, refer

Exe bpl dll Interface package solution

Http://www.2ccc.com/article.asp? ArticleID = 1903

Plug-in framework

Overview

To understand the low maintenance cost and development cost, write this framework repeatedly. It can be divided into intermediate layer framework, client layer framework, and plug-in compiling modules.

A framework is a platform. With this platform, each module is available. The platform is the prerequisite for the module operation, therefore, each module must comply with the rules of the platform before it can operate better. The system framework is to implement this function.

Intermediate layer framework

The main framework of the intermediate layer provides services to the client using an EXE application, and each business module provides services to the intermediate layer in the form of DLL.

 


<Figure 1> intermediate layer framework

 

Intermediate layer interface

The intermediate layer framework provides an interface (iframeworkservice) for various business modules.

Iframeworkservice = interface // interface provided by the Framework

Function getframeworkinfo (actionindex: integer; var data, MSG: olevariant): hresult;

End;

 

Module Interface

The business module must provide two interfaces for the intermediate layer to obtain information and perform business logic processing.

Imodelinfo = interface // basic information interface of the module

Procedure getmodelinfo (VAR modelinfo: olevariant); stdcall;

End;

 

(Modelinfo: olevariant) the following information must be saved so that the module administrator can obtain the information.

Procedure tmodelinfo. getmodelinfo (VAR modelinfo: olevariant );

VaR

Hash: tdkhashtools;

Begin

Hash: = tdkhashtools. Create ();

Hash ['name']: = 'System module ';

Hash ['code']: = 'systemmgr ';

Hash ['version']: = 1.01;

Hash ['grammer ']: = 'yang maofeng ';

Hash ['createdate']: =' 2004-11-12 ';

Hash ['modifydate']: =' 2004-11-12 ';

Hash ['note']: = '';

Hash. saverelevariant (modelinfo );

Hash. Free;

End;

 

 

Imodelservice = interface // module operation interface

Function opeartor (actionindex: integer; var data, MSG: olevariant): hresult; stdcall;

End;

Module Output Functions

Each module (DLL) must output three functions

Exports

Getmodelinfo, getmodelservice, setframeworkservice;

 

Below is the prototype of the three functions

Function getmodelinfo: imodelinfo; // interface for obtaining module information

Function getmodelservice: imodelservice; // gets the module service interface.

Function setframeworkservice (aframeworkservice:

Iframeworkservice): hresult; // imports the Framework service interface to the module.

 

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.