Articles     Forum     Examples     Download     Open Source     Tutorial

 

PocoCapsule/C++ IoC and DSM container

 

Copyright(c) 2007 by Pocomatic Software. All Rights Reserved.

 

PocoCapsule/C++ is an inversion of control (IoC) container as well as a domain specific modeling (DSM) engine. The main goals of PocoCapsule are to support declarative assemblying/deploying/configuring of component-based C/C++ applications and also to serve as a platform that can easily be used even by domain users to quickly build other component frameworks in a descriptive modeling approach.  

 

PocoCapsule/C++ IoC container is an open source software released under the terms of GNU Lesser General Public License (LGPL). The official project site of this software is http://code.google.com/p/pococapsule.

 

For a quick tutorial introduction on the IoC technology and the PocoCapsule IoC framework, please see the articles Why and What of Inversion of Control (IoC) containers and Getting Started with PocoCapsule/C++ IoC container.

POCO: Truly non-invasive and container agnostic support

PocoCapsule supports the plain-old C/C++ objects (POCOs) component programming model. This means that instances of any C++ classes, template classes (such as STL containers), K&R C structs, arrays, and even functions (as function pointers) can be manipulated as components by this framework. PocoCapsule is a truly non-invasive framework and supports container agnostic components. Namely, PocoCapsule neither imposes any particular parent classes or operation signatures on component implementations, nor forces them to rely on and call back the PocoCapsule container runtime. A POCO component can be developed completely independent and unaware of the PocoCapsule.

Supported IoC scenarios, lifecycle control, type safety

PocoCapsule/C++ IoC container supports almost all useful IoC invocation scenarios for building practical component applications. These scenarios include invocations of almost all public member methods and global C and C++ functions with arbitrary number of value/reference inject arguments (in various types, aggregated types, and even user defined types), such as:

Also, PocoCapsule/C++ seamlessly works with generic programming and other C++ programming practices by supporting template classes, template functions, macros, and so on. There is virtually no unreasonable restriction on class hierarchies and operation/function signatures.

 

PocoCapsule/C++ IoC container support component lifecycle control with user defined component global/self duplicate methods and global/pool/self destroy or release method.

 

PocoCapsule/C++ IoC container is strong typed. All implicit and explicit type casts are validated statically in building dynamic invocation proxies. The dynamic reflection engine only uses proxies that exactly match the signatures of IoC invocations. 

Platform support, footprint, and realtime performance

PocoCapsule/C++ is portable to almost all decent platforms such as Unix/Linux, Windows, and realtime and/or embedded operating systems (such as VxWorks and Symbian OS). Although seamlessly supporting component implementations that heavily use C++ template, STL, standard I/O stream, exception, and RTTI, the PocoCapsule/C++ core runtime itself is designed/implemented completely free from these sophisticated and heavyweight C++ sugars. Hence, the core container is even portable to the most rigorous realtime/embedded environment where only very primitive and lightweight C++ features are feasible.

 

For typical applications, PocoCapsule has a surprisingly small runtime footprint and negligible generated code for dynamic invocation proxies. The PocoCapsule core container is less than 70Kbytes (on Linux and VxWorks), which is one or two order of magnitude smaller than other classic component frameworks (such as "lightweight" CCM implementations).

 

Classic component frameworks (such as a "realtime" CCM implementation) are constantly advocated to be so superior that they only introduced as small as 6% to 20% performance overhead and realtime latency. PocoCapsule container does not intercept invocations made on components once wired them up. Therefore, to PocoCapsule, it is not a matter of how small but absolutely zero overhead and latency are introduced.

Domain Specific Modeling (DSM)

A distinct aspect of the PocoCapsule is its seamless integration with declarative domain specific modeling (DSM). This enables users to declaratively define and use domain specific schemas to describe applications at higher level abstractions. It not only largely avoids various problems caused by the verbose, error-prone, and primitive core IoC schema but also makes the PocoCapsule a framework that can be used by domain users to quickly and easily build other user-defined or committee-designed component frameworks.

 

Several such frameworks have been built as DSM variations from PocoCapsule and are available out-of-the-box from PocoCapsule. These include:

User examples

PocoCapsule comes with 25 user examples out-of-the-box. These examples cover various scenarios of:

Documents

PocoCapsule comes with numerous whitepapers, tutorials, and user guides/manuals such as:

Back to the PocoCapsule articles page

 

This page has been visited:

click here for a fancy web counter
free hit counter html code