We are designing an MVC based application. For reasons I wont go into right now, we have decided not to use any of the existing frameworks (e.g. MachII) and are rolling our own. We have everything go through a primary controller file and have devised a URL schema which allows us to declare "events" and the CFCs that handle them. So far so good. All of our functionality is offloaded to service type CFCs, so we have a page that lists all templates in the system. You click on a template and it loads a WYSISYG editor, etc. We want to really generify everything so that after submission and the content is saved to the DB it somehow knows where to redirect the user too. We want our components to have nothing hard-coded in them like where to go after processing. Ideally, we want to be able to arbitrarily chain our components together and there is the idea of a workflow. Now, for this one page, we could just pass in a variable like "completeURL" or something like that. But if our workflow talks to 3 different components, the 3rd wouldnt now how to get back to the 1st, since you are only maintaining one variable.
How do people go about this right now? One approach we came up with is that you maintain a stack of "visited" managers (components) that you visit and you push/pop off the stack as you go around. But this quickly gets complex and its just doesnt feel right. Where would this stack live? In Session scope...? That doesnt feel right. Plus, what would happen if in the middle of a workflow the user decides to go off to some random place (their phone rangs and someone says, "hey bob, can you go off to such-and-such page really quick and get me some information..."...at this point your stack is polluted. If you can somehow GUARANTEE the user is going to stay within their boundaries this might work. But since you cant guarantee this, all bets are off. So I guess my question is: how do people build generic and abstract components that can be pulled together at a later date and workflows devised out of them? Thanks in advance -William ---------------------------------------------------------- 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]
