Initial commit
[clearscm.git] / web / scripts / ecrd / index.php
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2    "http://www.w3.org/TR/html4/strict.dtd">
3 <html>
4 <head>
5   <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6   <meta name="GENERATOR" content="Mozilla/4.61 [en] (Win98; U) [Netscape]">
7
8   <title>ClearSCM: ECRDig</title>
9
10   <link rel="stylesheet" type="text/css" media="screen" href="/css/Article.css">
11   <link rel="stylesheet" type="text/css" media="screen" href="/css/Code.css">
12   <link rel="stylesheet" type="text/css" media="print"  href="/css/Print.css">
13   <link rel="SHORTCUT ICON" href="http://clearscm.com/favicon.ico" type="image/png">
14
15   <!-- Google Analytics
16   <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
17   </script>
18   <script type="text/javascript">
19     _uacct = "UA-89317-1";
20     urchinTracker ();
21   </script>
22   Google Analytics -->
23
24   <?php
25   include "../../php/clearscm.php";
26   menu_css ();
27   ?>
28 </head>
29
30 <body id="homepage">
31
32 <?php heading ();?>
33
34 <div id="page">
35   <div id="content">
36     <?php start_box ("cs3");?>
37       <h2>ECRDig</h2>
38
39       <h4 style="text-align:center">by <a
40       href="/people.php">Andrew DeFaria</a></h4>
41
42       <p>ECRs, or Electronic Change Records, was a bug tracking
43       systems in used at <a href="http://lynuxworks.com">LynuxWorks,
44       Inc.</a>. What started as a simple quest to display an ECR as a
45       web pages turned into a full blown, full text search of the
46       defect/issue tracking system. Here's how it developed...</p>
47     <?php end_box ();?>
48
49     <h3>Introduction</h3>
50
51     <p>While at LynuxWorks I decided to leverage some code that I had
52     previously developed (See <a href="/clearquest/cqd">Clearquest
53     Daemon</a>) that utilizes a client/server model to provide a
54     service that interogates a database and returns information. Again
55     this database happens to be a defect tracking database residing on
56     another machine.</p>
57
58     <h3>Daemon</h3>
59
60     <p>The daemon opens the database then listens on a socket for
61     requests, in this case a defect ID, then obtains the detail
62     information about the defect and returns it to the caller in the
63     form of a Perl hash. This avoids the overhead associated with
64     opening and closing the database or otherwise connecting to the
65     datastore. The daemon runs continually in the background listening
66     for and servicing requests (<a href="ecrd.php">ecrd source
67     code</a>).</p>
68
69     <h3>Client</h3>
70
71     <p>The caller, or client, then can process the information in
72     anyway they see fit. Often the caller is a Perl or PHP script that
73     outputs the information in to a nicely formatted web page but it
74     can as easily be a command line tool that spits out the answer to
75     a question. For example:<p>
76
77     <div class="code"><pre>
78       $ ecrc 142 owner
79       adefaria
80     </pre></div>
81     
82     <p>uses a command line client to display the owner of the defect
83     142.  (<a href="ecrc.php">ecrc source code</a>).</p>
84
85     <h3>PHP Module</h3>
86
87     <p>As PHP is a nice language for writing dynamic web pages I then
88     developed a PHP API library in order to be a client to ecrd which
89     was written in Perl. This allowed me to call the daemon to get
90     information about a defect then format out whatever web page I
91     wanted (<a href="ecrc.php.php">ecrc.php API source code</a>).</p>
92
93     <p>For example, here is an <a href="ecr23184.html">example</a> of
94     a web page describing a specific defect. Notics that the ECR
95     (LynuxWorks defect tracking system) displays the one line
96     description as well as other fields such as State, Status,
97     Severity and Fixed info. Additionally the long description is
98     displayed as well as parsed for references to other ECRs or
99     auxilary files, courtesy of PHP.</p>
100
101     <table border=0 align=right width=300px>
102       <tr>
103         <td>
104           <?php start_box ("cs2");?>
105             <p>The link to ECR 22979 will not work unless you are
106             within the LynuxWorks Intranet</p>
107           <?php end_box ();?>
108         </td>
109       </tr>
110     </table>
111
112     <h3>Tying it into HtDig</h3>
113
114     <p>Since ECRs and their full text descriptions are now available
115     via a web link it was relatively trival to hook this up to <a
116     href="http://www.htdig.org/">HtDig</a> to enable full text
117     searching on all ECRs and their descriptions. All that was needed
118     was to produce a web page with all ECRs listed linked to web pages
119     of their descriptions. HtDig would then crawl through and index
120     everything. Additionally, since the ECR descriptions were scanned
121     for references to certain <i>auxilary files</i> (files not
122     necessarily in the defect database but on a network accessible
123     area and used to further support the ECR in question) HtDig would
124     crawl through and index them too. This resulted in a very flexible
125     and powerful internal search facility.</p>
126   </div>
127
128   <?php copyright ();?>  
129 </div>
130
131 <script language="JavaScript" src="/JavaScript/Menus.js" type="text/javascript"></script>
132
133 </body>
134 </html>