summaryrefslogtreecommitdiff
path: root/TODO
diff options
context:
space:
mode:
authorhierro <hierro>2003-12-17 10:17:04 +0000
committerhierro <hierro>2003-12-17 10:17:04 +0000
commit5329f6344e0f1c6b9893d9b1999c094fa6c5a0d1 (patch)
tree3ce59fa72fb1e1bd21c9cb3a36223f801771be68 /TODO
parent9f5ff684c0117e7257c9fe0ac19a1b8c88b69c92 (diff)
downloadpython-cheetah-5329f6344e0f1c6b9893d9b1999c094fa6c5a0d1.tar.gz
*** empty log message ***
Diffstat (limited to 'TODO')
-rw-r--r--TODO47
1 files changed, 47 insertions, 0 deletions
diff --git a/TODO b/TODO
index 24e95aa..84a169b 100644
--- a/TODO
+++ b/TODO
@@ -352,3 +352,50 @@ Examples
database? Caching template classes and/or instances extracted from
a database.
- Pickled templates?
+
+
+CheetahX: pie-in-the-sky
+========================================================================
+These ideas are being considered for Cheetah 2.0.
+
+- There are five distinct objects in Cheetah which should have a clearer
+ separation.
+
+ 1. TEMPLATE DEFINITION: a string.
+ 2. TEMPLATE METHOD: the method that implements the desired template
+ (which may be the Main Method or a #def/#block method). This is
+ inside the generated class, which is inside the generated module.
+ 3. DATA: the searchList, local variables, current filter, etc. Everything
+ that changes at runtime.
+ 4. INFRASTRUCTURE: the internal code used by Cheetah to fill and maintain the
+ template.
+ 5. SERVICES: convenience methods from the infrastructure exposed to user.
+
+ Cheetah combines 2-5 into a single Template subclass. CheetahX proposes to
+ keep these distinct, with defined containment and interfaces between them.
+
+- The TEMPLATE METHOD might instantiate an INFRASTRUCTURE object for each
+ fill. The constructor arguments would be everything necessary to access
+ the DATA. Perhaps the TEMPLATE METHOD can pass its own code block, making
+ its own locals/globals accessible directly. This would be a bit
+ unorthodox, but less so than the current practice of switching the
+ template instance's class on the fly.
+
+- For SERVICES, add a custom object to the searchList that knows how to
+ access the protected INFRASTRUCTURE data.
+
+- Push more work into INFRASTRUCTURE, to insulate the TEMPLATE METHOD from
+ implementation changes. For instance, replace every placeholder lookup
+ with a simple INFRASTRUCTURE method call, and let the infrastructure
+ do all the processing. (It can use the code block mentioned above to
+ access the searchList and current filter.) For local variable
+ lookups, you can call another method and pass the value directly.
+ For caching, I guess you pass in the cache time (or a special constant)
+ as a separate argument, and let the INFRASTRUCTURE maintain the cache.
+
+- Tavis wants to rewrite the cache infrastructure and fully implement it.
+
+- The Template class needs to be split up into stuff nececssary to fill
+ a template (the INFRASTRUCTURE), and stuff necessary to comple a template
+ (which is not necessary for using precompiled templates, and slows down
+ Cheetah's import time).