HHmmm...

What if I just create a ReportManager object, which in turn creates a
report object, determines the scope it needs to resides in and just
hands back the reference to it...and I make my calls as usual...?

Stace

-----Original Message-----
From: Stacy Young
Sent: October 14, 2003 4:51 PM
To: [EMAIL PROTECTED]
Subject: [CFCDev] Where to throw object into session scope...


Hi folks,

I've been looking at how to best implement persistence in my recent
reporting engine project. It seems the most effective (and by chance the
easiest to implement) way is to just throw the main Report object into
session scope. (I need persistence to support paging in html output)

My question is...should the logic of "knowing whether to add the report
object to session scope" reside in a "ReportManager" of sorts?

I'm confused though as to how I would invoke a Report object, should all
my calls go thru the Manager? Do I have to duplicate all the methods in
the Manager?

This is what I'm doing now - Example:

// Create a dataset - essentially a query or stored proc
myDataset = CreateObject("component","Dataset").init( myQueryFileTarget,
myDatasource);

// Create report and add dataset to it - can contain multiple datsets
myReport = CreateObject("component","Report").init();
myReport.addDataset( myDataset );
myReport.setTitle("Bogus Report Name Here");

// This causes all datasets to populate via their queries
myReport.execute();


But sometimes I need to do the following...but I don't want to have the
session manipulation performed outside of the model:


// Create a dataset - essentially a query or stored proc
myDataset = CreateObject("component","Dataset").init( myQueryFileTarget,
myDatasource);

// Create report and add dataset to it - can contain multiple datsets
Session.myReport = CreateObject("component","Report").init();
Session.myReport.addDataset( myDataset );
Session.myReport.setTitle("Bogus Report Name Here");

// This causes all datasets to populate via their queries
Session.myReport.execute();


As always, appreciate ur insight

Stace



AVIS IMPORTANT:
-------------------------------
Les informations contenues dans le present document et ses pieces
jointes sont strictement confidentielles et reservees a l'usage de la
(des) personne(s) a qui il est adresse. Si vous n'etes pas le
destinataire, soyez avise que toute divulgation, distribution, copie, ou
autre utilisation de ces informations est strictement prohibee. Si vous
avez recu ce document par erreur, veuillez s'il vous plait communiquer
immediatement avec l'expediteur et detruire ce document sans en faire de
copie sous quelque forme.

WARNING:
-------------------------------
The information contained in this document and attachments is
confidential and intended only for the person(s) named above. If you are
not the intended recipient you are hereby notified that any disclosure,
copying, distribution, or any other use of the information is strictly
prohibited. If you have received this document by mistake, please notify
the sender immediately and destroy this document and attachments without
making any copy of any kind.

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev'
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[EMAIL PROTECTED]



AVIS IMPORTANT:
-------------------------------
Les informations contenues dans le present document et ses pieces jointes sont 
strictement confidentielles et reservees a l'usage de la (des) personne(s) a qui il 
est adresse. Si vous n'etes pas le destinataire, soyez avise que toute divulgation, 
distribution, copie, ou autre utilisation de ces informations est strictement 
prohibee. Si vous avez recu ce document par erreur, veuillez s'il vous plait 
communiquer immediatement avec l'expediteur et detruire ce document sans en faire de 
copie sous quelque forme.

WARNING:
-------------------------------
The information contained in this document and attachments is confidential and 
intended only for the person(s) named above. If you are not the intended recipient you 
are hereby notified that any disclosure, copying, distribution, or any other use of 
the information is strictly prohibited. If you have received this document by mistake, 
please notify the sender immediately and destroy this document and attachments without 
making any copy of any kind.

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev'
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to