Session scoped objects

49 views
Skip to first unread message

Artem Smirnov

unread,
May 17, 2012, 9:06:23 AM5/17/12
to fubumv...@googlegroups.com
Dearest All,

How would you create/register/use objects scoped to the user's session? 10 years ago, you would write something like Session["stuff"] = myObject;. How do you do it in Fubu?

Thanks.. 

Dru Sellers

unread,
May 17, 2012, 9:15:25 AM5/17/12
to fubumv...@googlegroups.com
You could use a binder.
Put a type on your input model and then when model binding occurs it could suck it out of the session.

-d

--
You received this message because you are subscribed to the Google Groups "FubuMVC Development Group" group.
To view this discussion on the web visit https://groups.google.com/d/msg/fubumvc-devel/-/Z35UPZ8WbmsJ.
To post to this group, send email to fubumv...@googlegroups.com.
To unsubscribe from this group, send email to fubumvc-deve...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/fubumvc-devel?hl=en.

Artem Smirnov

unread,
May 17, 2012, 9:19:25 AM5/17/12
to fubumv...@googlegroups.com
So, there's no built-in support in Fubu? I guess it's easier to register it via StructureMap then..


On Thursday, May 17, 2012 5:15:25 PM UTC+4, Dru wrote:
You could use a binder.
Put a type on your input model and then when model binding occurs it could suck it out of the session.

-d

On Thu, May 17, 2012 at 8:06 AM, Artem Smirnov <uluho...@gmail.com> wrote:
Dearest All,

How would you create/register/use objects scoped to the user's session? 10 years ago, you would write something like Session["stuff"] = myObject;. How do you do it in Fubu?

Thanks.. 

--
You received this message because you are subscribed to the Google Groups "FubuMVC Development Group" group.
To view this discussion on the web visit https://groups.google.com/d/msg/fubumvc-devel/-/Z35UPZ8WbmsJ.
To post to this group, send email to fubumv...@googlegroups.com.
To unsubscribe from this group, send email to fubumvc-devel+unsubscribe@googlegroups.com.

Dru Sellers

unread,
May 17, 2012, 9:22:12 AM5/17/12
to fubumv...@googlegroups.com
What are you expecting?

I personally think this is pretty awesome. :)

-d

To view this discussion on the web visit https://groups.google.com/d/msg/fubumvc-devel/-/SztUQgrKjHkJ.

To post to this group, send email to fubumv...@googlegroups.com.
To unsubscribe from this group, send email to fubumvc-deve...@googlegroups.com.

Jon Canning

unread,
May 17, 2012, 9:33:30 AM5/17/12
to fubumv...@googlegroups.com
I'm using IRequestDataProvider

Michael Murray

unread,
May 17, 2012, 9:44:46 AM5/17/12
to fubumv...@googlegroups.com
There is ISessionState:


It's used much like IFubuRequest object where you get/set objects by type, rather than hard-coded string keys.

There's also IFlash:


This is designed for scenarios where you want to only put something on the Session temporarily, where after you retrieve the value once it is removed from the Session. 

Joey

unread,
May 17, 2012, 9:46:08 AM5/17/12
to fubumv...@googlegroups.com
Check out IFlash interface.

Artem Smirnov

unread,
May 17, 2012, 9:51:57 AM5/17/12
to fubumv...@googlegroups.com
Thanks for all suggestions! I guess SimpleSessionState is what I need. Is it registered by default?

Michael Murray

unread,
May 17, 2012, 9:59:58 AM5/17/12
to fubumv...@googlegroups.com
Yes, it appears SimpleSessionState is already registered by default.

--
You received this message because you are subscribed to the Google Groups "FubuMVC Development Group" group.
To view this discussion on the web visit https://groups.google.com/d/msg/fubumvc-devel/-/-p9xlfWG0x4J.
Reply all
Reply to author
Forward
0 new messages