Re: when to save shopping basket for registered and anonymous users?

2008-06-12 Thread Marcus Mattila
Hi!

Simply because I don't want to do an if - else everytime an Object is
added to the Basket. Basket can consist of many different Domain
Objects.

-Marcus


On Wed, Jun 11, 2008 at 10:51 PM, Martin Makundi
<[EMAIL PROTECTED]> wrote:
> Hi!
>
> Why do you want to save the basket at a specific technical occurrence
> such as .detach?
>
> If you want, you can always persist changes for a "registered" user
> and on the other hand "never" persist them for "anonymous" users.
>
> Whenever the anonymous user becomes "registered" -> the basket is persisted.
>
> **
> Martin
>
> 2008/6/11 Marcus Mattila <[EMAIL PROTECTED]>:
>> Hi!
>>
>> We are developing a shopping basket in our Wicket application. We
>> would like to persist the basket as late as possible, and for
>> anonymous users only if they sign up to the service. We don't want to
>> save lots of anonymous Baskets to the database. We use Wicket 1.3.3
>> and Databinder (as a Hibernate "bridge"). What would be a good save
>> point for the Basket-object?
>>
>> One potential solution is this:
>> Override Session.detach() and save Basket there, if user is registered
>> and Basket is dirty..
>> If user is anonymous, save when user has signed up and the User
>> -domain object is created.
>>
>> Possibly in the next version:
>> For anonymous users, create a cookiebased solution Amazon-style.
>>
>> Any glaring holes in our solution? Other ways of fulfilling this need?
>>
>> br,
>> Marcus
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Re: when to save shopping basket for registered and anonymous users?

2008-06-11 Thread Martin Makundi
Hi!

Why do you want to save the basket at a specific technical occurrence
such as .detach?

If you want, you can always persist changes for a "registered" user
and on the other hand "never" persist them for "anonymous" users.

Whenever the anonymous user becomes "registered" -> the basket is persisted.

**
Martin

2008/6/11 Marcus Mattila <[EMAIL PROTECTED]>:
> Hi!
>
> We are developing a shopping basket in our Wicket application. We
> would like to persist the basket as late as possible, and for
> anonymous users only if they sign up to the service. We don't want to
> save lots of anonymous Baskets to the database. We use Wicket 1.3.3
> and Databinder (as a Hibernate "bridge"). What would be a good save
> point for the Basket-object?
>
> One potential solution is this:
> Override Session.detach() and save Basket there, if user is registered
> and Basket is dirty..
> If user is anonymous, save when user has signed up and the User
> -domain object is created.
>
> Possibly in the next version:
> For anonymous users, create a cookiebased solution Amazon-style.
>
> Any glaring holes in our solution? Other ways of fulfilling this need?
>
> br,
> Marcus
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



when to save shopping basket for registered and anonymous users?

2008-06-11 Thread Marcus Mattila
Hi!

We are developing a shopping basket in our Wicket application. We
would like to persist the basket as late as possible, and for
anonymous users only if they sign up to the service. We don't want to
save lots of anonymous Baskets to the database. We use Wicket 1.3.3
and Databinder (as a Hibernate "bridge"). What would be a good save
point for the Basket-object?

One potential solution is this:
Override Session.detach() and save Basket there, if user is registered
and Basket is dirty..
If user is anonymous, save when user has signed up and the User
-domain object is created.

Possibly in the next version:
For anonymous users, create a cookiebased solution Amazon-style.

Any glaring holes in our solution? Other ways of fulfilling this need?

br,
Marcus

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