4.4 Avoid Writing for the Least Common Denominator 77
4.5 Wrapping Up 78
CHAPTER 5 THE SERVICE INTERFACE LAYER 79
5.1 Message Processing 79
5.1.1 Push versus Pull 80
5.1.2 Partially Connected Scenarios 81
5.2 Message Processing Patterns 82
5.3 High–Volume Messaging Patterns 85
5.3.1 Queue Services and Microsoft Azure Event Hubs 86
5.3.2 Web Sockets 89
5.4 High–Volume Push Notifications 91
5.4.1 Third Party Notification Hubs 93
5.5 Message Translation and Routing 97
5.5.1 Message Translation 97
5.5.2 Message Routing 103
5.5.3 Handling Large Amounts of Data 108
5.6 Wrapping Up 111
CHAPTER 6 THE SERVICE LAYER 114
6.1 Thinking in Nodes 114
6.1.1 Scale Out and Scale Up 114
6.1.2 Scale Out versus Scale Up 114
6.2 Planning for Horizontal Scaling 117
6.2.1 Node Sizing 117
6.2.2 Statelessness 120
6.3 Designing Service Layers for Mobile Computing 121
6.3.1 Service Componentization 122
6.4 Implementation Abstraction 124
6.4.1 Service Interface Abstraction 124
6.5 Using CQRS/ES for Service Implementation 127
6.5.1 CQRS Overview 127
6.5.2 Why CQRS 129
6.5.3 Being Able to Separate Data Models 129
6.5.4 Aggregates and Bounded Contexts 131
6.5.5 The Read and Write Sides 132
6.5.6 CQRS Communications 132
6.6 Side by Side Multi–Versioning 140
6.7 Service Agility 141
6.8 Consumer, Business, and Partner Services 141
6.9 Portable and Modular Service Architectures 142
6.9.1 Designing Pluggable Services 145
6.9.2 Swapping Services 147
6.9.3 Deployment and Hosting Strategies 151
6.10 Wrapping up 152
CHAPTER 7 THE DATA ABSTRACTION LAYER 154
7.1 Objects to Data 154
7.2 Using the DAL with External Services 157
7.3 Components of a DAL 159
7.3.1 Data Mapper 160
7.3.2 Query Mapper 161
7.3.3 Repository 166
7.3.4 Serializers 168
7.3.5 Storage Consideration 169
7.3.6 Cache 172
7.4 Wrapping Up 174
CHAPTER 8 THE DATA LAYER 176
8.1 Overview 177
8.2 Business Rules in the Data Layer 178
8.3 Relational Databases 178
8.4 NoSQL Databases 181
8.4.1 Key Value Database 183
8.4.2 Document Database 186
8.4.3 Column Family Databases 189
8.4.4 Graph Database 194
8.4.5 How to Choose? 197
8.5 File Storage 197
8.6 Blended Approach 200
8.6.1 The Polyglot Data Layer 201
8.7 Wrapping up 203
CHAPTER 9 STRATEGIES FOR ONGOING IMPROVEMENT 204
9.1 Feature Expansion 204
9.1.1 User Interface 206
9.1.2 Service Interface Layer 206
9.1.3 Service Layer 206
9.1.4 Data Abstraction Layer 206
9.1.5 Data Layer 207
9.2 Data Collection Matters 207
9.3 Multi–Versioning 209
9.4 Version Retirement 212
9.4.1 Scale Back 214
9.5 Client Upgrades 216
9.6 Wrapping Up 220
CHAPTER 10 CONCLUSION 221
REFERENCES 225
INDEX 229
Rocky Heckman works as a Technical Evangelist for the Microsoft Corporation, Australia. He acts as an architectural advisor and technical consultant to Microsoft′s ISV partners on the topics of Windows Azure, Windows 8 and Windows Phone Apps and SQL server. He received his bachelor′s degree in software engineering at the University of Canberra, Australia, and certification in C++ programming, object–oriented programming, and project management at the Colorado Technical University, USA.
Presents strategies to designing platform agnostic mobile apps connected to cloud based services that can handle heavy loads of modern computing
This book explains how to help create an innovative and future proof architecture for mobile apps by introducing practical approaches to increase the value and flexibility of their service layers and reduce their delivery time. Designing Platform Independent Mobile Apps and Services begins by describing the mobile computing landscape and previous attempts at cross platform development. Platform independent mobile technologies and development strategies are described in chapter two and three. Communication protocols, details of a recommended five layer architecture, service layers, and the data abstraction layer are also introduced in these chapters. Cross platform languages and multi–client development tools for the User Interface (UI) layer, as well as message processing patterns and message routing of the Service Interface (SI) layer are explained in chapter four and five. Ways to design the service layer for mobile computing, using Command Query Responsibility Segregation (CQRS) and the Data Abstraction Layer with external services, and strategies to deploy and host portable and modular service architectures are included in chapter six and seven. The last chapters cover the foundation of the data layer and polyglot data layer, as well as strategies for ongoing improvements for apps and services.
Provides development patterns for platform agnostic app development and technologies
Includes recommended standards and structures for easy adoption and extensibility
Covers portable and modular back–end architectures to support service agility and rapid development and future proof service designs
This book is geared toward mobile consumer and commercial app developers. It will also be useful for students interested in learning about modern application development.