Re: Simple (?) Singleton Question
- From: Rob Wilkerson <r.d.wilkerson@xxxxxxxxx>
- Date: Thu, 15 Nov 2007 14:06:45 -0800 (PST)
On Nov 14, 11:25 pm, Jerry Stuckle <jstuck...@xxxxxxxxxxxxx> wrote:
Rob Wilkerson wrote:
Rob,
One of the things you may be missing is that web pages are basically a
transactional request system. That is, the client calls a web page.
That page opens the resources it needs, fetches them and closes the
resources. The web page (transaction) then ends (and frees all resources).
The next page is another transaction and needs to do it's thing, also.
This is very different from batch programs which can keep resources
available across requests to the UI. Those are running all the time,
and can maintain resources across multiple requests.
It's a different style of programming, and if you're used to writing
batch programs, it takes a bit of getting used to the differences.
I'm familiar with the stateless nature of the web, but am admittedly
from a ColdFusion background where an application server was
involved. I could created a singleton and store it in the application
scope for persistence in memory and, in that way, ensure that I really
*was* returning the same instance. I'm learning. :-)
.
- Follow-Ups:
- Re: Simple (?) Singleton Question
- From: Radek N.
- Re: Simple (?) Singleton Question
- References:
- Simple (?) Singleton Question
- From: Rob Wilkerson
- Re: Simple (?) Singleton Question
- From: ZeldorBlat
- Re: Simple (?) Singleton Question
- From: Rob Wilkerson
- Re: Simple (?) Singleton Question
- From: Michael Fesser
- Re: Simple (?) Singleton Question
- From: Rob Wilkerson
- Re: Simple (?) Singleton Question
- From: Jerry Stuckle
- Simple (?) Singleton Question
- Prev by Date: Uploads and mime type
- Next by Date: Re: Storing file information in memory
- Previous by thread: Re: Simple (?) Singleton Question
- Next by thread: Re: Simple (?) Singleton Question
- Index(es):
Relevant Pages
|