[go: up one dir, main page]

Menu

[r1]: / doc / Internals.txt  Maximize  Restore  History

Download this file

57 lines (37 with data), 2.8 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
====== Internals ======
Created Sunday 12/08/2007
This is a program for developing document-based web sites. Read the [[Technical overview|technical overview]] before this page.
[[About]] main page for documentation
[[User_documentation_notes|User documentation notes]]
[[To_do|To do]] list
[[Other software used]]
===== Structure =====
The program has the following structure.
The site developer creates a schema file that describes the site, and then runs the program generator that creates the site. The developer then needs to deploy the generated code onto their web site.
The program code also contains some tests. The first set of tests check the program generator and the second set check the generated sites.
===== Components =====
The program contains the following parts.
==== Tests ====
* **First set of tests** -- [[../html/tests/test1.pl.html|tests/test1.pl]] checks the program generator.
* **Second set of tests **-- [[../html/tests/test2.pl.html|tests/test2.pl]] checks the generated sites.
* **Test of the persistence generator** -- [[../html/tests/PersistGenTest.pm.html|tests/PersistGenTest.pm]] should test something.
* test.sh -- Runs the tests.
* tests/schema.xml -- The schema for the site in the test set.
==== Main program ====
* **Site maker** -- [[../html/src/makesite.pl.html|src/makesite.pl]] This generates a site from a schema file. Basically calls the program generator module.
* **Program generator **-- The code generator is mainly in [[../html/src/ProgGen.pm.html|src/ProgGen.pm]]. This is most of the code.
==== Templates ====
* **Persistence template** -- The persistence code for a document (to save and retrieve the documents) is in [[../html/src/perlpers.tmpl.html|src/perlpers.tmpl]].
* **Web template** -- The web interaction code for a document is in [[../html/src/perlweb.tmpl.html|src/perlweb.tmpl]].
* **Web main page** -- The main page used by the test web site is [[../html/cgi-bin/test.pl.html|cgi-bin/test.pl]].
* **Document class template** -- The main code for a document is in [[../html/src/perldoc.tmpl.html|src/perldoc.tmpl]].
* **Main template** -- The main code for the site is generated from the [[../html/src/perl.tmp.html|src/perl.tmp]]l.
===== Other files =====
* podmaker.sh -- Creates this documentation
* src/documentschema.dtd -- The document schema for the description of the website.
* makesite.pl -- Probably should be deleted.
* save.sh -- Utility script that reformats the source code and saves it to Subversion.
* deploy.sh -- Used to deploy generated code to the (test) website.
* dump.txt -- This is a dump of the schema for the site in the test set, as read by Perl.
* data/* -- The data directory is used for test data.
Good test URL: http://localhost/cgi-bin/main.pl/testx?type=project