I'm doing something like this now. I first started with the url
representation of a search instead of form contents. Then moved on to
be able to take a form and create a url from its data.
This approach has two benefits for me:
1 - I start knowing that everything is "searchable" through an http/
rest-like query interface.
2 - My merb server doesn't known anything about the form. It has a
param filter and simple custom code to guard the inputs.
For example:
http://mysite.com/books?filter=all;page=2;
This url/query param format may not be rails-ish sexy but it works and
allow me to guard against the filter and page variables so they are
only within "searches" that my app currently allows. You can have
whatever variables you want and the server only pays attention to the
ones the server guards against and ignores the rest.
~ Jon