<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">
<div><div class="h5"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div>>> While the above explanation makes sense, and understanding it can lead to<br>
>> designing applications better, my gut feeling is with Rick. If I create a<br>
>> 'before' hook, I want it normally to fire once everything the human user makes a<br>
>> request even though under the scene the browser is making multiple requests. In<br>
>> other words, the current behavior seems to be against the DWIM nature that I<br>
>> would expect.<br></div></div></blockquote></div></div></div></div></div></blockquote><div><br></div><div style>I don't think I would agree here. Let me elaborate on my point of view:</div><div style><br></div>
<div style>Dancer is a DSL to write a web application. Its purpose is to provide a clean and intuitive syntax for describing how to handle a request and which response to produce. This is based of course on the HTTP protocol, and Dancer relies entirely on that.</div>
<div style><br></div><div style>That means that everything in Dancer's point of view is related to an incoming _request_. In the HTTP meaning. If Chrome hits favicon.ico whenever you hit the app, you'll send 2 requests every time you hit the browser's reload button. You are sending 2 requests, period.</div>
<div style><br></div><div style>Dancer sees 2 requests, and acts accordingly.</div><div style><br></div><div style>Implementing a workaround to simulate the concept of "human requests" versus real "HTTP requests" sounds crazy to me and error-prone.</div>
<div style><br></div><div style>What makes Dancer so appealing is its thin layer over the HTTP stack, this kind of change or enhancement is dangerous, I think.</div><div style><br></div><div style>I'm sorry if I'm not following you on this one, I hope you see my point of view :)</div>
<div style><br></div><div style>Cheers</div></div></div></div>