[cvs] [Wiki] changed: FieldTypeProposal

Jan Schneider jan at horde.org
Sun Aug 15 06:35:32 PDT 2004


jan  Sun, 15 Aug 2004 06:35:32 -0700

Modified page: http://wiki.horde.org/display.php?page=FieldTypeProposal
New Revision:  2.3

@@ -75,10 +75,10 @@
 I think the field class that returns the HTML edit representation needs to have a method for "gathering" the form fields back into the internal representation.  An example could be Horde's monthdayyear field, which has three form fields for representing a date value.  The gather() method would take this data and return the internal value. -- JasonFelice
 
 +++ Careful Attention to Internal Value Representations
 
-We've had this problem with our old framework, and I see it to some degree in Horde.  What does a date look like?  If we could pick one form, we constrain the number of interfaces we deal with and therefore the complexity.  In our old framework, we have internal (PHP) values, database (PostgreSQL textual representation) values and HTML form values.  We assumed when first designing when we were basically just using text inputs that all of these were the same, but that got us into big touble.
+We've had this problem with our old framework, and I see it to some degree in Horde.  What does a date look like?  If we could pick one form, we constrain the number of interfaces we deal with and therefore the complexity.  In our old framework, we have internal (PHP) values, database (!PostgreSQL textual representation) values and HTML form values.  We assumed when first designing when we were basically just using text inputs that all of these were the same, but that got us into big touble.
 
 In Horde, we can make sure the storage driver returns the internal form, so we seal off the database representation into the database-specific driver, which is really nice.  We currently do have a problem with the other types of values, though.  We should probably always use PEAR Date:: representations because we certainly don't want different fields for UNIX timestamp and more useful date formats.
 
 -- JasonFelice
 


More information about the cvs mailing list