Web Applications with Javascript or Java by Gerd Wagner
Author:Gerd Wagner
Language: eng
Format: epub
Publisher: De Gruyter
Published: 2018-04-13T04:00:00+00:00
Part IIConstraint Validation
For catching various cases of flawed data, we need to define suitable integrity constraints that can be used by the application’s data validation mechanisms. Integrity constraints may take many different forms. The most important type of integrity constraints are property constraints, which define conditions on the admissible property values of an object.
7Integrity Constraints and Data Validation
7.1Introduction
For detecting non-admissible and inconsistent data and for preventing such data to be added to an application’s database, we need to define suitable integrity constraints that can be used by the application’s data validation mechanisms for catching these cases of flawed data. Integrity constraints are logical conditions that must be satisfied by the data entered by a user and stored in the application’s database.
For instance, if an application is managing data about persons including their birth dates and their death dates, then we must make sure that for any person record with a death date, this date is not before that person’s birth date.
Since integrity maintenance is fundamental in database management,the data definition language part of the relational database language SQL supports the definition of integrity constraints in various forms. On the other hand, however, there is hardly any support for integrity constraints and data validation in common programming languages such as PHP, Java, C# or JavaScript. It is therefore important to take a systematic approach to constraint validation in web application engineering, like choosing an application development framework that provides sufficient support for it.
Unfortunately, many web application development frameworks do not provide sufficient support for defining integrity constraints and performing data validation. Integrity constraints should be defined in one (central) place in an app, and then be used for configuring the user interface and for validating data in different parts of the app, such as in the user interface and in the database. In terms of usability, the goals should be:
To prevent the user from entering invalid data in the user interface (UI) by limiting the input options, if possible.
To detect and reject invalid user input as early as possible by performing constraint validation in the UI for those UI widgets where invalid user input cannot be prevented by limiting the input options.
To prevent that invalid data pollutes the app’s main memory state and persistent database state by performing constraint validation also in the model layer and in the database.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
The Brazilian Economy since the Great Financial Crisis of 20072008 by Philip Arestis Carolina Troncoso Baltar & Daniela Magalhães Prates(297779)
International Integration of the Brazilian Economy by Elias C. Grivoyannis(111310)
The Art of Coaching by Elena Aguilar(53408)
Flexible Working by Dale Gemma;(23319)
How to Stop Living Paycheck to Paycheck by Avery Breyer(19778)
Thinking, Fast and Slow by Kahneman Daniel(12414)
The Acquirer's Multiple: How the Billionaire Contrarians of Deep Value Beat the Market by Tobias Carlisle(12377)
The Radium Girls by Kate Moore(12089)
The Art of Thinking Clearly by Rolf Dobelli(10596)
Hit Refresh by Satya Nadella(9185)
The Compound Effect by Darren Hardy(9049)
Tools of Titans by Timothy Ferriss(8486)
Atomic Habits: Tiny Changes, Remarkable Results by James Clear(8406)
Turbulence by E. J. Noyes(8108)
A Court of Wings and Ruin by Sarah J. Maas(7940)
Change Your Questions, Change Your Life by Marilee Adams(7846)
Nudge - Improving Decisions about Health, Wealth, and Happiness by Thaler Sunstein(7758)
How to Be a Bawse: A Guide to Conquering Life by Lilly Singh(7545)
Win Bigly by Scott Adams(7253)