Reactor only deals with communications with the DB, it doesn't care
about sessions and won't help you handle them in anyway.
Having said that, your application logic can use Reactor objects for
authentication or whatever, exactly as you described.
onSessionStart
<cfset session.user = application.reactor.createRecord('user')>
successful login event
<cfset session.user.load(userid=1)>
This does mean that, for example, if someone updates their profile, you
need to reload the user in the session scope to reflect the changes.
I'm not sure if storing lots of UserRecords in sessions might be bad for
the performance of the server, especially if you have lots of concurrent
sessions. I don't have any problems with it, but my sites are generally
for small intranets with only a handful of concurrent sessions.
I'd be interested to see how people writing large sites with Reactor
handle this.
HTH
Cheers, Chris
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of David Phipps
> Sent: 24 July 2007 12:45
> To: [email protected]
> Subject: [Reactor for CF] Handling sessions
>
> Hi,
>
> I am in the process of building my first app using reactor
> (with fusebox
> 5.1) and I am just testing the water. The app requires initial login
> with the user added to the session scope.
>
> I have looked through the docs and done a quick google search
> but how do
> I handle the session with reactor?
>
> Is it as simple as creating the user record and assigning it to a
> session scoped variable?
>
> e.g
> <cfset session.user =
> application.reactor.createRecord('user').load(userid=1)>
>
> or is there a better/different way to handle this?
>
> Many thanks,
>
> Dave
> --
>
> ______________________________________________________________
> _________
> David Phipps, Director
> [EMAIL PROTECTED]
>
> Chapel Studios / London
> T +44 (0)20 7100 6980 F +44 (0)20 7100 6981 M +44 (0)7931 375040
> New Broad Street House, 35 New Broad Street, London, EC2M 1NH, UK
>
> Visit our website: http://www.chapel-studios.co.uk
>
> ______________________________________________________________
> _________
>
> Chapel Studios is a limited company registered in England. The
> information in this email is confidential, intended
> solely for the
> addressee, and may be legally privileged. If you are not
> the addressee
> or authorized to receive this for the addressee, you
> must not use,
> copy,
> disclose or take any action based upon this message or
> any information
> herein. If you have received this message in error, please advise
> the sender immediately by reply e-mail.
>
>
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> -- -- -- -- -- -- --
> Reactor for ColdFusion Mailing List
> [EMAIL PROTECTED]
> Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> -- -- -- -- -- -- --
>
>
>
>
>
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[EMAIL PROTECTED]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --