I have a condundrum so I figured I would ask you guys/gals for your advice.
I have a system that tracks items - an item MIGHT have a user associated with it. my system has to work both stand alone and in conjunction with a portal application. When running standalone my own user management portion kicks in - when running with the portal I need to use the portals user management system The portal runs on MS SQL and Oracle my system runs on MS SQL, Oracle, PostgreSQL, MySQL, (and soon DB2) my itemGateway.cfc (name made generic for this conversation) has a bunch of methods in it that are pretty generic as they just query a query object. However, when I need to do a search which will actually be searcing across the items in the database due to the fact that I have to search in some meta information tables I have other cfc's: itemGateway_mssql.cfc and itemGateway_orcl.cfc etc.. that bring back queries that join on my user table to get information about the user associated with the item as well as the item information. then for the portal support I also have itemGateway_p_mssql.cfc and itemGateway_p_orcl.cfc these do the same kind of joining but touch on the portal user tables in their schema as well as my item table(s). Does this seem like the right approach? I am basically maintaining 7 distinct but very similar queries (i need to do some outer joining since their MIGHT be a user associated with an item) or does it seem like I could simply this model somehow? Also, when dealing with just one item I actually do 2 separate queries, one to get the item and another to get the user and I return an item object which consists of some basic information and a user object that represents the associated user. when returning what could be many (from 0 - n) items I return a query that just has the pertinant information - this ends up not being very consistent from a consumer view point, but it definately improves performance once you start getting a bunch of records being returned. Is there any reason I should consider sending back a structure of objects as opposed to the query (I honestly can only think of the one, consistency, and it is NOT a strong enough reason to me to forfeit performance). thanks Bill -- [EMAIL PROTECTED] http://blog.rawlinson.us I have 47! gmail invites,want one? ---------------------------------------------------------- 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). An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
