PhoneGap for Enterprise
上QQ阅读APP看书,第一时间看更新

Chapter 2. Building the Data Store and Business Logic

Enterprise apps, by their very nature, require a data store that is capable of persisting data and business logic that manipulates data. This can be comprised of any number of technologies, though there are usually several servers involved, including database, application, and authentication servers.

In this chapter, we'll cover the following topics:

  • Typical server architecture
  • Designing data models
  • Writing business logic and where that logic should be placed
  • Designing permissions and authorization models
  • An introduction to Tasker, our demonstration app

Of course, it's impossible to cover all of these topics extensively in the next few pages. As such, if you need to create a large system from scratch, including the business logic and data models, you might want to do quite a bit of research into the various tools and technologies that you might want to use. Above all, use the right tools for the job—just because we use certain technologies in our demonstration app, it does not mean that you must use them in your own app. Instead, research your technologies carefully and use the ones that best meet your needs.

The code package for this book contains design documents and SQL code that this chapter touches upon. You will probably want to download the code package and have it handy as we progress through the chapter. The code package is also available on GitHub at https://github.com/kerrishotts/PhoneGap-Enterprise-Code-Bundle. The backend code and business logic lives within the database directory in this bundle.