I've been playing with webware for a while now and I just sat down to do a serious
project with it (thats the best way to learn I
think)
I have a number of basic questions that relate to 'the best way to do things'
(By the way I find the numerous Easterbrook "this is how I do it" posts invaluable)
Object Persistance
Take DBPool for example
I can put
datapool = DBPool(PgSQL, 5, '192.168.0.10::comsci:aaron:thisisnotmyrealpass')
into a module called config and
in a webware servlet write:
from config import datapool
Then does the datapool get reinitialized every page?
If it does not then is datapool a application level object or a context level one?
How can I use __init__.py to initialize the database connection?
can I just import config from __init__.py
I used MakeAppWorkDir.py (thanks for editing the oneshot webware path in that script!)
where do I put site specific vs module specific modules?
So I have an application with two contexts. There is a common user login, but each
context is a different type of program
for example:
workDir/
SupportPackages/
Global/
config.py
UserManagerToSQL.py
User.py
Bill/
BillConfig.py
Bill.py
BillFactory.py
Report/
SQLBuilder.py
Report.py
DBSelector.py
Bill/ -> one context
main.py
Report/ -> other context
main.py
I would like the modules in global, and the config.py to be available to any context
in the app (is this a plug in?)
I would like the module Bill to be available to context Bill w/ BillConfig already
initiaized
The same for Report
Once I figure this all out I'll write a tutorial based on this application.
Thanks again,
-Aaron Held
http://www.metrony.com
===================================================================
As Isaac Newton would say now:
If I see further than others, it is because I stand on
the shoulders of giants too dumb to patent their discoveries.
(Gregory Palast, http://www.observer.co.uk/ )
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss