#1 and #4 are related. In the OnRequestStart method, which is called
at the beginning of each new event, the UserController checks to see
if there's a UserRecord in the session scope, and if not, it puts one
there. It then places that UserRecord into the event.  This allows the
rest of your application to be able to access the session-resident
UserRecord without caring where it comes from. Take a look at the
ScopeFacade.cfc and you'll see the advantages to using it instead of
direct scope access. It's much easier to provide locking when you only
have to do it in one place.

The underscore before the method names is a convention in many
programming languages. Underscores are often used to identify private
or reserved method and variable names. It is also to help avoid
accidental overriding of those methods and variables.

Good luck,
- Ken

On 3/14/06, Joshua Scott <[EMAIL PROTECTED]> wrote:
> I know these may be newbie questions - but I am just trying to get my brain
> around the way this works.
>
> Thanks,
>
> Josh
>
>   _____
>
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joshua
> Scott
> Sent: Monday, March 13, 2006 4:52 PM
> To: [email protected]
> Subject: [Reactor For CF] A few MG / Reactor Questions - Newbie Alert!
>
>
> Doug (or whoever),
>
> I have a few questions. I am reading through the Reactor Blog login code and
> have a few questions.
>
> 1. From UserController.cfc you call DoValidateLogin which creates a
> UserRecord variable as follows:
>
> <cfset var UserRecord = arguments.event.getValue("UserRecord") />
>
> My first question is how is there a UserRecord object already in the event?
> I have not found it instanciated anyplace yet.
>
>
> 2. Then you do the following: <cfset
> arguments.event.makeEventBean(UserRecord)
>
> Is makeEventBean() a core MG function? If so what exactly does it do?
>
>
> 3.  In UserRecordmssql.cfc the login function create an instance of
> UserGateway as follows:
>
> <cfset var UserGateway = _getReactorFactory().createGateway(_getName()) />
>
> The question is what significance does the underscore "_" have in
> _getReactorFactor() and _getName()?
>
>
> 4. And this maybe the most newbie question of the bunch.... What is the
> purpose of creating the scope facade?
>
>
> Thank you for the help.
>
>
> Josh
>
>
>
>
> -- Reactor for ColdFusion Mailing List -- [email protected]
> -- Archives at http://www.mail-archive.com/reactor%40doughughes.net/
>
>


--
 Quidquid latine dictum sit, altum sonatur.
- Whatever is said in Latin sounds profound.



-- Reactor for ColdFusion Mailing List -- [email protected]
-- Archives at http://www.mail-archive.com/reactor%40doughughes.net/


Reply via email to