Chapter 3

Mobile Services Validation

IN THIS CHAPTER:

  • Understand the basic structure of WAMS server-side scripting
  • Learn about the properties of the User object that can be put to use in the scripts
  • Update the WAMS database directly using the mssql object

WROX.COM CODE DOWNLOADS FOR THIS CHAPTER

The wrox.com code downloads for this chapter are found at http://www.wrox.com/go/windowsazuremobileservices on the Download Code tab. The code is in the Chapter 3 download and individually named according to the names throughout the chapter.

In the previous chapters, you learned how to create an application that utilizes Windows Azure Mobile Services (WAMS) to perform simple CRUD functionality. Getting to this point is fundamental to almost every business application. However, creating and updating data is not sufficient. To ensure that the data related to your application maintains its integrity, you need to perform some level of validation.

Of course, you could reasonably expect that the user interface component will do some of this validation work, but that will not be sufficient. To understand why, let’s consider, for a moment, data validation in a more common scenario: web applications.

It is considered a best practice in web applications that you should not accept any information that comes from across the Internet without subjecting it to further scrutiny. This is true even if the web page that submits the data has all sorts of validation. It is very easy for someone to create ...

Get Windows Azure Mobile Services now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.