Hey,<br><br><div class="gmail_quote">On Sun, Oct 10, 2010 at 1:12 AM, Jay McCarthy <span dir="ltr"><<a href="mailto:jay.mccarthy@gmail.com">jay.mccarthy@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On Sat, Oct 9, 2010 at 12:35 PM, Markku Rontu <<a href="mailto:markku.rontu@iki.fi">markku.rontu@iki.fi</a>> wrote:<br>
> Hello,<br>
><br>
> I've been experimenting with the web servlets lately and I'm not sure how I<br>
> should be handling forms. The documentation guides me to use formlets<br>
> instead of bindings but the library seems rather incomplete. I mean based on<br>
> the source it seems to be missing radio buttons and files, for example. Also<br>
<br>
</div>The next release has support for almost all the form elements:<br>
<br>
<a href="http://github.com/plt/racket/blob/master/collects/web-server/formlets/input.rkt" target="_blank">http://github.com/plt/racket/blob/master/collects/web-server/formlets/input.rkt</a><br></blockquote><div><br>Good to know.<br>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">
> the documentation seems to refer mostly to an older version with<br>
> input-string etc. Using bindings is not a problem itself, it's what I'm used<br>
> to in Java-land but then again I have to build a complete framework on top<br>
> of it to handle everything properly.<br>
<br>
</div>I suspect most people using bindings directly.<br></blockquote><div> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">
><br>
> I managed to get simple formlets working as well as the direct bindings but<br>
> where am I supposed to do validation? Guess I do need to build the framework<br>
> myself?<br>
<br>
</div>I'm not sure I understand the question. If your application has<br>
special requirements on input, then you'll need to check it. Probably<br>
on the request handler for the form action.<br></blockquote><div><br>Well I was looking for a framework or an existing practice of doing it right. Typical web frameworks have some XML-based DSL or whatnot for validating expressions. I was wondering if there was any neat solutions for Racket yet. There is a lot of grunt work regarding showing validation errors, directing back or forward, validating common things such as dates etc. that I think should have some support. How? I'm not completely happy with the solutions I've seen so far...<br>
<br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">
> If somebody has some useful pointers or best practices, I'd appreciate it.<br>
> Or is there some framework I'm missing? What's in it for the formlets in the<br>
> future? Where is the active development now?<br>
<br>
</div>I'm interested in hearing what is missing from the formlets library.<br>
I'm also interested in a reusable validation layer, but I haven't come<br>
up with a good design yet, so there's nothing in the distribution.<br></blockquote><div><br>I can only think of in terms of existing Java-frameworks but I dislike them anyway. I'll try to think of something different next so I'll get back with some ideas a bit later. My approach is anyway to change quite much how typical UI code is written so have to think the fundamentals a bit more to have some good first idea.<br>
<br>-Markku <br></div></div>