Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Architecting Mobile Solutions for the Enterprise
Dedication
A Note Regarding Supplemental Files
Introduction
Who Should Read This Book
Not a Mobile Developer? Not a Developer!
Who Should Not Read This Book
Organization of This Book
Finding Your Best Starting Point in This Book
Conventions and Features in This Book
System Requirements
Code Samples
Installing the Code Samples
Acknowledgments
Errata & Book Support
We Want to Hear from You
Stay in Touch
I. Going Mobile
1. Pillars of a Mobile Strategy
What Does “Going Mobile” Mean?
Toward a Mobile Strategy
Three Mobile Axioms
Multiple Channels
New Ways to Provide Services
Simplify Customers’ Lives
Mobility and the Industry
Defining a Mobile Strategy
What Do You Want to Achieve?
Reach Out to Users
Offer Rich Applications
B2C and B2B
Development and Costs
Targeting Multiple Platforms
Addressing the Device Fragmentation Issue
Looking for Best Practices
The Marketplace Tax
Outlining a B2C Strategy
Focus on Your Audience
A Quick Look at Global Numbers
A Deeper Look at Numbers
Facebook Was Not Built in One Day
Delivery Models
The Free/Paid Dilemma
The Freemium Model
The Premium-with-Free-Sample Model
The Quid-Pro-Quo Model
Outlining a B2B Strategy
Serve Your (Limited) Audience
B2B and the BlackBerry Case
Pick One Mobile Vendor
Private Applications
Mobile Enterprise Application Platforms
MEAP vs. Stand-Alone Applications
Gartner’s Rule of Three
MEAP and Gartner’s Magic Quadrant
Summary
2. Mobile Sites vs. Native Applications
Not a Pointless Matter
A False Dilemma—But True Differences
Focus on the Right Question
The Main Traits of Native Applications
The Main Traits of Mobile Sites
A Sure Differentiator: Offline or Online?
Reasons for the Perceived Dilemma
Perceived or Real?
Too Many Forces
More Concrete Reasons to Waver
Aspects of Mobile Sites
What’s Good About Mobile Sites
The Server-Side Solution
One Site Fits (Almost) All
Hassle-Free Deployment
What’s Bad About Mobile Sites
No Access to Hardware Capabilities
Varied Browser Capabilities
Network Latency
Web-Based Navigation
Appstores and Payments
Audience for a Mobile Site
Aspects of Native Applications
What’s Good About Native Applications
Fast and Fully Integrated
Appstore Integration
User Experience
What’s Bad About Native Applications
Isolated Mobile Continents
Minimized SEO
Natural Targets for Native Applications
Summary
II. Mobile Sites
3. Mobile Architecture
Focusing on Mobile Use-Cases
Stereotypes to Refresh
Myth #1: People Don’t Like Mobile Sites: Why Bother?
Myth #2: You Don’t Need Mobile Sites at All
Myth #3: A Tiny HTML Page Will Do the Trick
Myth #4: One Site Fits All
Analysis First
Selection of Use-Cases
From Web to Mobile: A Practical Example
Restructuring Existing Use-Cases
Inventing New Use-Cases
Mobile-Specific Development Issues
Toward a Mobile Application Layer
Layered Applications
Identifying Mobile-Specific Endpoints
Defining an Application Layer for Mobile Clients
Data Access Practices
Local Output Caching
Server-Side Device Detection
The Rationale Behind Server-Side Device Detection
Multiserving
Just One Web
Summary
4. Building Mobile Websites
From Web to Mobile
Application Structure
The Single-Page Interface Model
Full Page Refresh
Partial Page Refresh
Context Is King
Amount of JavaScript
The jQuery Family of Libraries
JavaScript Microframeworks
Application Device Profiles
Practical Rules to Class Profiles
Dealing with Older Browsers
Optimizing the Payload
The Page Structure
Reduce the Number of Requests
Compacting Resources
Improve Your Control over the Browser Cache
The Offline Scenario
Offline Sites with HTML5
Persisting Application Data
Development Aspects of a Mobile Site
Reaching the Mobile Site
One Site, One Experience
Two Sites, One Experience
Routing Users to the Right Site
Adding Mobile Support to an Existing Site
Design of the Mobile Views
Input Elements
Radio Buttons and Check Boxes
Scrollable and Drop-Down Lists
Free Text and Auto-Completion
Testing the Mobile Site
Desktop Emulators
User Agent Switching
The Device-Detector Site
Routing to Mobile Views
Configuring a Mobile-Aware View Engine
Routing to Mobile Resources
Detecting Device Capabilities
ASP.NET Native Detection Engine
A Better Way of Detecting Mobile Devices
DDR Options
CSS Media Queries
Browser Capabilities
Putting the Site Up
Adjusting the Layout
Adjusting the Style
Adjusting the HTML View
Summary
5. HTML5 and jQuery Mobile
jQuery Mobile Fast Facts
Generalities of jQuery Mobile
Setup of the Library
Graded Support Matrix
Themes and Styles
Data-* Attributes
Building Mobile Pages with jQuery Mobile
What’s a Page?
Initializing Pages
Headers and Footers with jQuery Mobile
Lists, Lists, and Lists
Fluid Layout
Collapsible Panels
Working with Pages
Page Links and Transitions
Disabling Caching on Ajax Calls
Dialog Boxes
Input Forms
HTML5 Fast Facts
Semantic Markup
Headers and Footers with HTML5
A Native Collapsible Element
Adjusting HTML5 Pages for Older Browsers
Missing Elements in HTML5
Web Forms and Data Entry
New Input Types
Validation
Predefined Entries
Programmer-Friendly Features
Local Storage
Offline Applications
Geolocation
Audio and Video
Using HTML5 Today
The Hype in HTML5
HTML5 and Browsers
The Weirdness in HTML5
Summary
6. Developing Responsive Mobile Sites
A Developer’s Perspective of Device Detection
The Client-Side Route
What’s Good About RWD
Technical Aspects of RWD
What’s Bad About RWD
Technical Downsides of RWD Implementation
Why a jQuery-Like Approach Is Not Always Effective
The Server-Side Route
Device Recognition and Description Repositories
DDRs and Crowd-Sourcing
Inside WURFL
Structure of the Repository
The Overall XML Schema
Groups of Capabilities
The WURFL Patch Files
Top 20 WURFL Capabilities
Identifying the Current Device
Serving Browser-Specific Content
Understanding JavaScript Capabilities
HTML5-Related Capabilities
Using WURFL from ASP.NET
Introducing the WURFL API
Adding WURFL to the Device Detector Website
Loading WURFL Data
From the UA to a Virtual Device
Querying for Device Capabilities
Implementing a Multiserving Approach
Key Aspects of Mobile Views
Optimizing the Content Rendered
Resizing Images
Viewport Control
Creating Device Profiles
Managing Segmentation
Rules for a Device Profile
Device Profiles in Action
The Smartphone Profile
A DDR-Based ASP.NET Routing System
A DDR-Based ASP.NET View Engine
The Role of jQuery Mobile
Summary
III. Mobile Applications
7. Patterns of Mobile Application Development
Mobile Applications Are Different
Critical Aspects of Mobile Software
The Interaction Model
The Presentation Model
The Behavior of the Application
Security Concerns for Mobile Software
New Patterns and Practices
Application Life Cycle
Tools for Data Storage
Connectivity
Patterns for Interaction
The Back-and-Save Pattern
Formulating the Pattern
Implementation of the Pattern
Considerations for Mobile Data Entry
The Guess-Don’t-Ask Pattern
Formulating the Pattern
Implementation of the Pattern
Making Typing Easier
If You Can’t Guess, Then Remember
The A-la-Carte-Menu Pattern
Formulating the Pattern
Implementation of the Pattern
The Sink-or-Async Pattern
Formulating the Pattern
Implementation of the Pattern
Chaining Async Network Operations
The Logon-and-Forget Pattern
Formulating the Pattern
Implementation of the Pattern
Security Considerations
Patterns for Presentation
The Babel-Tower Pattern
Internationalization vs. Localization
Formulating the Pattern
Implementation of the Pattern
Further Considerations
The Do-as-Romans-Do Pattern
Formulating the Pattern
Implementation of the Pattern
The List-and-Scroll Pattern
Formulating the Pattern
Implementation of the Pattern
Horizontal Scrolling
Behavioral Patterns
The Predictive Fetch Pattern
Formulating the Pattern
Implementation of the Pattern
The Memento-Mori Pattern
Formulating the Pattern
Implementation of the Pattern
The As-Soon-As-Possible Pattern
Formulating the Pattern
Implementation of the Pattern
Detecting Network Changes
Summary
8. Developing for iOS
Getting Ready for iOS Development
A Brand New Platform for (So Many) Developers
Getting a Mac Computer
Getting Familiar with the IDE
Joining a Developer Program
iPhone vs. iPod Touch vs. iPad
Choosing the Development Strategy
Using Objective-C
Using MonoTouch and C#
Using the PhoneGap Framework
Other Options
Programming with Objective-C
A Quick Look at Objective-C
Defining a Class
Namespaces and Naming Conventions
Implementing a Class
Object Messaging
Protocols
Categories
Exception Handling
Memory Management
The HelloWorld Program
Application Startup
The App-Delegate Object
Dissecting the Project
The View-Controller Object
A Look at a Table-Specific View-Controller
Examining a Sample Application
The App-Delegate
The Player Class
The Home View
The Play View
The Scores View
Other Programming Topics
Accessing the Network
Common Tasks
Navigation and Controllers
Programming with MonoTouch
The .NET Framework on iOS
From Mono to MonoTouch
Pillars of MonoTouch Applications
Analysis of a Simple MonoTouch Project
Reusing Existing .NET Code
Examining a Sample Application
A Master/Detail View
Populating the Table View
The Detail View
Deploying iOS Applications
Testing the Application
Joining an Apple Development Program
Getting Your Development Certificate
Registering a Device
Getting the Provisioning Profile
Enabling Beta Testing
Over-the-Air Beta Testing
Distributing the Application
The App Store
In-House Deployment
Summary
9. Developing for Android
Getting Ready for Android Development
Development Tools and Challenges
Becoming an Android Developer
Configuring the Environment
Picking Up Your Favorite IDE
Choosing the Development Strategy
Using Java and the Android SDK
Using MonoDroid and C#
Using the PhoneGap Framework
Other Options
The Android Jungle
Firmware, Carriers, Manufacturers, and You
API Levels
Different Screen Sizes
Programming with the Android SDK
Anatomy of an Application
Dissecting the Project
The Manifest File
Application Startup
Android Application Components
The “Hello, World” Program
Application Resources
Defining the User Interface
Defining a Layout
Layout Types
Change of Orientation
Style and Themes
Graphical Shapes
Adding an Options Menu
Localization
Examining a Sample Application
The Application Manifest
The Home View
The Play View
The Scores View
Other Programming Topics
Permanent Data Storage
Accessing the Network
Placing HTTP Calls
Broadcasters
Common Tasks
Testing the Application
Enabling Devices
Selecting Test Devices
Distributing the Application
Google Play
Signing the Application
Summary
10. Developing for Windows Phone
Getting Ready for Windows Phone Development
Development Tools and Challenges
Becoming a Windows Phone Developer
The Visual Studio Environment
As Easy as Possible, but No Easier
Choosing the Development Strategy
Silverlight-Based Applications
XNA Applications
HTML-Based Applications
The Windows Phone—Way Ahead
The Metro Interface
Programming with the Silverlight Framework
Anatomy of an Application
Dissecting the Project
The Manifest File
Application Startup
The Application Frame
Application Life Cycle
Defining the User Interface
Icons and the Splash Screen
Pivot and Panorama Layouts
Defining a Custom Layout
Style and Designer Tools
Dark and Light Themes
The Application Bar
Localization of Text
The MVVM Pattern
Generalities of the Pattern
Design of the View-Model Class
The Data-Binding Engine
Examining a Sample Application
The Home View
The Play View
The Scores View
Other Programming Topics
Permanent Data Storage
Accessing the Network
Placing HTTP Calls
Common Tasks
Deploying Windows Phone Applications
Testing the Application
Registering a Device
The Beta Program
Distributing the Application
The Windows Phone Marketplace
The Submission Process
The Marketplace API
Summary
11. Developing with PhoneGap
The Myth of Cross-Platform Development
The Virtual Machine Approach
Structure of the Application
Titanium Mobile
Flash Builder
The Shell Approach
Structure of the Application
The PhoneGap Framework
Handmade Hybrid Applications
Building an HTML5 Solution
JavaScript Ad Hoc Patterns
The JavaScript Presentation Layer
The JavaScript Localization Layer
The JavaScript Application State
The JavaScript Application Behavior
The Sample Application
Screens and Navigation
Styling the Screen
Testing Logic and Markup
Ajax and Cross-Domain Issues
Integrating with PhoneGap
Supported Platforms
Building a PhoneGap Project
Getting Ready for PhoneGap Applications
Building a iOS Application
Building an Android Application
Building a Windows Phone Application
Final Considerations
The Common Denominator
The Skin Factor
PhoneGap Is Not the Silver Bullet
When to Use PhoneGap
Summary
Index
About the Author
Copyright
← Prev
Back
Next →
← Prev
Back
Next →