peknet :: an eddy in the bit stream         
about peknet


peknet is Peter E Karman. you'll find here musings on technology, politics, religion, books, beer and frequent references to my beautiful sons.

navigate

credits

Powered by Swish-e

Valid CSS!

proud member of the
Open Source Community

© 2005 peknet dot com

syndicate this site

Form philosophy

A form management package has one goal: to help preserve the integrity of data as it moves from server to client and back again.

Most form packages do two things: validate data and serialize data as (X)HTML. Some offer additional client-side validation checks via Javascript, etc. Others offer tight integration with particular data models.

Rose::HTML::Objects does both things well. RHTMLO allows you to define form classes that represent reasonably complicated data models, providing validation and serialization.

Some developers are of the opinion that serialization is not properly the function of a form manager because it blurs the line between view and model. I disagree. Proper and correct serialization is important to the validation process, and hence vital to the model. It is but one step in a series of validation layers.

Validation happens when a human being completes a (X)HTML form, as she self-monitors her attempt to enter good and correct data ("did I spell that correctly?"). Validation may happen again before the form is submitted, using client-side Javascript. Validation happens again when the server receives the request. Again, when the form object is initialized with the submitted data. Again, when the data is committed to storage. At every step checks are made to preserve what the client submitted and verify that the data conforms with what is expected and required.

Since serialization to and from (X)HTML is part of the roundtrip all data takes, a good form management tool should be able to handle (X)HTML creation as well as server-side validation. That's not blurring the model/view line; it's reflecting the reality that data must be handled by human beings and the web browser is one of the best tools we currently have.

File under projects Thu Aug 14 21:38:36 CT 2008


2008 entries » 2007 entries » 2006 entries » 2005 entries » 2004 entries »
« Oct  Nov 2008  Dec »
Sun Mon Tue Wed Thu Fri Sat
           
           
weather
Saint Paul, MN
15 F (-9 C)
Fair

Sunrise/Sunset
Updated:
Nov 21, 4:53 am CST

worth reading