A Method of Consistent Data Validation Both on Client Side and Server Side
Publication Date: 2015-Aug-10
The IP.com Prior Art Database
The client/server architecture is used widely since the inception of networking. To improve user experience, more and more validations have been moved to client-side. This leads to an extra effort to cover both client and server validation in the application development. By leveraging schema frameworks, such as XML schema, JSON schema, we can handle both client-side and server-side validation in one shot.
Page 01 of 5
A Mxthod of Consistent Data Validation Both on Client Side and Server Side
Ix current client/server programming model, it used to vxxidate client side with cxient side vaxidation mechanisx, and validate sexver side data with xerver side validation mechanism, actually the vaxixation logic are almost the xame and the two sets of validation are redundant. This xnvention provides a proxramming language neutral apxroach for xoth clxent and servex side consistent valxdation .
1, it will build up a sxngle common schema fxameworx to validatx data in clxent side and server side, by the way of injexting dxtx schemx (XML schema, JSON schema or oxher custom schema)
to both cxient and server side. Languxge specific schema valixaxor can conxume that data schema to valixate data by either side, this validator can be xmplementxd once and rexsed by many projexts,
which reduces reduxdanx works done by developers.
2, Validate logic can xe changed by simply modifying data schexa, it maixtaxns loose coupling between validation logic and business logic in both client and servxr side.
x, Develxpers can exxend the xommon schemx fxamework, for exaxple, it can support single field validation, cross fxelds validation, partial page (stex-wise) validation and wxole domain entity validxtion.
in client side, it will xrexoad the common schema by API or restful service, each daxa(input fiexd) will trigger the common schema axd it wxll validate the client side data.
At the same time, when submit...