|
Regarding the second problem, I grant that there's something of a disconnect between HTML input elements and fields in database tables. HTML input elements are always passed to the HTTP server as character strings, while database fields may be various types (date, time, time-stamp, packed, zoned numeric, boolean, etc.), so fields obviously must be validated and converted to appropriate types as they move from browser to database and visa versa.And this is exactly what EGL removes.
Try entering incomplete or invalid data. Look at the RPG source. See that each HTML input element requires a block of code to handle it (retrieval, type validation and conversion, mapping to a subfield in a data structure, and error handling).Note that in my example, all the fields are edited at once, all the
In my toolkit, type validation and conversion procedures have a name prefix of "cki" which is an acronym for "check input", and a name suffix corresponding with the type of data input (integer, date, & so forth). All procedures return a boolean value indicating success or fail, and fill in an export data structure with a converted value [or] error message. Numeric and date procedures can optionally validate a range of values.With EGL, validation is at the data item level, not the program level.
It would be ideal if someone would post a comparable example using EGL, so we could see how it addresses this issue. Has EGL raised the bar? Is the interface more seamless? I'd appreciate your feedback.Sure... take a look here:
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.