Does the customer want a maintenance task of updating flags? If not then
they could determine up front a date range for which the event will be
shown on the homepage and lets say you can have up to 5 slots. The
homepage will show all events which are in the valid date range compared
to todays date and if any slots are left over it then checks the artists
table for flagged artists info and date ranges. In the rare case that more
than 5 events are active at more than one time you could have priorities
assigned to events or just randomly select 5 events to display each time
the homepage is hit. The path I try to take is to have the customer enter
the data one time and then forget about it. If they need control on a
daily basis of whats displayed and in what order etc, then it sounds like
you are going down the right path. The user would have to check x flags
for the events and the remaining y flags for the artists such that all 5
slots will be displayed.
Thanks,
CC
x56927
----------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit
written agreement or government initiative expressly permitting the use of
e-mail for such purpose.
----------------------------------------------------------------------------------------
"Jeff Small" <jsmall
@lhwh.com>
01/20/2005 08:47 AM
Please respond to cf-talk
To: CF-Talk <[email protected]>
cc:
Subject: Okay, I've never quite run into this before...
It's not an odd request, just something that seems probably a little more
complex than it initially appears, and I just want to make sure I'm
heading
in the right direction, design-wise.
Client has an events calendar, dates, events, details (text), possibly an
image all kept in the appropriate tables in the database. Client also has
a
table that keeps track of artists (It's a little local pro-bono arts
council) with information about the artist, their gallery, contact info,
etc...point being, VERY different data than the events.
Client wants an area on the home page for featured events OR artist. In
other words, when there's nothing important going on, swap an artist's
info
there, with links to some images of their work, etc. I've got the
isFeatured
flags in each table, one in the artists table, and one in the events
table,
so an event or an artist could be flagged, but it brings up a lot of
questions. Like, where does the integrity reside for making sure that
there
can only be one event OR one artist that's flagged as currently active? Do
you want to have to UNflag an event or artist before you can flag another
one? Does the flagging of an event as "featured" automatically unflag an
artist? The client says, "whatever it needs to do or however it needs to
work, I just wanna be able to do that..."
I'm doing this whole thing with CFCs, so the solution is obviously to
write
a CFC or series of CFCs to handle it all, but I was wondering what my
pitfalls were and what was a good way to handle different types of results
coming back for what's essentially a query that says, "give me this, if
it's
an event and it's active, or give me this if it's an artist and it's
active,
and it'll be different data depending on which one it is"?
I was thinking, "return a struct from the CFC, and use a variable in the
struct that's set in the CFC to determine what kind of data the struct is
returning"...something along the lines of (pseudo):
<cfif getFeature.isArtist EQ 1>
"It's an artist, display their info"
<cfelseif getFeature.isArtist EQ 0>
"It's not an artist, it's an event, display that info"
</cfif>
And have all the checking done in the CFC by querying the tables to see
which one contains an active "featured" event or artist.
Does this make sense? Is it a lot easier than I'm thinking? I've just
never
run into the "only one set of data from a possible query of two different
places" scenario...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware: a new and convenient web-based time tracking application. Start
tracking and documenting hours spent on a project or with a client with Logware
today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191218
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54