You are previewing Architecting Mobile Solutions for the Enterprise.
O'Reilly logo
Architecting Mobile Solutions for the Enterprise

Book Description

Your guide to planning and executing a complete mobile web strategy

Revisit your approach to the mobile web—and deliver effective solutions that reach customers and clients on a variety of mobile devices. In this practical guide, web development luminary Dino Esposito shows you how to develop a solid mobile strategy for the enterprise, starting with an effective mobile website. You’ll receive essential architectural and implementation guidance, as well as mobile-specific design patterns for building cross-platform and native applications.

Discover how to:

  • Architect a website accessible from many different mobile devices

  • Implement design patterns specific to mobile app development

  • Examine tools that enable you to write one codebase for many platforms

  • Use technologies for building Windows Phone, iPhone, and Android apps

  • Develop cross-platform app features, such as localization and offline behavior

  • Table of Contents

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