Thank you Yarko for accepting my "challenge" and I am looking forward
to get your answer.

> When I need to do this, I do it with making a memory-based table, and
> SQLFORM or SQLFORM.factory, and do whatevervalidationI need.

I do not want to discuss your solution though personally I do not like
any solution based on SQLFORM:
- I do not like to have to create a table just to validate my html
form server side: so the manual solution "SQLFORM in HTML" is not for
me;
- I do not like the SQLFORM.factory either because this simply shifts
the problem and create a "fake" table in the controller;
- I do not like Custom Forms particularly because, apart from the fact
I find the widgets a little tricky and "magic", they are based on a
table as well.

As I said, maybe I am totally wrong with my above thinking and I do
not want to criticize anyone but I prefer the "there is only one way
to make things" philosophy, which is very pythonic btw, over what I
read sometimes in this forum (and the book) "You can do that in
thousands of ways" or "It is easy to validate pure html forms" etc etc
( which reminds me of the "Turbogears way" to make things).

So I will take that your answer to "What is the best way to keep
validation and pure html forms?" is "doing a memory-based table and
SQLFORM/SQLFORM.factory"

> There is a fundamental "fuzziness" around this:   If you have manual
> forms without data persistence, what are you validating?  (and what
> can you not do by building up a simpel memory-db model, and validating
> transient data against that?)

your the first question is retoric of course, I can validate
everything I want even how many capital letters a user chose for his
password. The second is a serious one but, apart from philosofic
questions against "persistency at all costs", you pose me the answer
later, suppose I fear heavy server load or I have to be spare about
server memory resources..

>
> Second - if it is _really_ transient data that you arevalidation,
> then even memory db, per request, could get pretty "heavy" in terms of
> server load - why not do client-sidevalidation?

Of course you can if you have JS enabled.
So your answer here would be "if your data are really transient go
with client side validation".

> Either way, this begs the question:   why exactly this form of
> question?

My answer would have simply been a pure html Contact Form you see in
any web site but I now read a Thadeous' post where he gives his form
example.

Thank you Yarko for following me in these apparently futile arguments
but I would just like that people beginning with Web2py do not have to
read, like in many other python frameworks docs, "it is easy to get
this thing done" but they can never grasp that "easy way".

carlo

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.

Reply via email to