Enterprise Android: Programming Android Database Applications for the Enterprise (häftad)
Häftad (Paperback)
Antal sidor
black & white tables, figures
234 x 190 x 25 mm
680 g
Antal komponenter
Enterprise Android: Programming Android Database Applications for the Enterprise (häftad)

Enterprise Android: Programming Android Database Applications for the Enterprise

Häftad Engelska, 2013-11-06


The definitive guide to building data-driven Android applications for enterprise systems

Android devices represent a rapidly growing share of the mobile device market. With the release of Android 4, they are moving beyond consumer applications into corporate/enterprise use. Developers who want to start building data-driven Android applications that integrate with enterprise systems will learn how with this book. In the tradition of Wrox Professional guides, it thoroughly covers sharing and displaying data, transmitting data to enterprise applications, and much more.

  • Shows Android developers who are not familiar with database development how to design and build data-driven applications for Android devices and integrate them with existing enterprise systems
  • Explores how to collect and store data using SQLite, share data using content providers, and display data using adapters
  • Covers migrating data using various methods and tools; transmitting data to the enterprise using web services; serializing, securing, and synchronizing data
  • Shows how to take advantage of the built-in capabilities of the Android OS to integrate applications into enterprise class systems
Enterprise Android prepares any Android developer to start creating data-intensive applications that todays businesses demand.
Visa hela texten


Har du läst boken? Sätt ditt betyg »

Bloggat om Enterprise Android: Programming Android D...

Övrig information

Zigurd Mednieks is an author and consultant to developers of Android-based systems. G. Blake Meike is an engineer, author, and educator who has worked with Java and Android since they began. Laird Dornin helped build a mobile Java operating system, has co-authored two books on Android, and is an architect for a major wireless carrier. Zane Pan has held architect level roles at many large companies (DEC, Intuit, EMC, and most recently, Nokia). Wrox Professional guides are written by working developers to address everyday needs. They provide examples, practical solutions, and expert education in new technologies, all designed to help programmers do a better job.


INTRODUCTION xix CHAPTER 1: DEVELOPING FOR ANDROID TABLETS AND SMARTPHONES 1 Android Is a Java Operating System 2 Your Tools and Your First Android App 2 Prerequisites and Getting Ready 2 Toolchain Test Drive 4 One Code-Base for All Types of Devices 4 Getting Started with the Code Framework Example 5 Automatically Adapting to Screen Size 10 Components, Views, and Lifecycle 11 Destroying and Re-Creating Components 11 The Main Activity Class 12 Activity: The Basic Unit of User Interaction 12 Fragment: A Tool for Organizing Code and UI 17 The Pick Fragment Class 18 The Item Fragment Class 22 The Item Detail Fragment Class 25 Tying Together Activities, Fragments, and the Action Bar 25 The Tabbed Activity Class 25 A Main.xml File for Large Tablets 28 A Main.xml and a Subsidiary Activity for Smaller Screens 29 The Tab Activity Class 30 The Android Task and Process Model 33 Starting Dalvik Instances 34 Death, but No Transfi guration 34 Tasks Span Applications and Processes 35 Multiprocessing, Security, and Lifecycle 35 The Process and User ID as Security Boundary 36 Declaring Application Properties 36 Summary 37 CHAPTER 2: THE RELATIONAL MODEL AND SQLITE 39 Databases and the Relational Model 40 The History of the RDBMS 41 The Relational Model 41 Other DBMS Features 43 The SQL Language 45 Introduction to SQLite 48 SQLite from the Command Line 49 An Example SQLite Database 53 Summary 58 CHAPTER 3: ANDROID DATABASE SUPPORT 59 SQL in Java: The SQLiteDatabase Class 60 Basic SQL Embedding 60 Syntactic SQL 61 Creating a Database: The SQLite Open Helper Class 67 Managing a Database 71 Cursors, Loaders, and Adapters 73 Cursors 74 Adapters and View Binders 76 Loaders 79 Summary 81 CHAPTER 4: CONTENT PROVIDERS 83 Using a Content Provider 84 URIs as Names for Virtual Datasets 84 Content Resolvers: The Link between Clients and Providers 85 Content Observers: Completing the Loop 87 IPC: System-Wide Accessibility 89 The Contract: URIs and Types 90 Authority 91 Virtual Table URIs 93 Return Value MIME Types 94 Permissions 94 Publishing the Contract 95 Implementing the Content Provider 95 Creating the Content Provider 96 Return Types and the URI Matcher 97 Writing the Database 98 Database Queries 101 Content Observers (Again) 105 Permissions and Registration 106 Content Providers and Files 109 Summary 114 CHAPTER 5: REST, CONTENT PROVIDERS, CONCURRENCY, NETWORKING, AND SYNC ADAPTERS 115 Basic REST 116 Why REST? 117 REST over HTTP 118 An Example REST API 120 Contact Representation 120 Contact Methods and URIs 122 Contact Transactions 122 Android Networking 125 The Apache Libraries 125 The java.net Libraries 126 Permissions 128 Considering Concurrency and Lifecycles 128 The Android Concurrency Architecture 128 A Naive Request 129 An Architecture for Robust Networking 131 Approach 1: Service-Centric 131 Approach 2: ContentProvider-Centric 133 Approach 3: SyncAdapter-Centric 135 REST within Android 135 The restfulCachingProviderContacts Project: An Example Client 136 Adding a Contact 138 Using Sync Adapters 143 Android Account Management 144 Creating a Sync Adapter 155 Summary 165 CHAPTER 6: SERVICE DEVELOPMENT 167 A Choice for Service Development 168 The Lifecycle of a Request 168 Three-Tier Service Architecture 169 Service Development Background 169 Building a RESTful Service for Contacts 172 A Conservative Software Stack 172 Writing the Examples: Spring Contacts Service and Its Synchronization Variant 175 Code Example: Spring Sync Contacts Service 195 Summary 202 CHAPTER 7: MOBILE AND THE CLOUD 205 Cloud Performance and Scalability 206 The Scale of Mobile 207 Persistence in the Cloud: From SQL to NoSQL 208 Database File Format 211 NoSQL Persistence 213 Design Considerations for Scalable Persistence 215 To SQL or Not to SQL? 215 Looking at Popular Cloud Providers 218 Amazon AWS 218 Google App Engine 219 Joyent: Hosted MongoDB+node.js 21