source: LMDZ6/branches/Amaury_dev/tools/fcm/doc/user_guide/api.html @ 5129

Last change on this file since 5129 was 5129, checked in by abarral, 5 months ago

Re-add removed by mistake fcm

File size: 7.1 KB
Line 
1<!DOCTYPE html>
2<html>
3<head>
4  <title>FCM: User Guide: A Brief Introduction to the FCM Perl API</title>
5  <meta name="author" content="FCM team" />
6  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7  <link rel="icon" href="../etc/fcm-icon.png" type="image/png" />
8  <link rel="shortcut icon" href="../etc/fcm-icon.png" type="image/png" />
9  <link href="../etc/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen" />
10  <link href="../etc/fcm.css" rel="stylesheet" media="screen" />
11</head>
12<body>
13  <div class="navbar navbar-inverse">
14    <div class="container-fluid">
15      <div class="navbar-header">
16        <a class="navbar-brand" href=".."><span class="fcm-version">FCM</span></a>
17      </div>
18      <div class="collapse navbar-collapse">
19        <ul class="nav navbar-nav">
20          <li><a href="../installation/">Installation</a></li>
21
22          <li><a class="active" href="#">User Guide</a></li>
23        </ul>
24      </div>
25    </div>
26  </div>
27
28  <div class="page-header">
29    <div class="fcm-page-content pull-right well well-sm"></div>
30    <h1>FCM: User Guide: A Brief Introduction to the FCM Perl API</h1>
31  </div>
32
33  <div class="container">
34  <div class="row">
35  <div class="col-md-12">
36
37  <p>The majority of FCM functionalities are provided by a set of Perl modules.
38  Old modules developed prior to <a href="../release_notes/2-0.html">release
39  2-0</a> reside in the <code>FCM1::*</code> name-space. Modules developed
40  thereafter reside in the <code>FCM::*</code> name-space. These are
41  sub-divided into the following name-spaces:</p>
42
43  <dl>
44    <dt><code>FCM::Class</code></dt>
45
46    <dd>
47      <p>Provides an internal object class framework.</p>
48
49      <p>The majority of the classes in the <code>FCM::*</code> name-space are
50      sub-classes of either <code>FCM::Class::CODE</code> or
51      <code>FCM::Class::HASH</code>. The former creates classes that are
52      blessed <code>CODE</code> references, and is intended for configurable
53      functional (i.e. mostly <em>stateless</em>) objects. The latter creates
54      classes that are blessed <code>HASH</code> references, and is intended
55      for data objects.</p>
56
57      <p>Note: In theory, we could use the standard module <code><a href=
58      "http://search.cpan.org/~rjbs/perl-5.12.3/lib/Class/Struct.pm">Class::Struct</a></code>
59      or the modern <a href="http://www.iinteractive.com/moose/">MOOSE</a>
60      framework. The problem is that the former is not powerful enough to give
61      us what we need, and the latter is not a standard module and is too heavy
62      weight for our intends and purposes. Instead, the developer decides that
63      it is easier to go for a light weight and in house solution.</p>
64    </dd>
65
66    <dt><code>FCM::CLI</code></dt>
67
68    <dd>
69      <p>Provides the logic and configuration of the command line interface
70      (CLI).</p>
71
72      <p>It is made up of the following components:</p>
73
74      <dl>
75        <dt><code>FCM::CLI</code></dt>
76
77        <dd>Logic to provide help and invoke functions of
78        <code>FCM::System</code>.</dd>
79
80        <dt><code>FCM::CLI::Exception</code></dt>
81
82        <dd>CLI exception.</dd>
83
84        <dt><code>FCM::CLI::Parser</code></dt>
85
86        <dd>CLI option parser and configuration.</dd>
87
88        <dt><samp>fcm-*.pod</samp></dt>
89
90        <dd>Help files for the CLI commands.</dd>
91      </dl>
92    </dd>
93
94    <dt><code>FCM::Context::*</code></dt>
95
96    <dd>
97      <p>Provides the data structures for storing the run time contexts.</p>
98
99      <p>The objects of these classes do very little, but they provide the data
100      structures that define the <em>states</em> of the program at run
101      time.</p>
102    </dd>
103
104    <dt><code>FCM::Exception</code></dt>
105
106    <dd>
107      <p>Provides the base class for exceptions.</p>
108    </dd>
109
110    <dt><code>FCM::System</code></dt>
111
112    <dd>
113      <p>Provides a façade to the functionalities of the FCM system.</p>
114
115      <p>The actual implementation is delegated to the following:</p>
116
117      <dl>
118        <dt><code>FCM::System::CM</code></dt>
119
120        <dd>The code management system. Currently a thin adapter to
121        <code>FCM1::Cm</code>.</dd>
122
123        <dt><code>FCM::System::Misc</code></dt>
124
125        <dd>Miscellaneous functions, e.g. <code>browse</code>,
126        <code>cfg-print</code>, <code>keyword-print</code>.</dd>
127
128        <dt><code>FCM::System::Old</code></dt>
129
130        <dd>Thin adapter to the old extract and build systems.</dd>
131
132        <dt><code>FCM::System::Make</code></dt>
133
134        <dd>The logic of the FCM make system.</dd>
135
136        <dt><code>FCM::System::Make::Build</code></dt>
137
138        <dd>FCM make: build system logic.</dd>
139
140        <dt><code>FCM::System::Make::Build::*</code></dt>
141
142        <dd>FCM make: build system components: File type and task specific
143        logic.</dd>
144
145        <dt><code>FCM::System::Make::Extract</code></dt>
146
147        <dd>FCM make: extract system logic.</dd>
148
149        <dt><code>FCM::System::Make::Mirror</code></dt>
150
151        <dd>FCM make: mirror system logic.</dd>
152
153        <dt><code>FCM::System::Make::Preprocess</code></dt>
154
155        <dd>FCM make: preprocess system logic, actually a configuration of
156        <code>FCM::System::Make::Build</code>.</dd>
157
158        <dt><code>FCM::System::Make::Share::*</code></dt>
159
160        <dd>Shared logic between all subsystems in
161        <code>FCM::System::Make::*</code>.</dd>
162      </dl>
163    </dd>
164
165    <dt><code>FCM::Util</code></dt>
166
167    <dd>
168      <p>Provides supporting utilities.</p>
169
170      <p>Functionalities include:</p>
171
172      <ul>
173        <li>abstract utilities for SVN URLs and file system paths.</li>
174
175        <li>configuration file reader.</li>
176
177        <li>event handler.</li>
178
179        <li>file utilities.</li>
180
181        <li>message report.</li>
182
183        <li>name space utilities.</li>
184
185        <li>shell invocation.</li>
186
187        <li>multi-process task runner.</li>
188
189        <li>timer.</li>
190      </ul>
191
192      <p>The logic of the more complex utilities are delegated to modules in
193      the <code>FCM::Util::*</code> name space.</p>
194    </dd>
195  </dl>
196
197  <p>Note: The majority of modules in the old <code>FCM1::*</code> name space
198  are considered deprecated, with the exception of <code>FCM1::Cm</code> and
199  those providing support functionalities for it. The functionalities of these
200  modules will eventually be absorbed into the <code>FCM::System::CM</code>
201  framework.</p>
202
203  </div>
204  </div>
205  </div>
206
207  <hr/>
208  <div class="container-fluid text-center">
209    <div class="row"><div class="col-md-12">
210    <address><small>
211      Copyright &copy; 2006-2021 British Crown (Met Office) &amp; Contributors.
212      <a href="http://www.metoffice.gov.uk">Met Office</a>.
213      See <a href="../etc/fcm-terms-of-use.html">Terms of Use</a>.<br />
214      This document is released under the British <a href=
215      "http://www.nationalarchives.gov.uk/doc/open-government-licence/" rel=
216      "license">Open Government Licence</a>.<br />
217    </small></address>
218    </div></div>
219  </div>
220
221  <script type="text/javascript" src="../etc/jquery.min.js"></script>
222  <script type="text/javascript" src="../etc/bootstrap/js/bootstrap.min.js"></script>
223  <script type="text/javascript" src="../etc/fcm.js"></script>
224  <script type="text/javascript" src="../etc/fcm-version.js"></script>
225</body>
226</html>
Note: See TracBrowser for help on using the repository browser.