File:  [mozdev] / archangel / www / catacombs.html
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Mon Nov 25 03:31:38 2002 UTC (14 years, 10 months ago) by marnanel
Branches: MAIN
CVS tags: v1_3_0, v0_4_3, v0_4_1, v0_2_0_really, v0_2_0, HEAD
Notes made during a long plane journey.

<script language="javascript">
<!--

function triggerURL(url) {

        if (!InstallTrigger.updateEnabled())
          return false; 

        else
          InstallTrigger.startSoftwareUpdate(url); 

}

//-->
</script>


<!-- MAIN CONTENT -->
<h5 class="page-header">Catacombs</h5>

<p>Some notes on the project, made on a transatlantic flight in November 2002. You may cite these as <cite>Catacombs-1</cite>, etc.</p>

<ol>

<li>
We <em>are</em> a two-word parser-- a la Topologika!<br>
We can write this as <b>[N/V]</b>.<br>
<code>RgtpResolve(<var>noun</var>, <var>verb</var>)</code><br>
VERB(2)... NOUN(3) (--&gt; URL; <code>rgtp://...</code>).
</li>

<li>
<b>VERB:</b> <code>browse</code>-- default. Returns null.
Called when <code>rgtp://...</code> used from browser.
</li>

<li>
<b>NOUN:</b> parts of a URL.
<table border>
<tr>
<th><code>rgtp://</code></th>
<th><code><var>user</var>@</code></th>
<th><code>:<var>sharedsecret</var></code></th>
<th rowspan="3"><code><var>host</var></code></th>
<th><code>:<var>port</var></code></th>
<th rowspan="3"><code>/<var>stuff</var></code></th>
<th rowspan="3"><code>?<var>view</var></code></th>
</tr>

<tr>
<td rowspan="2">Invariant</td>
<td>Optional</td>
<td>Optional</td>
<td>Optional</td>
</tr>

<tr>
<td colspan="2">But see (10).</td>
</tr>

</table>

<li><b>NOUN: TYPES OF RGTP URL</b><br>
<ul>
<li>
Class
<b>&lt;A&gt;</b>:
<code>rgtp:*</code>
-- see (6)
</li>

<li>
Class
<b>&lt;B&gt;</b>:
<code>rgtp://<var>hostname</var>[?<var>view</var>]</code>
-- see (9)
</li>

<li>
Class
<b>&lt;C&gt;</b>:
<code>rgtp://<var>hostname</var>/<var>itemid</var>][<var>view</var>]</code>
-- see (12)
</li>

<li>
Class
<b>&lt;D&gt;</b>:
<code>rgtp://<var>hostname</var>/<var>other-stuff</var>][<var>view</var>]</code>
-- see (24), etc.
</li>
</ul>

<li><b>Dictum.</b> Verb=BROWSE <em>almost</em> always opens a new window. The only counterexample is <b>&lt;B&gt;</b> -&gt; <b>&lt;C&gt;</b> (which opens in the bottom half of the same index window), but <strong>we ignore this case for now</strong>. (cf.(10): prototype -&gt; simplicity.).</li>

<li><b>Views of &lt;A&gt;.</b>
<ul>
<li><b>LIST</b>: basic, best for now?</li>
<li><b>DIR</b>: like . o O {7}</li>
</ul>

<li>We should find a way to represent stuff like a (Windows) directory listing.</li>

<li>How do we get <code>rgtp://...</code> recognised and turned into <code>RgtpResolve(url, "browse")</code>? <small><i>[handle .net thing]</i></small></li>

<li><b>Views of &lt;B&gt;. [XUL]</b>
<ul>
<li><b>LIST</b>: best for now?</li>
<li><b>DIR</b>: -&gt; {7}</li>
<li><b>BUBBLES</b>!: &lt;-- Calm</li>
</ul>
</li>

<li><b>Dictum.</b>
Everything should use lists where possible in the first version.
<i>[Later: i.e., the XUL should consist of nothing but a bare
list.]</i><br>
<b>Also:</b> No user/pass sections in <i>[RGTP]</i> urls will be
honoured.<br>
<b>SIMPLIFY &lt;- PROTOTYPE</b>
</li>

<li><b>Property lists</b> (context menus, right-click) -- easy or
not?<br>
(Otherwise, just use the File menu.)<br>
(Or do both, whatever.)</li>

<li><b>View of &lt;C&gt;.</b> [HTML]
<ul>
<li>the obvious one
<blockquote>
<p><b>Outset para:</b> grogname, user id, date.</p>
<p><b>Item text:</b> monospace?</p>
<p><b>Outset para...</b> (etc.)</p>
</blockquote>
</li>
<li>other views?</li>
</ul>
</li>

<li><b>Modules.</b><br>
RGTP URL splitter...?<br>
RGTP connection<i>-phylax</i>?<br>
<code>RgtpResolve</code>r<br>
...cache...?
</li>

<li><b>Resolver:</b><ul>
 <li>NOUN type?<ul>
  <li><b>&lt;A&gt;</b> or <b>&lt;B&gt;</b><ul>
   <li>VERB?<ul>
    <li><code>list</code><br>
     read from <i>"phylax"</i>
    </li>
    <li><code>browse<code><br>
     Put up list (XUL); fill with <b>[noun/<code>list</code>]</b>
    </li>
    <li>also, verb can be <code>connection</code>; -&gt; (17)
    </li>
   </ul></li>
  </ul></li>
  <li><b>&lt;C&gt;</b> (i.e. an itemid)<ul>
    <li><code>html<code><br>
     create screen <b>[n/<code>read</code>]</b>
    </li>
    <li><code>read<code><br>
     Read from <i>phylax</i>
    </li>
    <li><code>browse<code><br>
     Put up item.html; fill with <b>[noun/<code>html</code>]</b>
    </li>
  </ul></li>
  <li><b>&lt;D&gt;</b></b>... <i>blah.</i>
  </li>
 </ul></li>
</ul></li>

<li><big><b>*** BUT! **</b></big><br>
<code>RgtpResolve()</code> <em>cannot</em> just be a single call.
It must return an object-- an <strong>iterator</strong>. --&gt; (19)
</li>

<li><b>Resolver; N &isin; &lt;A&gt;, v=<code>list</code></b><br>
simply return series of pairs.<br>
[how? "URL\tLABEL" maybe?] (no, see (21))<br>
One for each known server.<br><br>

(part b:)
<b>Resolver; N &isin; &lt;B&gt;, v=<code>list</code></b><br>
(for now)<br>

<ol>
<li>refresh cache (18) <b>[N/<code>connect[ions<i>?</i>]</code>]</b>
(this is far more complex than we make it)<ol>
<li>Find a connection: <b>[N/<code>connect] -&gt; (17)</li>
<li>Make sure we know where the cache is, or should be, and that it
exists (create it if not)</li>
<li>Walk the connection. This code exists in v0.0.2.</li>

</ol></li>
<li>walk the cache, returning each line.</li>
</ol>

</li>

<li><b>Resolver; N &notin; &lt;A&gt;, v=<code>connect</code></b><br>
Checks through existing connections database for one matching
the URL "N"; if one doesn't exist, creates.<br><br>

. o O {{{ host = primary key? }}}<br><br>

Obviously, host, post... user? see (10b)... what else?<br>
Maybe we just need to code it.<br><br>

(It is an error to call this on &lt;A&gt;, just like it would be
to call it on <code>http://...</code> URLs.)
</li>

<li>(merged with (16))</li>

<li><code>RR()</code>'s iterators... how?<br>
I think (20) says all that needs to be said, really.</li>

<li><b>How can we make an iterator in JavaScript?</b><br>
OO... polymorphism... abstract...<br>

[ Thing ] --&gt; <code>next()</code> (:string?) --&gt;(21);
<code>more()</code> (:Boolean)<br><br>

Do we need to descend these all from the parent class?
Or not? (Cf. Python.)<br><br>

Read up on JS's OO.</li>

<li><b>Return format for it::more()</b> could be:
<ul>
<li><b>Simple</b>: "field\tfield\tfield\tfield..."</li>
<li><b>Convenient:</b> <code>Array('field','field','field',...)</code>.
We'll probably go with this.</li>
</ul>

<li><b>TESTING</b><br>
The JS shell (name?)<br>
Perhaps special functions for testing. (Iterator step-through with
"More?", say)<br><br>

(Part b:)<br>
Automated test suite??<br>
How?<br>
(Too advanced for prototype. --&gt; (10))</li>

<li><b>BUILD ORDER</b><br>

(ooh, difficult; we need to know the shape of these Catacombs to draw
this. So any attempt at creating this is in itself an attempt at
mapping.) Anyway, here goes:<br><br>

<ol>
<li>Resolver</li>
<li>URL splitter</li>
<li>(18) or testing (22)</li>
</ol>

... then: (28) and (29)<br>
... always: (27).<br><br>

Remember: Simple &lt;- Prototype ((10)).</li>

<li>
Types of <b>&lt;D&gt;</b><br>
Each needs its own views.
<ul>
<li><code>motd</code></li>
<li><code>editlog</code></li>
<li>...?</li>
</ul>
Not now, though; see (10).
</li>

<li>
<b>&lt;C&gt; is more than you thought</b><br>

We need a "post" (or "append"? or "reply"?) verb.<br>
...also an "edit" verb.<br><br>

<b>/!\</b> don't get VERBS and VIEWS confused.
</li>

<li><b>A thought.</b> Can we do the Resolver with lookup tables of
string--&gt;procedure? How do <b>&lt;A&gt;&lt;B&gt;&lt;C&gt;&lt;D&gt;</b>
fit into this? Two levels? Combine them? (Probably we'll do it with a
nested <code>if</code> statement until everything works.)</li>

<li><b>I love <a
href="http://www.livejournal.com/userinfo.bml?user=riordon">Riordon</a>. 
&hearts;</b></li>

<li>Basic list: <b>XUL for list view</b><br>

<ul>
<li>XUL<ul>
<li>List<br>
(Can this be function-generated? Had bad experiences with this in the
past. Only need a few hundred.) Yes. Don't generate it. We don't in
(29), and it's not like we have millions of entries. Also see (10).</li>
<li>Grippy</li>
<li>Nothing under the grippy. See (5).</li>
</ul></li></ul></li>

<li>Basic HTML: <code>item.html</code><br>
[Later: What about themes? Have a choice of possible HTML documents,
and some way of skinning them (more than CSS can manage, I suppose;
maybe have template stanza (with particular <code>id</code> and CSS to
make it generally invisible) which then gets replicated "n" times.]<br>

<ul>
<li>html<ul>
 <li>head<ul>
  <li>title...</li>
  <li>style...<br>as above</li>
 </ul></li>
 <li>body<ul>
  <li>div id=template...<br>(see above)</li>
  <li>div id=target...<br>(empty on load; gets added to)</li>
 </ul></li>
</ul></li>

</ol>
<b>ALSO NEED TO WRITE UP:</b> Themes (partly done). Setup wizard.

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>