Cloud Zone is brought to you in partnership with:

My name is Bruno Terkaly and I am a Developer Evangelist in Northern California. Over the past few months I have been presenting a wide variety of demos and slides highlighting the wealth of new features in Visual Studio 2008. Bruno is a DZone MVB and is not an employee of DZone and has posted 51 posts at DZone. You can read more from them at their website. View Full User Profile

Everything Windows 8 Devs Should Know About the Cloud

07.17.2012
| 3703 views |
  • submit to reddit

001
  1. Client-side developers do need to embrace the cloud. The increasing popularity of connected devices like tablet computers and smartphones is having a direct effect on the adoption rate of personal cloud services. You can expect both connected devices and cloud services to grow together.
  2. This trend has been accelerating over the past couple of years. Mobile and portable devices have limited internal storage and rely heavily on cloud services.
  3. Windows 8 apps are generally Connected apps.
  4. You can pull data to them or you can receive push notifications
    • Windows 8 is about connecting to the services you need, like Hotmail, Messenger, Facebook, Twitter, LinkedIn, Messaging, and People apps.
  5. Windows 8 is about synchronizing devices
    • It is likely that the world is multi-device
      • Mobile, Tablet, Laptop, Desktop
    • Developers will need to think about a central, cloud-based storage location.
    • SkyDrive is one cloud option available to solve this problem.
  6. You may create your own Windows 8 app that requires a custom cloud-based backend
    • Maybe you are designing an app to bring together photos from many different sources and to then view and share them
      • Your photos may need to be aggregated from several locations
        • Facebook, Flickr, Skydrive, Windows Phone 8.
        • Let the cloud application do this aggregation.
        • Let the Windows 8 application get content from just one place.
How the cloud can help
002

 

  1. There are some basic features that all Windows 8 developers will need to master.
  2. This is where cloud computing can really make a difference and accelerate your time to market.
  3. Although Windows 8 applications support their own local storage, you will probably want to leverage the cloud to store important data. Most users will have multiple devices. They will expect that the data is accessible from anywhere. That’s why it is important for developers to know how to leverage Storage Services in the cloud.
  4. Windows 8 comes with a rich communications stack. Most developers will leverage http for most of their communications. There are also push notifications that allow Windows 8 applications to retrieve information in the background and without requesting data specifically.

There are 2 ways your Windows 8 Application can get data

003
  1. The cloud provides a way to reach across device platforms and a larger pool of resources from which to get data.
  2. Windows 8 applications can get data in two ways. The first ways is to simply ask for it by making a web request. This is using a pull approach. The second way Windows 8 applications can get data is to leverage push notifications.
  3. When a Windows 8 device uses a pull approach, it is basically a HTTP-based, request/response. Developers can choose from various frameworks, which include WCF, OData, WebAPI, WebRequest, etc.
  4. Data can be sent in a variety of formats, such as SOAP, JSON, XML, POX, etc.
  5. Push notifications are initiated by the cloud. Before Windows 8 Applications can receive push notifications, Windows 8 applications must register themselves with the push notification service.
  6. Your custom cloud service can communicate with the Windows Notification Service to tell it to send push notifications
    1. The windows notification service is designed to be bandwidth and battery friendly.
    2. It is the push notification mechanism that is used to update live tiles on the Windows 8 desktop.
    3. The downside to push notifications is that there is no guaranteed delivery of content.
      1. If guarantees are needed for data delivery, then some of the pull techniques previously discussed may be appropriate.
  7. Oftentimes push notifications result in a pull request from a Windows 8 application. This means that once the Windows 8 application gets a push notification, it knows it needs to then request data from the cloud using a pull approach. Of course, it may choose to ignore this, given a user preference.
Push and Pull – Maybe Both
004
  1. The Push Notification Service is provided by Microsoft. However, Windows 8 applications must register for this service. Once registered, applications are ready to receive data that is sent by the Windows Push Notification Service.
  2. The Push Notification Service may receive data itself from a Windows Azure cloud application that you create. This cloud based application can aggregate data from other sources if necessary. You can see from the diagram above it may request data from Flickr or Facebook or just about from anywhere.
Keeping data off the local device and in the cloud
005
  1. Some powerful capabilities are available here.
  2. To start with, there is the ability to store huge amounts of data.
  3. Tables allow you to stores huge lists of things or huge collections of objects. Tables can partition themselves across many machines, supporting extremely fast query results even if there are billions of rows.
  4. Blobs allow you to store large binary objects like videos, documents, even web pages.
  5. Queues allow you to support asynchronous messaging. That means your Windows 8 applications can send information to a cloud application and not be affected by how busy the cloud application is.
  6. Because Azure supports Infrastructure as a Service Technologies (IaaS), developers have almost an unlimited amount of options for their Data Storage needs
    1. Microsoft supports Linux in the cloud. This means you can install almost any data store that is supported on Linux, meaning that you can use MongoDB, Cassandra, MySQL, or almost any other data platform.
Managing Identity
006
  1. Download the Identity Training kit
    1. http://www.microsoft.com/en-us/download/details.aspx?id=14347
  2. Leveraging the Windows Identity Foundation SDK and training kit is probably the best starting point for anyone serious about implementing secure systems.
  3. Security is a big topic.
  4. Windows 8 applications can leverage claims-based authentication techniques. Typically, this involves a security token service, which creates SAML tokens. Inside these tokens are claims.
  5. Claims-based identity can greatly simplify the authentication process for the user because he or she doesn't have to sign in multiple times to multiple applications.
  6. Single sign in is ideal for some situations, such as to authenticate against multiple applications or websites.
  7. Claims-based identity is a way to achieve single sign in.  It can make the authentication less complex for your apps because those apps don't have to provide ways to create an account or password, etc.
  8. Another great feature of claims-based identity is that it allows your applications to obtain specific user information, without having to ask the user for that information.
  9. SAML tokens make it possible for single sign on scenarios, where your security credentials need to travel through different security gateways.
  10. The Access Control Service allows you to leverage third party identity providers, such as Facebook, Yahoo, Google, and Live.
  11. This frees the developer from having to worry about identity in their application. Identity management is complex and time consuming and takes away from a developer's focus on the application itself.

Download for Azure SDK



Downloads and Setup

Windows Azure Toolkit for Windows 8 Consumer Prv
  1. Note the developer tools. There are various IDEs, SDKs, and toolkits that need to be downloaded and installed. Visual Studio should be installed first because the SDK requires that.
  2. Notice that SQL Server is required because it is used by the Azure software to simulate a the Azure Storage service. Remember, you can develop cloud applications using the simulation environments that come with the tooling. In most cases you do not need to deploy to a data center in order to test your application.

 

Conclusion
It is important that developers familiarize themselves with cloud capabilities. If you have any questions, just post them here.
Here are some downloads to get you started:
Project Templates, Samples and Libraries Source Code http://watwindows8.codeplex.com/wikipage?title=Project%20Templates%2c%20Samples%20and%20Libraries%20Source%20Code&referringTitle=Documentation#
Creating a New Windows 8 Cloud Application http://watwindows8.codeplex.com/wikipage?title=Creating%20a%20New%20Windows%208%20Cloud%20Application&referringTitle=Documentation#
Running the Windows 8 Cloud Application http://watwindows8.codeplex.com/wikipage?title=Running%20the%20Windows%208%20Cloud%20Application&referringTitle=Documentation#
Using the Windows 8 Cloud Application Services Application http://watwindows8.codeplex.com/wikipage?title=Using%20the%20Windows%208%20Cloud%20Application%20Services%20Application&referringTitle=Documentation#
Sample Metro App using Windows Azure Service Bus http://watwindows8.codeplex.com/wikipage?title=Sample%20Metro%20App%20using%20Windows%20Azure%20Service%20Bus#
Raw Notifications Sample - C# and JavaScript http://watwindows8.codeplex.com/wikipage?title=Raw%20Notifications%20Sample#
Notifications Sample - C# and JavaScript http://watwindows8.codeplex.com/wikipage?title=Notifications%20Sample%20%e2%80%93%20C%23%20and%20JavaScript#
Push Notification Worker Sample http://watwindows8.codeplex.com/wikipage?title=Push%20Notification%20Worker%20Sample&referringTitle=Documentation#
Margie's Travel http://watwindows8.codeplex.com/wikipage?title=Margie%e2%80%99s%20Travel#
ACS Windows Metro Sample http://watwindows8.codeplex.com/wikipage?title=ACS%20Windows%20Metro%20Sample&referringTitle=Documentation#
How to Deploy Your Services to Windows Azure http://watwindows8.codeplex.com/wikipage?title=Appendix%20I%3a%20How%20to%20Deploy%20Your%20Services%20to%20Windows%20Azure%3f#
How to Obtain Namespace and Management Keys http://watwindows8.codeplex.com/wikipage?title=Appendix%20II%3a%20How%20to%20Obtain%20Namespace%20and%20Management%20Keys%3f#
Node.js http://www.windowsazure.com/en-us/develop/nodejs/#
Java http://www.windowsazure.com/en-us/develop/java/#
PHP http://www.windowsazure.com/en-us/develop/php/#
Python http://www.windowsazure.com/en-us/develop/python/#
Downloads http://www.windowsazure.com/en-us/develop/downloads/#
Published at DZone with permission of Bruno Terkaly, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)