Prev | Current Page 755 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

So, if you are short on time and you have to decide between server validation
and client validation, wonder no more!
(continued)
405
Chapter 14: More Interactive Content with JavaScript
The client/server ??“ side validation is one of the few areas where the DRY principle can be violated at least
in part; haXe with its multiplatform target capabilities, permits reuse of good portions of the code on
both the client and the server, the only differences being platform specific.
With the topic of the separation of concerns in mind, which is the layer in which the client validation is
to be defined? The validation process is for sure about contents; not the contents that are usually
maintained and served by a server, but contents that are introduced by a user with the intent to process
them is some way. It is not by luck that the < input type= ??? text ??? / > supports an optional argument to
define the maximum allowed characters. This is a primitive way of validating contents on the client side.
New standards define a lot more of this kind of attribute for the HTML elements.


Pages:
743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767