11 Feb 2011, 00:47
Generic-user-small

chris (1 post)

Hi Dan,

I’m trying to create a simple shopping web app. What is the best way to create a new shopping cart object for every new session without the client having to log in first?

Thanks, Chris

06 Mar 2011, 18:45
Danhaywood-2011-282x282_pragsmall

Dan Haywood (131 posts)

Hi Chris, First off, apologies for my tardy response.

To answer your question, it’s a bit embarrassing that this is such an obvious question that I didn’t address in the book. What’s even more embarrassing is that I’m not entirely sure I have an obvious answer for you, because it’s likely to “depend”.

It certainly is possible to logon without a password, because you’ll get that behaviour (at least with some of the viewers such as the HTML viewer) if running in exploration mode. It comes down to the interplay between the AuthenticationManager configured along with the DeploymentType (exploration mode etc) and also which viewer is in use.

As you’re probably aware, the Naked Objects framework is now part of Apache and is in the incubator as Apache Isis. There was a question on the isis-dev mailing list recently about a similar requirement which I answered (http://mail-archives.apache.org/mod_mbox/incubator-isis-dev/201103.mbox/%3C4D6CA565.9060100@gmail.com%3E).

We definitely need to have a better and more coherent answer to this. Perhaps you could start by posting your question again over on isis-dev. It’ll probably be me who picks up the question, but we could start by addressing your concrete situation (ie which viewer etc) and then work through a solution from there.

Sorry it’s not just a “one-liner” fix for you, though.

Cheers Dan

17 Mar 2011, 18:11
Danhaywood-2011-282x282_pragsmall

Dan Haywood (131 posts)

As a quick update to this thread, I’ve recently added support for the wicket viewer (within Apache Isis) to allow for anonymous sessions. This is close to what you were asking for, though no doubt could be extended further.

The scimpi viewer in Isis also has support for anonymous sessions, I think (though I’m less familiar with that part of the codebase).

Anyway, do check it out.

Dan

  You must be logged in to comment