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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
Cheetah TODO list
-----------------
* If you are working on a task please put your initials at the end of the
description
* When a task is completed please remember to note it in the CHANGES file
Languague Specification
================================================================================
- decide if #extends should continue to work with multiple inheritance or if we
should delegate multiple inheritance (mixins, etc.) to pure Python base
classes.
- revisit parsed #include directives. Are they necessary at all??
(This is a rhetorical question. They are necessary. However, the
Users' Guide needs better examples about when and when not to use
#include. Also, consider making '#include' do a raw include, and
something else do a parsed include ('#include parsed', '#include cheetah'?),
so that users get parsing only if they explicitly request it.
- finish the #cache directive's varyBy keyword
- write a formalized grammar for Cheetah in BNF
Implementation
================================================================================
- implement some better error handling for misformed #for, #if, #try directives,
etc. At the moment these errors are not caught until Python executes the
code.
- implement the automatic importing behaviour for the #extends directive
- redesign and implement the Servlet Factory for Webware so the #extend
directive will work with .tmpl files as well as .py files. This will require
a custom import method using python import hooks.
- implement the #cache directive's varyBy keyword
- Remove the -w option from 'cheetah compile'. New command 'cheetah fill'
replaces the -w switch and more: it fills the template into *.html, another
extension or stdout. It accepts the -R (recurse), -p (to stdout) and
-v (verbose) options of 'cheetah compile', and the '-e/--env' and
'-p/--pickle' options of .py template modules. Note the conflict between
-p (stdout) and -p (pickle); we'll have to rename -p (stdout) to something
else, both in 'cheetah fill' and 'cheetah compile'.
- Make template filling more thread safe. .__init__ initializes self.mutex.
.respond acquires lock at beginning, and unlocks at end. Do not compile the
template without acquiring the lock. Remember to unlock in a try/finally
clause in case there's an exception.
This will not be completely sufficient. If the user changes a 'self'
variable or searchList variable, it will leak into the other threads. How
to avoid this while still giving multithreaded applications the benefit of
Cheetah caching? Add a second mutex the threads can explicitly lock before
setting their variables? This could affect performance if the threads take
a long time to do that.
- 'python setup.py uninstall'. This may require hacking an uninstall feature
into distutils.
- Delete whitespace before comments. If the rest of the line consists
of only non-outputting directives and whitespace, delete the line from the
output. The only outputting directives I see are #echo, #block and
#include.
Test Suite
================================================================================
- test cases for the SkeletonPage framework
- add cases that test the cheetah-compile script
- add cases that test the integration with WebKit. Since these must be called
from a running WebKit server, make a servlet that runs the tests and outputs
diagnostics to the browser.
Documentation
================================================================================
- more examples in the Webware section (MO)
- more examples/advice all over the Users' Guide about recommended/
non-recommended strategies (MO)
- developers' guide (MO)
- beginners guide
- quick reference for template maintainers (MO - someday)
- HOWTOs (somebody offered to make some)
Website
================================================================================
- automate the documentation update
- See if we can get WebKit working on Sourceforge...
Examples
================================================================================
- create some non-html code generation examples
- SQL
- LaTeX
- form email
|