Book Image

PhoneGap for Enterprise

By : Kerri Shotts
Book Image

PhoneGap for Enterprise

By: Kerri Shotts

Overview of this book

Table of Contents (16 chapters)
PhoneGap for Enterprise
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Designing your data models


It is important that you identify the data models your app will need prior to writing any code. Consider your data models the foundation of your app as a whole. We don't have sufficient space in this chapter to cover all the various complexities a large data model design needs to address. Instead, we'll discuss some basic ideas and also explain our mindset while going through the design for Tasker.

Simply, a data model describes the kind of data your app will store as well as the relationships between the data elements. Having this in place makes it easy to understand the system and makes it easier to code the app.

Let's go through the data models for our app. First up, we have the PERSON model:

The preceding diagram tells us quite a bit about the data we're storing:

  • The model stores information about people, including their name and administrator

  • The model indicates the data types for the individual data elements

  • The model also indicates the various actions that can...