onMissingTemplate() as a controller - somewhat...

2008-10-17 Thread Jason Fill
I am currently trying to plan out an application and am curious about what other think about something I have in mind. I would like the URLs to be in the form of domain.com/thepagename-pageid.cfm. Simple as thatbut the page will not actually exist. My thought was just to use the

Re: onMissingTemplate() as a controller - somewhat...

2008-10-17 Thread Barney Boisvert
Just set up a simple app that uses the mechanism and do a quick load test. That'll at least give you an idea. Though I'd be surprised if there is an appreciable delay for doing it that way. cheers, barneyb On 10/17/08, Jason Fill [EMAIL PROTECTED] wrote: I am currently trying to plan out an

Re: onMissingTemplate() as a controller - somewhat...

2008-10-17 Thread Michael Dinowitz
It's a valid way of thinking and even warranted an article ( https://secure.houseoffusion.com/Vol2Issue3.cfm). The performance overhead is just as much as any other handler - what's needed to look up the actual template and data. I use this all the time and there is no problem with it that I've

Re: onMissingTemplate() as a controller - somewhat...

2008-10-17 Thread Jason Fill
Michael, Thanks for the information. My subscription started on Vol 2 Issue 4 so I just missed that one :). Anyway, thanks for the info and nice to hear others are using this type of thing as well. ~| Adobe® ColdFusion® 8

Re: onMissingTemplate() as a controller - somewhat...

2008-10-17 Thread s. isaac dealey
It's a valid way of thinking and even warranted an article ( https://secure.houseoffusion.com/Vol2Issue3.cfm). The performance overhead is just as much as any other handler - what's needed to look up the actual template and data. I use this all the time and there is no problem with it that

Re: onMissingTemplate() as a controller - somewhat...

2008-10-17 Thread Judah McAuley
I did this back in the days of CF 5 where I'd use the site-wide error template as a url remapper. It worked. I won't really recommend it though because it is using a tool that was really meant for a different task. Instead, I'd suggest using a url rewriter plugin for your webserver. modrewrite

Re: onMissingTemplate() as a controller - somewhat...

2008-10-17 Thread Michael Dinowitz
I did the same with the global error handler and that was the wrong tool. The onmissingtemplate() handler is a very good tool for this, especially for those who do not have the ability to use a rewriter. As for the intent of the onmissingtemplate() handler, it was discussed while in beta and

Re: onMissingTemplate() as a controller - somewhat...

2008-10-17 Thread Judah McAuley
Those are some fine points. I presume that in all cases, you have to have your webserver not check for the existence of a file before handing off the request. I'm curious about the efficiency argument there. I can see your point about the webserver not having to look at calls for a js file or

Re: onMissingTemplate() as a controller - somewhat...

2008-10-17 Thread Michael Dinowitz
On Fri, Oct 17, 2008 at 4:01 PM, Judah McAuley [EMAIL PROTECTED] wrote: Those are some fine points. I presume that in all cases, you have to have your webserver not check for the existence of a file before handing off the request. Correct. This is why there is a problem when the visitor is

Re: onMissingTemplate() as a controller - somewhat...

2008-10-17 Thread Michael Dinowitz
I almost forgot the most important thing about using onmissingtemplate() for dynamic page generation. It allows an application to be distributed. A CF8 version of blogcfc could be using it to display each blog entry as if it was a real page rather than an obviously generated one with masked

Re: onMissingTemplate() as a controller - somewhat...

2008-10-17 Thread s. isaac dealey
I'm curious about the efficiency argument there. I can see your point about the webserver not having to look at calls for a js file or css file or what have you, but the lookup in the url rewriter is usually a pretty straight forward regex with exclusion rules for file extensions (css, js,

Re: onMissingTemplate() as a controller - somewhat...

2008-10-17 Thread Dave Watts
I use this for my clients and for my own sites, even when I have access to the webserver. It can actually be more efficient than a rewriter, not less. A rewriter looks at EVERY request. images, css, js, whatever. The onmissingtemplate() deals with a CF template only and only the one