Thanks for your comments, Clark.

I'd argue for putting Application.getDbConnection() in the core
as follows:
- putting it in SitePage makes it inaccessible
  to code that doesn't subclass SitePage.
  For example, I keep WebKit session data in a postgresql database,
  and the code to implement that is unrelated to SitePage.
  The pool is logically part of the application, not the Page servlet.
- cleaning up DB connections at exit time is more awkward
  when subclassing SitePage.  I guess you can do it with atexit,
  but it's messy, and some people won't bother.
- it took me a little fiddling around to figure out the best way
  to do pooling connections, and I imagine others will
  waste time reinventing the same thing. 
  Providing an application-wide connection pool with proper
  cleanup at exit fills a very common developer need,
  and is appropriate for the core.

> From: "Clark C . Evans" <[EMAIL PROTECTED]>
> To: Ken Lalonde <[EMAIL PROTECTED]>
> Subject: Re: [Webware-discuss] A few patches
> 
> Ken Lalonde wrote:
> | * WebKit/Application.py:
> |     New method: getDbConnection()
> 
> This is interesting, but I'm not sure that it should
> be added to the core of WebKit since it is certainly
> easy enough to add in one's SitePage.py
> 
> Your other changes sound good.  

_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to