|
From: Brad P. <br...@ro...> - 2002-09-18 18:34:22
|
I have been thinking about the framework aspect of Modus and would like to discuss what a "good" framework would provide. I've read most of the threads on BACFUG on this topic, but feel like there hasn't been a good summary of "this is what a good framework offers a developer", or even a thread that leads you to that point. So here is what I think would be beneficial. To start I have never used fusebox. I grabbed the example app once and got it running, but that is all. At my previous job we used a fusebox-like technique in that we ran every request through one template and it handled including the proper file. I didn't really like the way we were doing it. It seemed like a lot of work and overly complex to use a case statement. I do however think that it is nice to have something take care of mapping requests to the right place and avoiding ugly errors. So if a user mangles the URL, the application handles it gracefully. Error handling is something else I would want. Some central error handling object of sorts. I might still want to do my own try/catch, but I want to hand that error off to something else and let it deal with what to do with it. Maybe nothing happens for a non-critical error, maybe it gets logged, and maybe it is useful information for the user and gets passed to something that knows how to display it. Is it worth defining error codes? I've been doing php development lately and since there is no <cfquery>, I usually write a query class. So CF has this handled, but could there be more? Perhaps error handling could be done in a query component. This may not have much value. Nathan mentioned security and I think this would definitely be good. There are lots of places that security could touch. Client authentication comes to mind as well as user permissions. I don't think these would be handled by the same thing. Could a framework handle permissions without tying a developer to a certain way of handling users? A request handler might take care of some security, like examining a URL for bad things. This could be handled by the web server, but I think it would be nice to have it taken care of "out of the box". Of course persistence, which is already addressed for content objects. If this is to be legit in the eyes of "serious" CFers, should there be something more scalable? Concerning session persistence, I am a fan of Brian's rsession. Something like that with a file system storage option. I actually started doing that a few months ago when first trying out CFMX. Unfortunately it was on my sole windows box, which was recently reclaimed to play with LTSP =) It's always good to rewrite things a few times anyway. Isn't that what good writers do ;) Ok, that's about all I have for now. Hopefully I managed to put my thoughts in a form that is clear. Feedback is welcomed and highly encouraged! Brad |