We have some requirements to send emails when various field values are changed i
ID: 647250 • Letter: W
Question
We have some requirements to send emails when various field values are changed in our system.
It's an asp.net system using linq to sql with javascript/jquery.
Is it preferred to check if a value is changed via js (hidden field is set if the value is changed) or is it better since we are using linq and I have access to the object in question to check that object's current value with what the user has entered (basically compare the textbox value with the object's field value before it is being updated)?
Explanation / Answer
My opinion is that it's better to make system behavior decisions server-side (in your case linq).
I like to assume that all of my client code could be hacked by an evil person who is up to no good. If that code is nothing but presentation, then I'm a little safer.
What would happen if evil client code reported that many fields had changed when they hadn't?
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.