|
Thanks, I think it did. And I think I figured out basically what you have suggested, once I thought about my problem a bit more.
I should first clarify that this is not a Calendar of events or appointments. It is a report of how many blood donors where/are scheduled, collected and the daily goal for each day, shown in a monthly format. That is a big reason, I wanted my data object to be created once, used by many. There is going to be a fair amount of data crunching to come up with these various figures. They will be coming from different systems and need to be calculated and integrated together. This is not something I want, or should need to be, done repeatedly or individually as users view and move through the calendar.
What I have done is created my DataCFC in the application scope, which at the moment is just creating dummy data for a wire frame of the User Interface. I then pass a reference to the application scope into the init function of my DisplayCFC as an argument.
Im not sure how OOP vs structured this is, but I dont think its too bad for a first attempt.
"C code. C code run. Run code run.
Please!" -----Original Message-----
Depending on how your Calendar object is built (I would be assuming it at least remembers the month from request to request so it knows where the user is up to) then I would suggest you store the DATA in the application scope, create an instance of the Calendar for each user (either in Session scope or in a Session-keyed Application structure), then initialise the Calendar object with the DATA.
The other thing you might also want to consider is how the Calendar can be kept up to date (as I also assume that the external system that is populating the calendar may do so between user requests). For this (hopeully) your calendar entries will have a "created" or "modified" dates. Just remember the last one in your Application scoped calendar and each time any user accesses the calendar, see if there is anything more recent than that date (either created or modified) and then appropriate update or add to your Application scoped calendar.
Our CRM system has multiple calendars. One for each user, one for
each office, one for the enterprise - and any number of other
"group-based" calendars. Through permissioning, any user can
see any set of calendars relevant to their authorisation/location/position,
etc. The added value in our system is that the calendars are also
maintained by the same system (which means an update to one calendar can easily
reflect for all users). BIG NOTE HERE......
Virtually all of the obejcts we use work this way (data is stored either in Application or Session scope and each instnace of a component is initialised with a reference to the actual data. We also use singletons (one-and-one-only instance of a class) to avoid having to create the objects over and over for each request. These are all managed through a "factory" type class that maintains the instances and reuses what it has already created.
Regards,
On 6/28/05, Ian Skinner <[EMAIL PROTECTED]> wrote: I'm still trying to
figure out this OOP/CFC/Layered development concept. I think I have
a nice start. I have a page (view?) that takes an array representing
a calendar month of data plus tails. It displays this calendar with
controls to move up and down the year.
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). CFCDev is supported by New Atlanta, makers of BlueDragon http://www.newatlanta.com/products/bluedragon/index.cfm An archive of the CFCDev list is available at www.mail-archive.com/[email protected] |
- RE: [CFCDev] Where to put the data? Ian Skinner
- Re: [CFCDev] Where to put the data? Stijn Dreezen
