Mobile Zone is brought to you in partnership with:

Husband, Dev Advocate at @Telerik, MSFT MVP, Windows/Web/Mobile Developer, @INETA & @M3Conf Secretary, @WindowsDevUG Leader. Speaker. Author. Yes, a geek! Samidip is a DZone MVB and is not an employee of DZone and has posted 18 posts at DZone. You can read more from them at their website. View Full User Profile

7 Deadly Sins for Windows Phone Developers: Sloth

04.04.2012
| 2696 views |
  • submit to reddit

This is the third post in the article series “7 Deadly Sins for Windows Phone Developers!“.



null


What is Sloth ?

From http://deadlysins.com:

Sloth is the avoidance of physical or spiritual work.

Why: You’re shiftless, lazy, and good fer nuthin’.


How does Sloth relate to Windows Phone development ?

– failure to utilize resources ..

As highly as you may think of our smartphones, they are still tiny devices with limited memory/processing power & precious battery life. Any work we can offload from our smartphones helps in extending battery life and putting data/common processing out somewhere else aids in multi-user/multi-platform mobile solutions. This is where cloud solutions step in with ubiquitous computing, massive scalability & high availability on a pay-per-use model. Cloud & mobility simply makes sense.

So, if you are a Windows Phone developer, have you considered leveraging Windows Azure to augment your Windows Phone solutions? If your answer is anything other than “I went with Amazon/other cloud providers ..”, it is not satisfactory. Here are few ways Windows Phone developers can get around being a Sloth & consider utilizing Azure’s cloud infrastructure for their Windows Phone applications:

  • Windows Azure: Learn more about it here. Read up on the possibilities with features, subscriptions, business model & how to get started as a developer. Hint – it is very easy!
  • Freebies: As with anything, try it out first & see if it makes sense. There are free Azure Trials for you to play around with. Also, if you have MSDN Subscriptions, significant Azure benefits would come free .. learn more here.
  • Data: This is the crux of any mobile app – relational or non-relational. Family members will want to share data between apps running on their devices. You, as a developer, will want to support multiple platforms to maximize your reach. Both of these suggest that data could be cached on devices; but needs to be stored centrally. Enter Azure. Relational data goes into SQL Azure & non-relational data goes into Blobs/Tables .. both with massive scalability & high availability.
  • Glance & Go: Remember the “Really” commercials for Windows Phone? Push Notifications in Windows Phone is one of it’s best-selling features and epitomizes the Glance & Go approach. Why the need to launch an app when a simple Live Tile suffices? With Mango, the flipping Live Tiles are also an opportunity for developers to be creative in what gets pushed out as Live Tiles .. invite your users back into your app. Azure can serve as the perfect backend to your Windows Phone app; one that hosts services that wake up to send Push Notifications as Tiles/Toast/Raw to registered phones running your app. And you can fine-tune exactly how much backend horsepower you need depending on your user-base.
  • Scalability: You make a seasonal app, like ones that go with NFL season. Or you make an app that skyrockets in downloads but slows down within a month. If your Windows Phone app was leveraging any other backend for services/data, how else will you scale up & down? You might either lose users or overpay your ISP/ for hardware. This is where Azure gives you on-demand elasticity so you pay for only what you consume.
  • OData: Accept it .. we’ll live in a hybrid mobile platform world for a very long time. Wouldn’t it be nice to not have to re-invent your data access layer between iOS/Android/Windows Phone apps? Enter OData – the Open Data Protocol. Based on the simple premises of HTTP and Atom/JSon, OData acts an platform-independent data interchange protocol. Like RSS for real updateable data. And it comes with proxy-building libraries for various ecosystems. So, do once & apply to all platforms .. really. Check out details about OData on it’s home site or the many articles we’ve written up on Silverlightshow.
  • CDNs: Yes, you can host your application backend with your local ISP or even under your desk. But if you are serving up imagery, maps, media or anything heavy, and you have users all over the world, our app will see lag. This is just because of the physics of delivering content across continents. Wouldn’t it be nice to serve up the content from some servers close to where the user is? Enter Azure Content Delivery Network .. an unique advantage of cloud infrastructure that includes edge cache nodes across the world. Your content essentially gets cached & Azure does the DNS magic to serve up requests closest to where the user of your app is. Very easy to set up & must-take-advantage of cloud computing. Learn more here & here.
  • Azure WP7 Toolkit: To make it a little easier for Windows Phone developers to leverage Azure, the Azure DPE team has done a lot of work around toolkits & helper libraries. There are now Azure Toolkits for Windows Phone, iOS & Android. So, no matter what mobile platform you are building your apps in, it should be easy to leverage Azure, since these toolkits essentially abstract out some of the Azure intricacies for the mobile developer. The Azure Toolkit for WP7 (details here) has awesome templates which give you a great starting point if your Windows Phone app had to use SQL Azure, Tables, Blobs & Push Notifications from the cloud. Get the bits, start a New Project & hit F5!
  • ACS, Notifications & Nugets: Is the full Azure Toolkit for WP7 too much for your scenario? Worry not, as MSFT has also released individual features as Nugets (details here), for easy consumption. Need to authenticate users to your app using federated identity from Google/Live/Faceboook etc? There is a Nuget that just does ACS (Access Control Service) through Azure .. this is superbly easy way to leverage the user’s existing identity by allowing Azure to act as a broker for tokens. Need to send out Push Notifications to your apps .. there is a Nuget for that too. So, grab what you need & fire away.
  • Live APIs: Use SkyDrive? Yeah, who doesn’t like 25 Gigs of free cloud storage? Chances are your Windows Phone users with Live IDs already use SkyDrive. If you need to augment storage in your app & push something off to cloudverse, why the need to spin up storage yourself when there’s SkyDrive? MSFT recently opened up Live APIs & a SDK which give you secure access to user’s SkyDrive & much more through the Live Services suite. More details here, along with this article on how to leverage SkyDrive SDK from your Windows Phone App.
  • Reuse: So, you know all about Push Notifications & the MSFT Push Notification Service (MPNS) for Windows Phone. Building Metro apps for Windows 8? Thankfully, the Push Notification architecture is quite similar & your knowledge/services could be easily leveraged. So, why not build one backend to feed both Windows Phone & Metro Apps? There is even a Azure Toolkit for Windows 8 (details here) to help you out.

 


Tell me I didn’t make my case? :) So, go ahead .. give Azure a shot when it comes to building a supporting backend for your Windows Phone app. Off course, if it is viable & makes sense for your solution. Hopefully, you come back tomorrow for the Day #4 article in this series of “7 Deadly Sins for Windows Phone Developers!“.

Adios!

Published at DZone with permission of Samidip Basu, 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.)