Ian Bicking: the old part of his blog

Re: Where Next For FormEncode

At this point, I only care about web form validation, and I want that to be done on the client side with JavaScript and at the same time on the backend with Python once the form is submitted.

I imagine there are many ways of doing this. Something that took a config file defining the form inputs with various conditions they must meet and could turn that into the required JavaScript and Python would be nice. I'm such a simpleton when it comes to this stuff though, so I've no idea if this has been done to death already, and I don't have any experience using any of Python's various web framework thingies. I plan to do my own pyweboff soon so I can learn them.

Looking at the Validation documentation seems to make my eyes glaze over. I think I need to get more sleep or something.

Comment on Where Next For FormEncode
by John P. Speno

Comments:

FormEncode doesn't do the Javascript thing, though it's always been something I've meant to add. I've gotten a bit more experience with Javascript since then, so it might be clearer to me how to do it. It's another reason that validation requirements shouldn't be simple functions, but objects with state, with someplace to put the necessary Javascript-generating methods.

I think that at the moment the library is portrayed in the documentation (and implemented) in a general way that still requires a fair amount of bridging to use usefully in an application. The pieces are there, but I think it's still a framework issue to make them usable.

# Ian Bicking