Re: Concurrent request handling
Re: Concurrent request handling
- Subject: Re: Concurrent request handling
- From: Andrew Lindesay <email@hidden>
- Date: Thu, 07 Apr 2011 22:13:37 +1200
Hi Xavier;
I would suggest not putting the formatter in the EO class because the EO
is model layer and the formatter really belong as part of the display
logic -- blurring the two eventually ends up causing design problems in
the long-haul.
I think in the past when faced with this situation, I added accessors to
the components' controllers' super-class which then "gets or creates" a
formatter for a particular purpose (data quantity format / timestamp /
currency etc...) which is cached in the "user info" in the WOContext
instance for the current request-response cycle. This approach allows
you to re-use the formatters for the request-response cycle and then
just allows them to be garbage collected at the end of the cycle.
cheers.
Sorry to jump into this to add another question:)
But I would have expected the formatter to not be an issue as it's not
actually writing data.
If you have a stateless app (like full of DA), how would you handle that
as you can actually put the formatter in Session?
Do you have to put the formatter inside the EO class?
--
Andrew Lindesay
www.silvereye.co.nz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden