Build your own C/C ++ plug-in development framework (III)-Overall Structure

Source: Internet
Author: User

These days, in order to design the plug-in development framework, I tried to think about the problem with divergent thinking. I have seen dependency injection, AOP (Aspect-Oriented Programming), and contractual design in the middle. Although some tools cannot be used directly, these ideas can be used for reference, such as dependency injection and contractual design. As for AOP, it is highly correlated with tools. Although it is a good idea, it cannot be used directly in C ++.

The dependencies between plug-ins I designed are not implemented through interfaces, but through data (cell streams) between plug-ins ). Cell flow detection can be performed using contracts.

Overall structure of the plug-in development framework

Microkernel:

1. Loading, detecting, and initializing plug-ins.

2. register the service.

3. Calls services.

4. Service Management.

Extension layer:

1. Log printing.

2. The message (cell stream) is interpreted as text in binary format. Easy to locate.

3. Tracing of messages and logs.

Distributed Processing Layer:

1. It is used to communicate with other frameworks.

2. Works with other frameworks to form a distributed system.

Automated Testing Framework layer:

1. Integrate cppunit.

2. Automated integration testing framework.

3. Automated functional testing framework.

Integration layer with third-party frameworks:

1. integration layer with third-party frameworks.

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.