<br><br><div class="gmail_quote">On 28 November 2010 00:31, YC <span dir="ltr"><<a href="mailto:yinso.chen@gmail.com">yinso.chen@gmail.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="gmail_quote"><div><div class="gmail_quote"><div class="im"><div><br></div></div><div>I agree with Neil that xexpr or sxml are very nice representations of html as well. Given their inherent advantage I think an extensible response mechanism might work better: </div>
<div><ol><li>create hooks to handle different response types </li><li>let the different package to install the necessary hooks </li></ol><div>For example - the hook might be called make-response-hook, and in xml package (maybe xml/web-server.ss) can install the hook. </div>
</div></div></div></div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="gmail_quote"><div><div class="gmail_quote"><div>
</div><div><br></div><div>Such a hook will allow others to make their own extension as well to manage their own custom response types.</div></div></div></div></blockquote><div><br></div><div> </div></div>Agree! that way the Racket web server seems be able to be widely proliferated, and I can handily make a call to that extension instead of converting back and forth . For example, right now, I have to first convert a list to json object, then to byte string before sending out.