Revision 4764
Added by daigle almost 16 years ago
docs/dev/utilities-classes.html | ||
---|---|---|
1 |
<!-- |
|
2 |
* utilities-classes.html |
|
3 |
* |
|
4 |
* Authors: Michael Daigle |
|
5 |
* Copyright: 2009 Regents of the University of California and the |
|
6 |
* National Center for Ecological Analysis and Synthesis |
|
7 |
* For Details: http://www.nceas.ucsb.edu/ |
|
8 |
* Created: 2009 January 19 |
|
9 |
* Version: |
|
10 |
* File Info: '$ ' |
|
11 |
* |
|
12 |
* |
|
13 |
--> |
|
14 |
<html> |
|
15 |
<head> |
|
16 |
<title>Metacat Utilities Classes</title> |
|
17 |
<!-- unfortunately, we have to look for the common css file in the |
|
18 |
user docs directory. This is because the user docs deploy to |
|
19 |
the top level of the metacat docs on the knb web server --> |
|
20 |
<link rel="stylesheet" type="text/css" href="../user/common.css"> |
|
21 |
<link rel="stylesheet" type="text/css" href="./default.css"> |
|
22 |
</head> |
|
23 |
|
|
24 |
<body> |
|
25 |
<table class="tabledefault" width="100%"> |
|
26 |
<tr> |
|
27 |
<td rowspan="2"><img src="./images/KNBLogo.gif"></td> |
|
28 |
<td colspan="7"><div class="title">KNB Software Development Guide: Metacat Utilities Classes</div></td> |
|
29 |
</tr> |
|
30 |
<tr> |
|
31 |
<td><a href="/" class="toollink"> KNB Home </a></td> |
|
32 |
<td><a href="/data.html" class="toollink"> Data </a></td> |
|
33 |
<td><a href="/people.html" class="toollink"> People </a></td> |
|
34 |
<td><a href="/informatics" class="toollink"> Informatics </a></td> |
|
35 |
<td><a href="/biodiversity" class="toollink"> Biocomplexity </a></td> |
|
36 |
<td><a href="/education" class="toollink"> Education </a></td> |
|
37 |
<td><a href="/software" class="toollink"> Software </a></td> |
|
38 |
</tr> |
|
39 |
</table> |
|
40 |
<br> |
|
41 |
|
|
42 |
<table width="100%"> |
|
43 |
<tr> |
|
44 |
<td class="tablehead" colspan="2"><p class="label">Metacat Utilities Classes</p></td> |
|
45 |
<td class="tablehead" colspan="2" align="right"> |
|
46 |
<a href="service-base.html">Back</a> | <a href="./index.html">Home</a> | |
|
47 |
<!-- a href="add next file here when one exists" -->Next<!-- /a --> |
|
48 |
</td> |
|
49 |
</tr> |
|
50 |
</table> |
|
51 |
|
|
52 |
<div class="header1">Table of Contents</div> |
|
53 |
<div class="toc"> |
|
54 |
<div class="toc1"><a href="#Overview">Overview</a></div> |
|
55 |
</div> |
|
56 |
|
|
57 |
<a name="Overview"></a><div class="header1">UtiltiesOverview</div> |
|
58 |
<p>Metacat contains its own utilities classes (as opposed to the utilities classes |
|
59 |
available in the generic utilities module). These utilities classes provide services |
|
60 |
that are specific to Metacat. Some of the properties that typify a utility are:</p> |
|
61 |
|
|
62 |
<ul> |
|
63 |
<li>Static methods - all methods are called statically.</li> |
|
64 |
<li>No state - there are no state variables in a utility.</li> |
|
65 |
<li>Return UtilException on error - this should be the only checked exception |
|
66 |
that gets thrown</li> |
|
67 |
</ul> |
|
68 |
|
|
69 |
<p/> If state becomes an issue, you may want to use a service class to provide |
|
70 |
the functionality you need. See the |
|
71 |
<a href="./service-base.html">Metacat Service Based Architecture page</a> for more |
|
72 |
information on services.</p> |
|
73 |
|
|
74 |
<br> |
|
75 |
<a href="service-base.html">Back</a> | <a href="./index.html">Home</a> | |
|
76 |
<!-- a href="add next file here when one exists" -->Next<!-- /a --> |
|
77 |
</ul> |
|
78 |
|
|
79 |
</body> |
|
80 |
</html> |
docs/dev/service-base.html | ||
---|---|---|
1 |
<!-- |
|
2 |
* metacat-architecture.html |
|
3 |
* |
|
4 |
* Authors: Michael Daigle |
|
5 |
* Copyright: 2009 Regents of the University of California and the |
|
6 |
* National Center for Ecological Analysis and Synthesis |
|
7 |
* For Details: http://www.nceas.ucsb.edu/ |
|
8 |
* Created: 2009 January 19 |
|
9 |
* Version: |
|
10 |
* File Info: '$ ' |
|
11 |
* |
|
12 |
* |
|
13 |
--> |
|
14 |
<html> |
|
15 |
<head> |
|
16 |
<title>Metacat Service Based Architecture</title> |
|
17 |
<!-- unfortunately, we have to look for the common css file in the |
|
18 |
user docs directory. This is because the user docs deploy to |
|
19 |
the top level of the metacat docs on the knb web server --> |
|
20 |
<link rel="stylesheet" type="text/css" href="../user/common.css"> |
|
21 |
<link rel="stylesheet" type="text/css" href="./default.css"> |
|
22 |
</head> |
|
23 |
|
|
24 |
<body> |
|
25 |
<table class="tabledefault" width="100%"> |
|
26 |
<tr> |
|
27 |
<td rowspan="2"><img src="./images/KNBLogo.gif"></td> |
|
28 |
<td colspan="7"><div class="title">KNB Software Development Guide: Metacat Service Based Architecture</div></td> |
|
29 |
</tr> |
|
30 |
<tr> |
|
31 |
<td><a href="/" class="toollink"> KNB Home </a></td> |
|
32 |
<td><a href="/data.html" class="toollink"> Data </a></td> |
|
33 |
<td><a href="/people.html" class="toollink"> People </a></td> |
|
34 |
<td><a href="/informatics" class="toollink"> Informatics </a></td> |
|
35 |
<td><a href="/biodiversity" class="toollink"> Biocomplexity </a></td> |
|
36 |
<td><a href="/education" class="toollink"> Education </a></td> |
|
37 |
<td><a href="/software" class="toollink"> Software </a></td> |
|
38 |
</tr> |
|
39 |
</table> |
|
40 |
<br> |
|
41 |
|
|
42 |
<table width="100%"> |
|
43 |
<tr> |
|
44 |
<td class="tablehead" colspan="2"><p class="label">Metacat Service Based Architecture</p></td> |
|
45 |
<td class="tablehead" colspan="2" align="right"> |
|
46 |
<!-- a href="add back file here when one exists" -->Back<!-- /a --> | <a href="./index.html">Home</a> | |
|
47 |
<a href="./utilities-classes.html">Next</a> |
|
48 |
</td> |
|
49 |
</tr> |
|
50 |
</table> |
|
51 |
|
|
52 |
<div class="header1">Table of Contents</div> |
|
53 |
<div class="toc"> |
|
54 |
<div class="toc1"><a href="#Overview">Overview</a></div> |
|
55 |
<div class="toc1"><a href="#BaseService">Extending BaseService Class</a></div> |
|
56 |
<div class="toc1"><a href="#ServiceService">Controling Services With ServiceService Class</a></div> |
|
57 |
</div> |
|
58 |
|
|
59 |
<a name="Overview"></a><div class="header1">Overview</div> |
|
60 |
<p>Metacat is migrating toward a service based architecture. Basically, |
|
61 |
what this means is that any internal service that Metacat provides should be |
|
62 |
represented in a singleton class that extends the BaseService class.</p> |
|
63 |
|
|
64 |
<p>There are a few basic questions that can be asked when you are creating a |
|
65 |
class to decide if it should be a service.</p> |
|
66 |
<ul> |
|
67 |
<li>Does this class perform some action repeatedly throughout the lifetime of |
|
68 |
the Metacat application?</li> |
|
69 |
<li>Does it make sense for this class to cache certain information? This is |
|
70 |
typically information that is accessed often and seldom changes. For example, |
|
71 |
system properties rarely change and are constantly being accessed. (Thus the |
|
72 |
PropertyService class.)</li> |
|
73 |
<li>Would it make sense for the information in the class to be refreshable? Note |
|
74 |
that this is not a strict requirement, since, as we will discuss, a class can |
|
75 |
declare itself to be non-refreshable. A good example of a non-refreshable |
|
76 |
class might be a database service. If core database information changes, |
|
77 |
that usually requires a system restart, and not a service refresh.</li> |
|
78 |
</ul> |
|
79 |
|
|
80 |
<p>Any of these could signify the need for a service. Note that another option |
|
81 |
is to create a utility class. Utility classes are singletons that have static |
|
82 |
methods and less state requirements. See the |
|
83 |
<a href="./utilities-classes.html">Utilities Classes page</a> for more information.</p> |
|
84 |
|
|
85 |
<a name="BaseService"></a><div class="header1">Extending BaseService Class</div> |
|
86 |
<p> All Services extend the BaseService class except the ServiceService class (discussed |
|
87 |
next). </p> |
|
88 |
|
|
89 |
<p>Currently, BaseService defines three methods:</p> |
|
90 |
<ul> |
|
91 |
<li> refreshable() - a package level abstract method that reports whether the class can be |
|
92 |
refreshed. This has package level access because we only want ServiceService to be |
|
93 |
able to access this information. You will need to decide at implementation time |
|
94 |
whether it makes sense to refresh your service and return the appropriate boolean from |
|
95 |
this method.</li> |
|
96 |
<li> doRefresh() - a protected abstract method that performs the service refresh. It is |
|
97 |
protected because it should only be called by the refresh() method (see next). Typically, |
|
98 |
an implementation of the doRefresh() method updates any cached values in the service and |
|
99 |
performs any appropriate state-specific service updates.</li> |
|
100 |
<li> refresh() - a package level method that calls refreshable() and doRefresh(). It has |
|
101 |
package level access because we only want the ServiceService to be able to refresh the |
|
102 |
service</li> |
|
103 |
</ul> |
|
104 |
|
|
105 |
<a name="ServiceService"></a><div class="header1">Controling Services With ServiceService Class</div> |
|
106 |
<p> The ServiceService class is a exception to the BaseService extension rule. This service |
|
107 |
controls all other services. It maintains a registry of available services. </p> |
|
108 |
|
|
109 |
<p>Some of the methods available via ServiceService are: </p> |
|
110 |
<ul> |
|
111 |
<li>registerService() - register a service by sending the service name and an instance of |
|
112 |
the service. </li> |
|
113 |
<li>refreshService() - refresh a service by name.</li> |
|
114 |
</ul> |
|
115 |
|
|
116 |
<br> |
|
117 |
<!-- a href="add back file here when one exists" -->Back<!-- /a --> | <a href="./index.html">Home</a> | |
|
118 |
<a href="./utilities-classes.html">Next</a> |
|
119 |
</ul> |
|
120 |
|
|
121 |
</body> |
|
122 |
</html> |
docs/dev/metacat-architecture.html | ||
---|---|---|
1 | 1 |
<!-- |
2 |
* sitemaps.html
|
|
2 |
* metacat-architecture.html
|
|
3 | 3 |
* |
4 | 4 |
* Authors: Michael Daigle |
5 | 5 |
* Copyright: 2008 Regents of the University of California and the |
... | ... | |
11 | 11 |
* |
12 | 12 |
* |
13 | 13 |
--> |
14 |
<HTML>
|
|
15 |
<HEAD>
|
|
16 |
<TITLE>Metacat Architecture</TITLE>
|
|
14 |
<html>
|
|
15 |
<head>
|
|
16 |
<title>Metacat Architecture</title>
|
|
17 | 17 |
<!-- unfortunately, we have to look for the common css file in the |
18 | 18 |
user docs directory. This is because the user docs deploy to |
19 | 19 |
the top level of the metacat docs on the knb web server --> |
20 | 20 |
<link rel="stylesheet" type="text/css" href="../user/common.css"> |
21 | 21 |
<link rel="stylesheet" type="text/css" href="./default.css"> |
22 |
</HEAD> |
|
23 |
<BODY> |
|
22 |
</head> |
|
23 |
<body> |
|
24 |
<table class="tabledefault" width="100%"> |
|
25 |
<tr> |
|
26 |
<td rowspan="2"><img src="./images/KNBLogo.gif"></td> |
|
27 |
<td colspan="7"><div class="title">KNB Software Development Guide: Metacat Architecture</div></td> |
|
28 |
</tr> |
|
29 |
<tr> |
|
30 |
<td><a href="/" class="toollink"> KNB Home </a></td> |
|
31 |
<td><a href="/data.html" class="toollink"> Data </a></td> |
|
32 |
<td><a href="/people.html" class="toollink"> People </a></td> |
|
33 |
<td><a href="/informatics" class="toollink"> Informatics </a></td> |
|
34 |
<td><a href="/biodiversity" class="toollink"> Biocomplexity </a></td> |
|
35 |
<td><a href="/education" class="toollink"> Education </a></td> |
|
36 |
<td><a href="/software" class="toollink"> Software </a></td> |
|
37 |
</tr> |
|
38 |
</table> |
|
39 |
<br> |
|
40 |
|
|
24 | 41 |
<table width="100%"> |
25 | 42 |
<tr> |
26 | 43 |
<td class="tablehead" colspan="2"><p class="label">Metacat Architecture</p></td> |
... | ... | |
30 | 47 |
</td> |
31 | 48 |
</tr> |
32 | 49 |
</table> |
50 |
|
|
51 |
<div class="header1">Table of Contents</div> |
|
52 |
<div class="toc"> |
|
53 |
<div class="toc1"><a href="#Overview">Architecture Overview</a></div> |
|
54 |
<div class="toc1"><a href="#Sections">Architectural Sections</a></div> |
|
55 |
</div> |
|
56 |
|
|
57 |
<a name="Overview"></a><div class="header1">Architecture Overview</div> |
|
58 |
<p>Metacat is implemented as a Java Servlet, and so communicates using basic |
|
59 |
HTTP protocol semantics. The figure below shows the basic structure of |
|
60 |
the Metacat architecture. A well defined interface for inserting, |
|
61 |
updating, deleting, querying, and transforming (using XSL) XML documents |
|
62 |
is presented. We would like to add the DOM API as an alternative |
|
63 |
supported mechanism for interacting with Metacat, but have not yet |
|
64 |
implemented this functionality. </p> |
|
65 |
|
|
66 |
<p><img src="../user/metacat.gif" /></p> |
|
67 |
|
|
68 |
<a name="Sections"></a><div class="header1">Architectural Sections</div> |
|
69 |
<p> Please refer to the following sections for more information on each area. |
|
70 |
<ul> |
|
71 |
<li> <a href="./service-base.html">Service Based Architecture</a></li> |
|
72 |
<li> <a href="./utilities-classes.html">Utilities Classes</a></li> |
|
73 |
<li> <!-- a href="./managing-properties.html" -->Managing Properties<!-- /a --></li> |
|
74 |
<li> <!-- a href="./configuration-infrastructure.html" -->Configuration Infrastructure<!-- /a --></li> |
|
75 |
</ul> |
|
33 | 76 |
|
34 | 77 |
<br> |
35 | 78 |
<!-- a href="add back file here when one exists" -->Back<!-- /a --> | <a href="./index.html">Home</a> | |
36 | 79 |
<a href="./metacat-dev-hardware.html">Next</a> |
37 | 80 |
</ul> |
38 | 81 |
|
39 |
</BODY> |
|
40 |
</HTML> |
|
82 |
</body> |
|
83 |
</html> |
docs/dev/index.html | ||
---|---|---|
49 | 49 |
but we have avoided RDBMS specific features in order to maintain portability |
50 | 50 |
to other relational databases. |
51 | 51 |
</p> |
52 |
<p> |
|
53 |
Metacat is implemented as a Java Servlet, and so communicates using basic |
|
54 |
HTTP protocol semantics. The figure below shows the basic structure of |
|
55 |
the Metacat architecture. A well defined interface for inserting, |
|
56 |
updating, deleting, querying, and transforming (using XSL) XML documents |
|
57 |
is presented. We would like to add the DOM API as an alternative |
|
58 |
supported mechanism for interacting with Metacat, but have not yet |
|
59 |
implemented this functionality. |
|
60 |
</p> |
|
61 |
<p><img src="../user/metacat.gif" /></p> |
|
62 | 52 |
</td> |
63 | 53 |
</tr> |
64 | 54 |
<tr><td> </td></tr> |
... | ... | |
67 | 57 |
<td>The pages below provide more detailed descriptions of the |
68 | 58 |
various development and architecture subjects involved in Metacat. |
69 | 59 |
<ul> |
70 |
<li> <!-- a href="./metacat-architecture.html" -->Metacat Architecture <!-- /a --></li>
|
|
60 |
<li> <a href="./metacat-architecture.html">Metacat Architecture </a></li>
|
|
71 | 61 |
<li> <!-- a href="./metacat-dev-hardware.html" -->Metacat developement hardware requirements <!-- /a --></li> |
72 | 62 |
<li> <!-- a href="./metacat-eclipse-project.html" -->Setting up a Metacat Eclipse project <!-- /a --></li> |
73 | 63 |
<li> <a href="./building-metacat.html">Building Metacat</a></li> |
Also available in: Unified diff
Add documentation for serviced based architecture and utilties classes.