Of course an orphaned item will sit for a while in the session. But
does not this work the same in desktop apps too? Even worse, in
pessimistic systems when you start editing you lock the record. Then
you go have your coffee to piss off colleague who needed the same
record ;-)

In my case only one item sits in the session. If it makes user
experience better and my programming easier, let it sit there. The
good thing is that this is only a memory object, a new one, database
was not called yet. And if the user won't store changes, database
never will be called (well, maybe to generate PK, yes, it will). Also,
if you "exit" from item editing to the item list, item is invalidated
and disposed. So, the only chance to leave it hanging is if the user
wanders off while "Edit Item" window is opened.

Also, I create only one instance of a "current item" for create/edit
process (per session), so at most I will have one item in the session.
No biggie. Microsoft uses extensive approach all the time and it pays.
Who remebers that Win95 needed only 4 megs?

Michael.

On 4/25/05, Adam Hardy <[EMAIL PROTECTED]> wrote:
> On 25/04/05 17:03&nbsp;Michael Jouravlev wrote:
> > On 4/25/05, Ted Husted <[EMAIL PROTECTED]> wrote:
> >
> >>>in my sample CRUD application i have editAction, which displays an
> >>>item in HTML form. It takes item ID as parameter. This action is
> >>>mapped, it can be called directly from a page using link, like
> >>>editAction.do?ID=1234. Another way to call it is to call it from
> >>>createAction, which creates new item, assigns in ID to it, and
> >>>redirects to editItem with ID attached to the URL as query parameter.
> >>>Is this chaining?
> 
> One disadvantage of this approach is that your app will create orphaned
> items whenever a user abandons the create process after hitting the
> create menu option. Your app will create a new item immediately, but the
> user may wander off and go to lunch without actually using it.
> 
> Well, I might. ;)
> 
> Adam

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to