Debian Codegraph @

tutorial/web_start.html

raw symbols SCIP
1
2 <HTML>
3 <!--
4 ***********************************************************************
5 FUNNELWEB MANUAL WEB PAGE
6 =========================
7 Copyright (c) Ross N. Williams 1992,1999. All rights reserved.
8
9 Permission is granted to redistribute and use this manual in
10 any medium, with or without modification, provided that all
11 notices (including, without limitation, the copyright
12 notice, this permission notice, any record of modification,
13 and all legal notices) are preserved on all copies, that all
14 modifications are clearly marked, and that modified versions
15 are not represented as the original version unless all the
16 modifications since the manual's original release by Ross N.
17 Williams (www.ross.net) consist of translations or other
18 transformations that alter only the manual's form, not its
19 content. THIS MANUAL IS PROVIDED "AS IS" AND WITHOUT ANY
20 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
21 LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND
22 FITNESS FOR A PARTICULAR PURPOSE. TO THE EXTENT PERMITTED BY
23 LAW THERE IS ABSOLUTELY NO WARRANTY.
24
25 ***********************************************************************
26 -->
27
28 <HEAD>
29 <TITLE>7.2 Getting Started</TITLE>
30 <STYLE TYPE="text/css"> <!-- A {text-decoration: none} // --> </STYLE>
31 </HEAD>
32 <BODY BACKGROUND="binary/background.gif"
33 BGCOLOR="#FFFFFF"
34 TEXT="#000000"
35 VLINK="#660000"
36 LINK="#FF0000"
37 ALINK="#CC0000">
38
39 <TABLE WIDTH="490">
40 <TR>
41 <TD WIDTH="130" VALIGN="top">
42 <IMG SRC="binary/d_clear.gif" ALT="" WIDTH="130" HEIGHT="1"><BR>
43
44 <FONT SIZE="2">
45 <BR>
46
47 <A HREF="http://www.ross.net/"
48 TARGET="rosshome"
49 onClick="window.open('','rosshome','location,status,menubar,scrollbars,resizable',false).focus(); return true;"
50 >
51 <IMG SRC="binary/rossnet_logo.gif"
52 WIDTH="64" HEIGHT="32"
53 BORDER="0" ALT="RossNet"
54 HSPACE="0" VSPACE="1"></A><BR>
55 <BR>
56
57 <A HREF="../index.shtml"
58 TARGET="funnelweb"
59 onClick="window.open('','funnelweb','location,status,menubar,scrollbars,resizable',false).focus(); return true;"
60 >
61 <IMG SRC="binary/linklogo.gif"
62 WIDTH="64" HEIGHT="32"
63 BORDER="0" ALT="FunnelWeb"
64 HSPACE="0" VSPACE="1"></A><BR>
65 <BR>
66 <TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0><TR><TD BGCOLOR="#000000">
67 <A HREF="../reference/index.html"
68 TARGET="funnelwebreference"
69 onClick="window.open('','funnelwebreference','location,status,menubar,scrollbars,resizable',false).focus(); return true;"
70 ><FONT COLOR="#FFFFFF"><B>Reference</B></FONT></A><BR>
71 <BR>
72 <A HREF="../developer/index.html"
73 TARGET="funnelwebdeveloper"
74 onClick="window.open('','funnelwebdeveloper','location,status,menubar,scrollbars,resizable',false).focus(); return true;"
75 ><FONT COLOR="#FFFFFF"><B>Developer</B></FONT></A><BR>
76 <BR>
77 <A HREF="index.html"><FONT COLOR="#FFFFFF"><B>Tutorial</B></FONT></A><BR>
78 <A HREF="intro.html"><FONT COLOR="#FFFFFF">1 Introduction</FONT></A><BR>
79 <A HREF="macro.html"><FONT COLOR="#FFFFFF">2 Macros</FONT></A><BR>
80 <A HREF="type.html"><FONT COLOR="#FFFFFF">3 Typesetting</FONT></A><BR>
81 <A HREF="example.html"><FONT COLOR="#FFFFFF">4 Example</FONT></A><BR>
82 <A HREF="hints.html"><FONT COLOR="#FFFFFF">5 Hints</FONT></A><BR>
83 <A HREF="examples.html"><FONT COLOR="#FFFFFF">6 Examples</FONT></A><BR>
84 <A HREF="web.html"><FONT COLOR="#FFFFFF">7 Webmaking</FONT></A><BR>
85
86 <BR>
87 <A HREF="search.html"><FONT COLOR="#FFFFFF"><B>SEARCH</B></FONT></A><BR>
88 </FONT>
89 </TD></TR></TABLE>
90
91
92 </TD>
93 <TD WIDTH="360" VALIGN="top">
94 <FONT SIZE="3">
95
96
97 <A HREF="../reference/index.html"><IMG SRC="binary/title.gif"
98 WIDTH="302" HEIGHT="24"
99 BORDER="0" ALT="FunnelWeb Tutorial Manual"
100 HSPACE="0" VSPACE="0"></A>
101 <P><FONT SIZE="5">7.2 Getting Started</FONT><BR>
102
103
104 <P>This page contains a brief hands-on tutorial to get you started
105 in using FunnelWeb to make webs.
106
107 <P><BR><FONT SIZE="4"><STRONG>Hello Web</STRONG></FONT><BR>
108
109 <P>The best way to understand how FunnelWeb can help you make webs
110 is to work through a simple example. Here is one:
111
112 <P>
113 <PRE>
114 @!************************************************
115
116 @O@&lt;index.html@>@{
117 &lt;HTML&gt;
118
119 &lt;HEAD&gt;
120 &lt;TITLE&gt;Dave's Home Page&lt;/TITLE&gt;
121 &lt;/HEAD&gt;
122
123 &lt;BODY BGCOLOR=#FFFFFF&gt;
124 &lt;P&gt;Welcome to my home page. Check out my
125 &lt;A HREF="links.html"&gt;links page&lt;/A&gt;.
126 &lt;/BODY&gt;
127
128 &lt;/HTML&gt;
129 @}
130
131 @!************************************************
132
133 @O@&lt;links.html@&gt;@{
134 &lt;HTML&gt;
135
136 &lt;HEAD&gt;
137 &lt;TITLE&gt;Dave's Links&lt;/TITLE&gt;
138 &lt;/HEAD&gt;
139
140 &lt;BODY BGCOLOR=#FFFFFF&gt;
141 &lt;P&gt;Here are my links:
142
143 &lt;P&gt;
144 &lt;A HREF="http://www.yahoo.com/"&gt;Yahoo&lt;/A&gt;&lt;BR&gt;
145 &lt;A HREF="http://www.dilbert.com/"&gt;Dilbert&lt;/A&gt;&lt;BR&gt;
146 &lt;/BODY&gt;
147
148 &lt;/HTML&gt;
149 @}
150
151 @!************************************************
152 </PRE>
153
154 <P>Cut and paste the above text into a file called <SAMP>dave.fw</SAMP>
155 and run FunnelWeb on it by giving the command:
156
157 <P>
158 <PRE>
159 fw dave
160 </PRE>
161
162 <P>
163 <BLOCKQUOTE>
164 <FONT SIZE="2">
165 <STRONG>Note:</STRONG> On my computer, when you cut and paste text
166 from a web page, the pasted text contains a block of blanks
167 before each line; you will have to delete these to make the
168 example work, as FunnelWeb requires the first line of macro
169 definitions to be in column one.
170 </FONT>
171 </BLOCKQUOTE>
172
173 <P>If all goes well, FunnelWeb should write out two files
174 <SAMP>index.html</SAMP> and <SAMP>links.html</SAMP>. That's the
175 generated web, and you should be able to browse it using your
176 favorite web browser.
177
178 <P><BR><FONT SIZE="4"><STRONG>First Glimmers Of Usefulness</STRONG></FONT><BR>
179
180 <P>The sole benefit we have obtained so far is that the web
181 is represented as a single file. This confers quite a few benefits
182 on its own for medium-sized webs, such as the elimination of
183 the need to perform multiple-file search and replace operations,
184 but it's really only a start.
185
186 <P>The next step is to recognise that the two pages above share
187 quite a lot of text and that that text can be removed into FunnelWeb
188 macros.
189
190 <P>
191 <PRE>
192 @!************************************************
193
194 @$@&lt;Begin page@>@(@1@)@M@{
195 &lt;HTML&gt;
196 &lt;HEAD&gt;
197 &lt;TITLE&gt;@1&lt;/TITLE&gt;
198 &lt;/HEAD&gt;
199 &lt;BODY BGCOLOR=#FFFFFF&gt;
200 @}
201
202 @$@&lt;End page@&gt;@M@{
203 &lt;/BODY&gt;
204 &lt;/HTML&gt;
205 @}
206
207 @!************************************************
208
209 @O@&lt;index.html@&gt;@{
210
211 @&lt;Begin page@&gt;@(Dave's Home Page@)
212
213 &lt;P&gt;Welcome to my home page. Check out my
214 &lt;A HREF="links.html"&gt;links page&lt;/A&gt;.
215
216 @&lt;End page@&gt;
217 @}
218
219 @!************************************************
220
221 @O@&lt;links.html@&gt;@{
222 @&lt;Begin page@&gt;@(Dave's Links@)
223
224 &lt;P&gt;Here are my links:
225
226 &lt;P&gt;
227 &lt;A HREF="http://www.yahoo.com/"&gt;Yahoo&lt;/A&gt;&lt;BR&gt;
228 &lt;A HREF="http://www.dilbert.com/"&gt;Dilbert&lt;/A&gt;&lt;BR&gt;
229
230 @&lt;End page@&gt;
231 @}
232
233 @!************************************************
234 </PRE>
235
236 <P>Now, although the file has actually got a little longer and
237 looks far more complicated than it did, we've actually managed
238 to extract two significant benefits from this reorganization.
239
240 <P><BLOCKQUOTE><B>Page style:</B> First, almost without even
241 trying, we've created a page style. For example, to change
242 the colour of all the pages in the web, we need just change
243 the single body definition in the begin page macro.
244 Similarly, if we wanted to add a copyright notice at the
245 bottom of each page, we need change only the end page
246 macro.</BLOCKQUOTE>
247
248 <P><BLOCKQUOTE><B>Page overhead:</B> Second, we've reduced the
249 amount of text required to define each page. Instead of
250 requiring ten lines of HTML to set up each page, we need
251 just two FunnelWeb calls (two lines); the rest is text
252 particular to the page being defined.</BLOCKQUOTE>
253
254 <P>These advantages may seem minor, but when scaled up to a
255 web containing a dozen or more pages, they become very significant.
256
257 <P>The newfound power, in the case of the example, can be demonstrated
258 by changing the web from black on white to blue on white, and by adding
259 another page:
260
261 <P>
262 <PRE>
263 @!************************************************
264
265 @$@&lt;Begin page@&gt;@(@1@)@M@{
266 &lt;HTML&gt;
267 &lt;HEAD&gt;
268 &lt;TITLE&gt;@1&lt;/TITLE&gt;
269 &lt;/HEAD&gt;
270 &lt;BODY BGCOLOR=#FFFFFF TEXT=#000033&gt;
271 @}
272
273 @$@&lt;End page@&gt;@m@{
274 &lt;/BODY&gt;
275 &lt;/HTML&gt;
276 @}
277
278 @!************************************************
279
280 @O@&lt;index.html@&gt;@{
281 @&lt;Begin page@&gt;@(Dave's Home Page@)
282
283 &lt;P&gt;Welcome to my home page. Check out my
284 &lt;A HREF="links.html"&gt;links page&lt;/A&gt; and my
285 &lt;A HREF="hobbies.html"&gt;hobbies page&lt;/A&gt;.
286
287 @&lt;End page@&gt;
288 @}
289
290 @!************************************************
291
292 @O@&lt;links.html@&gt;@{
293 @&lt;Begin page@&gt;@(Dave's Links@)
294
295 &lt;P&gt;Here are my links:
296
297 &lt;P&gt;
298 &lt;A HREF="http://www.yahoo.com/"&gt;Yahoo&lt;/A&gt;&lt;BR&gt;
299 &lt;A HREF="http://www.dilbert.com/"&gt;Dilbert&lt;/A&gt;&lt;BR&gt;
300
301 @&lt;End page@&gt;
302 @}
303
304 @!************************************************
305
306 @O@&lt;hobbies.html@&gt;@{
307 @&lt;Begin page@&gt;@(Dave's Hobbies@)
308
309 &lt;P&gt;This page is under construction!
310
311 @&lt;End page@&gt;
312 @}
313
314 @!************************************************
315 </PRE>
316
317 <P>Now that you have a Hello World file to play with, the remaining
318 sections of this chapter will discuss the ways in which you can
319 use the macro power now at your fingertips.
320
321
322 <P>
323 <TABLE WIDTH="100%">
324 <TR>
325 <TD ALIGN="left" VALIGN="bottom"><A HREF="web_introduction.html"><IMG SRC="binary/fw_left.gif" HEIGHT="32" WIDTH="32" BORDER="0" ALT="Prev"></A></TD>
326 <TD ALIGN="center" VALIGN="bottom"><A HREF="web.html"><IMG SRC="binary/fw_up.gif" HEIGHT="32" WIDTH="32" BORDER="0" ALT="Up"></A></TD>
327 <TD ALIGN="right" VALIGN="bottom"><A HREF="web_messy.html"><IMG SRC="binary/fw_right.gif" HEIGHT="32" WIDTH="32" BORDER="0" ALT="Next"></A></TD>
328 </TR>
329 </TABLE>
330
331
332
333 <HR>
334 <FONT SIZE="2">
335 <A HREF="mailto:[email protected]">Webmaster</A>&nbsp;&nbsp;&nbsp;
336 <A HREF="copyright.html">Copyright &copy; Ross N. Williams 1992,1999. All rights reserved.</A><BR>
337 </FONT>
338
339 </FONT>
340 </TD>
341 </TR>
342 </TABLE>
343
344
345 </BODY>
346
347 <!-- *********************************************************************** -->
348 <!-- End Of A FunnelWeb Manual Web Page (www.ross.net/funnelweb/) -->
349 <!-- *********************************************************************** -->
350
351 </HTML>