Android Database Best Practices (Android Deep Dive)

Android Database Best Practices (Android Deep Dive)

  • ただいまウェブストアではご注文を受け付けておりません。 ⇒古書を探す
  • 製本 Paperback:紙装版/ペーパーバック版/ページ数 259 p.
  • 言語 ENG
  • 商品コード 9780134437996
  • DDC分類 005

Full Description


Battle-Tested Strategies for Storing, Managing, and Sharing Android Data "Android (TM) Database Best Practices goes well beyond API documentation to offer strategic advice about how to handle data in an Android application and the tools needed to develop productively. This arms the developer with a trove of solutions to nearly any problem an application may face involving data. Mastering the concepts in this book are therefore essential for any developer who wants to create professional Android applications."-Greg Milette, Android developer, Gradison Technologies, Inc. This is the first guide to focus on one of the most critical aspects of Android development: how to efficiently store, retrieve, manage, and share information from your app's internal database. Through real-world code examples, which you can use in your own apps, you'll learn how to take full advantage of SQLite and the database-related classes on Android.A part of Addison-Wesley's Android (TM) Deep Dive series for experienced Android developers, Android Database Best Practices draws on Adam Stroud's extensive experience leading cutting-edge app projects.Stroud reviews the core database theory and SQL techniques you need to efficiently build, manipulate, and read SQLite databases. He explores SQLite in detail, illuminates Android's APIs for database interaction, and shares modern best practices for working with databases in the Android environment.Through a complete case study, you'll learn how to design your data access layer to simplify all facets of data management and avoid unwanted technical debt. You'll also find detailed solutions for common challenges in building data-enabled Android apps, including issues associated with threading, remote data access, and showing data to users. Extensive, up-to-date sample code is available for download at github.com/android-database-best-practices/device-database.You willDiscover how SQLite database differs from other relational databasesUse SQL DDL to add structure to a database, and use DML to manipulate dataDefine and work with SQLite data typesPersist highly structured data for fast, efficient accessMaster Android classes for create, read, update, and delete (CRUD) operations and database queriesShare data within or between apps via content providersMaster efficient UI strategies for displaying data, while accounting for threading issuesUse Android's Intents API to pass data between activities when starting a new activity or serviceAchieve two-way communication between apps and remote web APIsManage the complexities of app-to-server communication, and avoid common problemsUse Android's new Data Binding API to write less code and improve performance

Contents

Preface xvAcknowledgments xixAbout the Author xxiChapter 1: Relational Databases 1History of Databases 1The Relational Model 3Relational Languages 9Database Languages 14Summary 15Chapter 2: An Introduction to SQL 17Data Definition Language 17Data Manipulation Language 28Queries 32Summary 37Chapter 3: An Introduction to SQLite 39SQLite Characteristics 39SQLite Features 39What SQLite Does Not Support 42SQLite Data Types 43Summary 44Chapter 4: SQLite in Android 47Data Persistence in Phones 47Android Database API 47Strategies for Upgrading Databases 58Database Access and the Main Thread 60Exploring Databases in Android 61Summary 77Chapter 5: Working with Databases in Android 79Manipulating Data in Android 79Transactions 87Running Queries 89Cursors 91CursorLoader 94Summary 99Chapter 6: Content Providers 101REST-Like APIs in Android 101Content URIs 102Exposing Data with a Content Provider 102Exposing a Remote Content Provider to External Apps 108Content Provider Contract 112Allowing Access from an External App 114Implementing a Content Provider 115When Should a Content Provider Be Used? 132Summary 135Chapter 7: Databases and the UI 137Getting Data from the Database to the UI 137Cursors as Observers 143Accessing a Content Provider from an Activity 145Summary 161Chapter 8: Sharing Data with Intents 163Sending Intents 163Receiving Implicit Intents 166Building an Intent 167ShareActionProvider 173Summary 175Chapter 9: Communicating with Web APIs 177REST and Web Services 177Accessing Remote Web APIs 179Persisting Data to Enhance User Experience 206Android SyncAdapter Framework 207Manually Synchronizing Remote Data 218Summary 229Chapter 10: Data Binding 231Adding Data Binding to an Android Project 231Data Binding Layouts 232Using Data Binding to Replace Boilerplate Code 242Data Binding Expression Language 246Summary 247Index 249

最近チェックした商品