I forgot to mention that using this application stack allows me to separate as much of the core/business logic into the API Library which leaves the web applications just to handle presentation layer logic as much as possible. It's also been helpful in moving from one delivery method to another. Sin... read more »

@Ben Yep, we look a lot at the available http status codes to try and find the best match to what the error is. Between the status code, headers, and/or sending back what the error was via json or xml, it works out well for us. It is certainly more work on both the API and client side but it's rea... read more »

@Ben We, finally, have been able to convert all URL and FORM variables inside the framework itself (via getHttpRequestData()). The hardest part was parsing the bytearray sent when a file is uploaded along with other form variables without corrupting the data itself. As to the bytearray and CF tags... read more »

@Justice This is exactly how things should be handled, IMO! Within most APIs there are errors and there are exceptions. Exceptions are should be expected to be caught within the API itself and handled for, when possible. Errors on the other hand "bubble up" and, in the case of web facing APIs, chan... read more »

Our application framework uses 404 handling to create web friendly URLs and serve all sorts of mime types. It's nice to have all the logic for serving pages inside the framework itself (rather than Apache/IIS), but causes issues in getting/parsing post data. Anyways, we run into similar issues and... read more »

Add myself to the side supporting that calling this function SHOULD be a true application reset. I completely agree that application and sessions are intertwined. It would be wonderful if this function could be used instead of a service restart, in it's present state it cannot 100% of the time (yes ... read more »

@Ben, We do use J2EE sessions, as we do share some sessions with java applications. If you don't use J2EE sessions you can try some undocumented features in CF to end a session (try setMaxInactiveInterval()). However, we had some issues with this not working on CF9, perhaps it was because we were u... read more »

@Ben, I just wanted to say thanks for your example. Ended up using a similar method to parse a bytearray from getHttpRequestData().content when a file is uploaded. By default it includes all form elements in a bytearray and we needed to separate them out without converting the data to a string firs... read more »

Great solution Ben! We take a different approach: When a user makes a request we use an algorithm identifies it as a bot by analyzing user provided information (cookies, user agent, CGI, IP, reverse name lookup, etc..) and browsing habits (how fast are requests coming, how many requests made, heade... read more »