Re: Direct Action vs. Component Action...
Re: Direct Action vs. Component Action...
- Subject: Re: Direct Action vs. Component Action...
- From: Deepak Nulu <email@hidden>
- Date: Thu, 27 Jul 2006 09:23:55 -0700
Hi David,
Thanks for your quick response (and for your articles in your blog).
I did learn from your articles that direct actions have static
bookmarkable URLs.
But I was wondering if:
(1) I did not need static bookmarkable URLs, and
(2) I needed a session to track user state, and
(3) I am using WOComponent objects to create the web pages, and
(4) the site would have a lot of users at the same time,
then which would be more efficient (from a scalability standpoint):
component actions or direct actions?
And for the same 4 "requirements" of the site, my other question was
whether I need a session object if all I want to do is make sure that
the user is a registered user. Or can the HTTP server take care of
this. If the answer is either, which is better (again from a
scalability standpoint)?
Thanks.
deepak
On Jul 27, 2006, at 6:47 AM, David LeBer wrote:
On 26-Jul-06, at 11:11 PM, Deepak Nulu wrote:
Hi,
The first part of David LeBer's articles on Direct Actions (http://
david.codeferous.com/?p=63) says the following about component
actions:
"each visitor will receive a relatively heavyweight Session
object, so they may not be appropriate if you expect a lot of
visitors and/or you do not need to track their state. Direct
Action are designed for these situtations."
So if I have a direct action which (1) requires a session object,
and (2) returns a WOComponent object, will it be as heavy weight
as a component action? If not, what is it that makes component
actions relatively heavyweight?
If I have a site where multiple things can be accessed via direct
actions, and if I want some of these things to be available only
to registered users, would I need a session object for these
direct actions?
Deepak,
To be clear, DirectActions have two primary differences between
ComponentActions:
1. They have static (bookmarkable) URLs.
2. The use of a Session is optional.
Sessions are not bad, there are just times when you do not need
one, so why incur the expense? If you need to track user state, a
Session is an easy way to do that and for most applications that's
where it ends.
--
;david
--
David LeBer
Codeferous Software
'co-defer-ous' adj. producing or containing code
site: http://www.codeferous.com
blog: http://david.codeferous.com
--
Toronto Area Cocoa / WebObjects developers group:
http://www.tacow.org
_______________________________________________
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