Wrox Home  
Search

Topic: C# and C++

Professional Cross-Platform Mobile Development in C# (1118157702) cover image

Professional Cross-Platform Mobile Development in C#

Scott Olson, John Hunter, Ben Horgen, Kenny Goers
ISBN: 978-1-118-15770-1
Paperback
384 pages
February 2012
This title is out-of-print and not currently available for purchase from this site.


About This Title  |  Download Code  |  Errata  |  P2P Forum for This Title
Table of Contents
INTRODUCTION xvii

PART I: MOBILE DEVELOPMENT OVERVIEW

CHAPTER 1: CHOOSING THE RIGHT ARCHITECTURE 3

Understanding Mobile Architecture 3

Connecting to the Network 4

Recognizing Storage and Processor Limitations 5

Securing Data on the Device 6

Building Scalable Applications 7

Planning for Deployment 8

Writing Extendible Modules 8

Maintaining Application Code 9

Choosing an Architecture 9

Building Native Applications 9

Building Web Applications 10

Building Hybrid Applications 11

Building for Multiple Platforms 12

Choosing iOS Applications 12

Choosing Android Applications 13

Choosing Windows Phone Applications 14

Choosing Web Applications 14

Summary 14

CHAPTER 2: DESIGNING YOUR USER EXPERIENCE 15

Making Your Applications Usable 16

Identifying the Scope of Each Screen 16

Conforming to Platform Standards 17

Separating Platform from Design 19

Prototyping 20

Whiteboarding 20

Using Functional Prototypes 22

Obtaining User Feedback 25

Using Agile Iterations 26

Summary 27

PART II: DEVELOPING CROSS-PLATFORM APPLICATIONS

CHAPTER 3: SETTING UP YOUR DEVELOPMENT ENVIRONMENT 31

Getting Your Development Tools 32

Installing Microsoft Visual Studio 32

Installing Internet Information Services (IIS) 35

Installing MonoDevelop for Mac 38

Installing Device Frameworks 41

Installing the Windows Phone SDK 41

Preparing for iOS Development 42

Preparing for Android Development 47

Installing MonoCross Project Templates 54

Installing the MonoCross Utilities 56

Organizing Your Solutions 57

Navigating the Sample Code 59

Continuous Integration 60

Summary 61

CHAPTER 4: THE MONOCROSS PATTERN 63

Understanding the Cross-Platform Problem 63

Understanding Native Platform Diff erences 64

Acknowledging HTML 5 Limitations 64

Taking a Hybrid Approach 65

Enabling Code Portability with Mono 65

Developing for Multiple Platforms 66

Defi ning a Cross-Platform Architecture 67

Separating the User Interface 67

Understanding the MonoCross Solution 67

Using the Model-View-Controller Pattern 68

Using URI-Based Navigation 77

Summary 88

CHAPTER 5: BUILDING SHARED APPLICATIONS 89

Defi ning Your Model 91

Starting from Your User Experience Design 91

Building for Lightly Loaded Lists 94

Plan for Lazy-Loaded Details 95

Advanced Techniques 96

Building Your Controllers 100

Implementing Your Workfl ow 101

Applying Changes to the Model 110

Summary 110

CHAPTER 6: BUILDING MONOCROSS CONTAINERS 113

Understanding How It All Fits Together 113

Implementing a Simple Application 115

Initializing the Container 115

Building the Customer List View 116

Building the Customer View 118

Building the Customer Edit View 120

Implementing an iOS Platform Container 122

Initializing a Container in MonoTouch 122

Building the Customer List View in MonoTouch 124

Building the Customer View in MonoTouch 127

Building the Customer Edit View in MonoTouch 131

Implementing an Android Platform Container 134

Initializing the Container for Android 134

Building the Customer List View for Android 136

Building the Customer View for Android 139

Building the Customer Edit View for Android 141

Implementing a Windows Phone Platform Container 144

Initializing a Container for Windows Phone 144

Building the Customer List View for Windows Phone 147

Building the Customer View for Windows Phone 150

Building the Customer Edit View for Windows Phone 154

Implementing a WebKit Platform Container 158

Initializing a Container with WebKit 158

Building the Customer List View with WebKit 159

Building the Customer View with WebKit 161

Building the Customer Edit View with WebKit 164

Summary 166

CHAPTER 7: DESIGNING AND BUILDING DATA SERVICES 167

Understanding Web Services Principles 167

Using SOAP Services 168

Using REST Services 168

Defining a Mobile Services API 169

Starting with Your User Experience Design 169

Optimizing for Mobile Usage 170

Creating Resource Endpoints 171

Building Indexed Lists 174

Retrieving Detail Objects 176

Enabling Transactions 179

Creating JSON Endpoints 187

Using Advanced Techniques 190

Specifying Data Elements in the Request 190

Building Pagination into Your Services 192

Filtering Results on the Server 194

Summary 196

CHAPTER 8: CONSUMING DATA SERVICES 197

Initiating RESTful Transactions 197

Performing RESTful GETs 201

Performing PUTs, POSTs, and DELETEs 211

Working Disconnected 222

Caching Data 222

Standardizing Cache Interface 223

Caching Mobile Data In-Memory 223

Caching Mobile Data Persistently 225

Securing Mobile Data (Encryption) 227

Not Caching Mobile Data 228

Queuing Data to Server 229

Device Resource Considerations 233

Managing Memory/File System Consumption 234

Managing Network Bandwidth 234

Summary 235

CHAPTER 9: ACCESSING THE DEVICE 237

Utilizing Device Audio and Video Playback Capabilities 238

Capturing Audio 239

Playing Audio 243

Capturing Video 247

Playing Video 252

Contacts and Calendar 255

Accessing Contacts 255

Messaging and Communication 258

Initiating a Voice Call 258

Geo-location 260

Getting GPS Location Information 260

Accelerometer 265

Getting X, Y, and Z 266

Summary 270

CHAPTER 10: USING MONOCROSS UTILITIES 271

Understanding MonoCross Utilities 272

Encrypting Application Information 273

Understanding the Encryption Utility 273

Putting the Encryption Utility to Work 275

Using File Storage 276

Understanding the File Utility 276

Putting the File Utility to Work 277

Serializing Objects 280

Understanding the Serializer Utility 280

Putting the Serializer Utility to Work 281

Logging Application Events 285

Understanding the Log Utility 285

Putting the Log Utility to Work 286

Accessing Network Functionality 288

Understanding the Network Utility 288

Putting the Network Utility to Work 289

Threading Your Application 291

Understanding the Thread Utility 291

Putting the Thread Utility to Work 292

Summary 294

CHAPTER 11: HYBRID APPLICATIONS 295

The Reasoning Behind the Web Hybrid Approach 295

Native Applications 295

Web Applications 296

Hybrid Applications 297

Implementing a Hybrid Approach 298

Understanding How Hybrid Applications Work 298

Building the Web Components 300

Building the Native Containers 303

Summary 314

CHAPTER 12: BRINGING APPLICATIONS TO THE ENTERPRISE 317

Expanding Your Application’s Domain 317

Bringing Your Application to the Desktop 318

Bringing Your Application to the Cloud 322

Supporting Multiple Platforms 339

Future-Proofing Applications 339

Building for Reuse 339

Using View Abstraction 341

Using a Mixed-View Model 342

Summary 344

INDEX 345

Printer-Ready Version   Share This
With you wherever you go: pdf + ePub + kindle -- DRM-free