> In this case then...
> 
> A specific event object would have a property for venue, and another
for
> time slot.  These properties would be of type Venue and type Timeslot
> respectively (that is, Event.Time would be a timeslot object based on
the
> timeslot class, and Event.Venue would be a venue object based on the
venue
> class). Try not to use the same name for both your properties and your
> class
> definitions, otherwise you might get errors, and cause confusion.

I'm getting it I think... one point is that an event can have many times
and venues.  Physically you might have this:

Donald Knack, "The Junkman"
        12pm-1pm        -       Hynes Convention Center
        2pm-3pm -       Hynes Convention Center
        4pm-5pm -       Hynes Convention Center
        7pm-10pm        -       Boston Common Bandstand
        12am-12:10am-   Boston Common Frogpond

In the above example there is one "Event", 5 "TimeSlots" and 3 "Venues".

The "Event" object should link to multiple timeslot/venue pairs.

My initial idea was to have a "Performances" (or perhaps "Showings")
property in "Event" that was a two dimensional array of TimeSlot/Venue
references.

Sound good?

> When you look at a venue object, it doesn't really have a direct
> correlation
> to a specific event, or time, so will not have properties for these
> elements.  Same with a Timeslot object - there is no real direct
> correlation
> between a venue and an event, so no properties for these here either.
> Yes,
> a timeslot can be associated with a venue and/or an event, but the
> timeslot
> iteself doesn't really care.

Sort of... but one of the major aspects of the system is getting all
events at a venue or by time.  So, depending on the work being done at
any time the "primary" object may be Venue, TimeSlot or Event.

This was the idea behind having an array of Event references within
"Venue" and "TimeSlot".

No good?

> So, I'd make a generic timeslot object (with start time, end time, and
any
> needed methods), a generic venue object (with location and any needed
> methods), and then an event object with properites for the event
details
> including timeslot and venue.
> 
> When it comes to listing items by timeslots or venues, this would be a
> specialized query of your data.  Perhaps the Timeslot object could
have a

Are you saying the object data (the event objects) or the database
directly?  In the procedural model I would definitely query a table -
but I'm trying to get away from implementation dependencies in the
running application.

> method "PrintSchedule" that will do whatever is needed to create a
> schedule,
> but scheduling is a time related function so logically should be with
the
> Timeslot object.  On the other hand, a Venue might also have a
> "PrintSchedule" method that would list only the events for that
particular
> venue.  The implementation details are, of course, best left to you.
But
> post some possibilities here in hopes it might help you determine
where
> things should go.
> 
> I should make a disclaimer though - I don't know the specific details
of
> your requirements, so my examples might be completely off...

If it would help the actual system I'm converting is here:

http://www.firstnight.org/Content/NewYears/Artists/Index.cfm

This is the eighth year I've done the site so I've got a very strong
handle on the business requirements but also some very ingrained
procedural concepts for building it.  ;^)

The current system works well, but lacks some features (for example
currently there is a one-to-one relationship between Venue and Event so
and example like the one above can't be constructed without
duplication).

Thanks for your time and patience.

Jim Davis


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm?link=i:4:137613
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm

Reply via email to