iotivity 0.9.0
[platform/upstream/iotivity.git] / service / protocol-plugin / lib / cpluff / libcpluff / docsrc / architecture.dox
1 /*-------------------------------------------------------------------------
2  * C-Pluff, a plug-in framework for C
3  * Copyright 2007 Johannes Lehtinen
4  * 
5  * Permission is hereby granted, free of charge, to any person obtaining a
6  * copy of this software and associated documentation files (the "Software"),
7  * to deal in the Software without restriction, including without limitation
8  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9  * and/or sell copies of the Software, and to permit persons to whom the
10  * Software is furnished to do so, subject to the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be included
13  * in all copies or substantial portions of the Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
16  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
19  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22  *-----------------------------------------------------------------------*/
23
24 /**
25  * @page architecture Plug-in architecture
26  *
27  * @section architectureOverview Overview
28  *
29  * The plug-in architecture supported by C-Pluff is presented in the
30  * following figure. There is a thin main program controlling the plug-in
31  * framework. The main program is responsible for initializing and setting
32  * up the plug-in environment. Most of the application logic is contained in
33  * plug-ins which are independent components and can be developed and
34  * distributed separately. Plug-ins integrate with each other by providing
35  * extension points and extensions. An extension point is a point into which
36  * other plug-ins can attach extensions. An extension can be just
37  * information, expressed in XML format, or the plug-in may also provide
38  * program logic as part of the plug-in runtime library. The framework
39  * provides services for accessing extensions and for managing plug-in
40  * dependencies.
41  *
42  * @image html architecture.png "C-Pluff plug-in architecture"
43  *
44  * @section architectureExtensions Extensions
45  *
46  * The idea behind extension points and extensions is that the extensibility
47  * is not limited only to few fixed plug-in types supported by the
48  * core application. Although the core plug-ins typically define the extension
49  * points for the core application logic, it is possible for any plug-in
50  * to specify additional extension points.
51  *
52  * For example, let us assume that we are developing an extensible text
53  * editor. One extension point defined by core editor plug-in could be
54  * auto-completion extension point. A plug-in providing basic Java source code
55  * support could provide an extension for auto-completing Java code.
56  * Now, while this extension could do basic auto-completion of plain Java code,
57  * it is customary that Java source code also includes embedded documentation,
58  * such as JavaDoc comments and tags, or annotations, such as XDoclet tags, as
59  * part of doc comments. Instead of trying to support all known tags and their
60  * semantics, the plug-in providing basic Java support could define another
61  * extension point for additional plug-ins that know how to perform
62  * auto-completion of different kind of tags in doc comments.
63  * This way the extensibility of the application is not limited to the
64  * extension points defined by the core application but the plug-ins can
65  * incrementally increase the extensibility of the application.
66  */