Thursday, June 21, 2012

WP7 Platform Insights : Part 3 (Supported features)

In last two blogs I have discussed Windows Phone overview and app development related topics. Today we will discuss more about supported features in initial version of WP7. Also we will discuss about features which are added in mango and tango updates.
Basic features in 7.0
In this section, we will discuss major features supported by initial version of WP7 i.e. 7.0
  • Improved UI Design
    • WP7 supports slick, touch friendly UI similar Zune HD
    • Tiles serve as a shortcut to your favorite apps
    • Live tiles which can link to facebook profile or any other live information
  • Hubs
    • WP7 supports different social and productivity hubs
    • People hub aggregates your friends from your social networks
    • Picture hub gives access to all of your photos
    • Office hub will be useful for syncing documents between phone and PC
    • App Hub is lists of apps from Marketplace and also downloaded apps
  • Sensors
    • Accelerometer – It measures the three-dimensional force applied on a device.
    • Assisted GPS – Traditional GPS cannot provide accurate position when used in closed space. This error/drift can be avoided using AGPS (assisted GPS), which makes use position of Wi-Fi access points and cellular towers to provide more accurate position.
    • Proximity and Ambient light sensor – These sensors are available on WP7 devices. However, these are not available to developers through APIs.
  • Media
    • One of the best feature is developer can access FM Radio stations in their apps
    • You can integrate your app with Music + Videos hub
    • It supports PlayReady DRM
  • Data Storage/ Isolated Storage
    • WP7 supports sandbox model storage to improve security and reduce the unauthorized access and data corruption
    • WP7 supports three types of storage options like 
      • IsolatedStorageSettings class to store app settings (key/value pairs)
      • IsolatedStorageFile class to store files and folders
      • LINQ to SQL to store relational data
    • Isolated Storage Explorer (ISETool.exe) can be used for different I/O operations
  • Notifications
    • WP7 supports three types of notifications like tile, toast and raw
    • Tile notifications are used to update app tiles
    • Toast notifications will be added to status bar
    • Raw notifications can be delivered to running applications directly
Delicious features in Mango Update (7.5)
WP7 first version has been missing some of the most sought features available on other mobile platforms. Mango update (version 7.5) filled this gap by adding more than 500 features to WP7. Out of these 500 only few features stand out from others are like tethering, social feature and multitasking.
  • More social networks in people hub like Twitter, LinkedIn
  • Share Music and video content with Windows Live messenger
  • Bing experience is improved with Voice guidance for turn-by-turn navigation, Indoor Maps (US only) and Audio/Music search
  • TellMe (voice to text) service enables hands-free messaging and chatting
  • SkyDrive and Office-365 document syncing
  • IE9 mobile which supports hardware acceleration for HTML5 rendering
  • Wi-Fi hotspot support (carrier dependent)
  • Sensors
    • Gyroscope – measures rotational velocity on 3d axis
    • Compass – determines the angle by which device is rotated relative to earth’s magnetic north pole
    • Motion API combines data from compass, gyroscope and accelerometer sensors
  • Socket communication is supported
  • Alarms and Reminders
    • Both can be used as a scheduled notification
    • Sound file for alarm can be changed whereas reminders use default sound file
    • Clicking on alarm takes user to alarm app whereas clicking on reminders takes user to corresponding app which has set that reminder
  • Multitasking
    • Supports single foreground application
    • App can perform below actions in background
      • Playing audio
      • Scheduled tasks using background agents
      • HTTP file transfer requests
      • Scheduled notifications like Alarms and reminders
Features and limitations in Tango Update (7.5 Refresh)
This update has two branches. First branch does impose some restrictions on low-end (256MB RAM) devices while other branch adds some minor changes to high-end devices.
  • Missing features for 256MB RAM devices
    • Fast app switching
    • Generic Background agents
    • SkyDrive automatic photo upload
    • Managing podcast subscriptions and watching video podcasts
    • HD Video playback
  • New features
    • MMS supports multiple attachments, video and voice note
    • Location aware icon will be displayed whenever app accesses location
    • Supports exporting of contacts to SIM card
    • Memory status information
Update: Today Microsoft has announced major update to WP7 namely Windows Phone 8. To know more about WP8 features, visit this blog

Monday, June 18, 2012

WP7 Platform Insights : Part 2 (App Development)


Today we will explore WP7 application development frameworks and app development life cycle in detail.

Frameworks

Most of the developers working on Microsoft technologies are aware of two popular frameworks namely Silverlight and XNA. Silverlight is cross-platform, cross-browser implementation of .Net framework for building media experiences and rich interactive applications for the web on desktop. Microsoft uses XNA framework for game development on its most popular gaming platforms like Xbox 360, Zune HD and Windows 7.
Considering popularity of these frameworks and availability of expertise, Microsoft has decided to use these frameworks for its new mobile OS WP7. However, restrictions on mobile device like memory constraints and form factors forced Microsoft to tweak these frameworks slightly for WP7.
We listed imported features regarding these application frameworks below
  • Silverlight for Windows Phone
    • Based on Silverlight 4
    • Optimized runtime to display content on memory constrained devices
    • Hosted on client and will not support web apps
    • Additional features which are not part of Silverlight like
      • Gesture aware controls
      • Support for SIP (software input panel)
      • Manipulation events for touch input
    • Supports building and running managed applications
    • Useful for RIA style or XAML based UI and event driven app
    • Includes WP native controls, HTML browser control
  • XNA
    • Based on .Net framework 2.0
    • Single framework targeted for multiple gaming platforms
    • Greater portability using cross-platform input APIs which are orientation-aware and resolution-aware
    • Includes set of managed APIs for 2D/3D geometry, textures and shading
    • High performance gaming framework to create multi-screen 2D/3D games
    • Allows managing art assets (like models, meshes, textures)
Before mango update of WP7, developer has to use any one of the above frameworks for his application’s visual designs though sharing of some classes across framework was possible.
Mango update of WP7 removed this restriction and allowed to use combination of both frameworks for your application’s visual design as well. However, prefer using single framework based on your applications requirements. If at all required, combine these two frameworks in your application by using the new SharedGraphicsDeviceManager and UIElementRenderer class.

Development Lifecycle


Above diagram shows development lifecycle of WP7 apps.
Below are some of the highlights of this development lifecycle
  • Windows Live ID is necessary for publishing apps on marketplace
  • Your device need to be registered as test device for debugging purpose
  • If you unregister your test device, you can’t run manually installed (side loaded) apps
  • Maximum three devices can be registered per developer account
  • Zune software necessary to deploy app on device
In next blog we will explore features provided in WP7 initial version, mango and tango updates.

WP7 Platform Insights : Part 1 (Overview)


Today we will be discussing Microsoft’s latest mobile OS Windows Phone 7 (in short WP7). We can consider WP7 as a successor to Windows Mobile (WM) but not update to WM as WP7 developed from scratch. It is completely new refreshed mobile OS, which will compete with other mobile platforms. Focus of WP7 is more towards consumer as against Windows Mobile’s enterprise focus.

One of the major differentiator from other OS is its Metro design interface. Hub is another feature through which it combines local and online content. In addition, WP7 has tight integration with other Microsoft products like Xbox (most popular gaming platform), MS Office and Windows Live web-based services.


Brief History

In 2004, Microsoft started working on major update to WM under the codename ‘Photon’. However, this project came to end without any product release due to slowness. In 2008, Microsoft’s WM OS started losing its market share to Blackberry and iPhone. As an effect, Microsoft revamped the WM team in 2008 and started working on WM 7. Again, Microsoft failed to meet deadlines and it has released WM 6.5 as interim release instead of initially planned WM7.
Due to these hiccups, Microsoft developed new mobile OS from scratch in short span of time without providing backward compatibility. World saw the glimpse of Microsoft’s new mobile OS on 15 February, at Mobile World Congress (MWC) 2010 held in Barcelona. At MIX 2010 event, world witnessed some more details about this new OS. Finally, SDKs are arrived in September 2010.
Microsoft had many hiccups in OS naming also. Initially they released new mobile OS with name as ‘Windows Phone 7 Series’ transitioning from old windows mobile. As expected, this lengthy and difficult name came under criticism from around the world including developers and partners. Bowing to this pressure, Microsoft dropped ‘Series’ word from this name.
Year 2011, mobility world saw the new mega partnership between Microsoft and Nokia. As part of this partnership, WP7 became primary Smartphone OS for Nokia.


Platform Overview

Lets discuss how the WP7 application platform architecture is there and what development tools it provides.

Architecture

There are four main components in the WP7 Application Platform architecture


  • Runtimes
    • WP7 runtime supports Silverlight and XNA frameworks
    • You can run your Silverlight or XNA apps on WP7 with minor changes. These changes include adjusting UI for device’s screen resolution or making use of device specific features like GPS, Camera etc.
    • Runtime also includes phone specific components like sensors, Media etc.
  • Tools - When you install SDK, you will get many tools that are helpful for app development.
    • Visual studio – One of the best IDE is part of SDK. It supports debugger, designer, compiler, packager etc.
    • Expression Blend - Your UX team can use this tool and can create XAML files, which you can use it in your app directly. This helps developers and UX team to do their tasks independently.
    • Emulator – Developers can use emulator to run/debug their app before testing on actual device as it provides comparable performance to an actual device. WP7 emulator also supports emulating different device specific features like GPS, accelerometer etc. You can also take screenshots of your application.
    • XNA Game Studio – This is integrated game development environment used for Microsoft’s other platforms like Windows, Xbox 360 and Zune. Same tool is now available for WP7 developers. It includes other tools, which are useful for adding graphical and audio content into your game.
    • Documents – WP7 tools also includes sample codes, guides, API documentation etc.
  • Cloud Services – Cloud services are very useful to build powerful WP7 web applications with scalable features. It includes below mentioned services
    • Notifications (MPNS – Microsoft Push Notification Service) – Many applications need to fetch up to date information from server. For this, push notification is better as it reduces burden of polling and consumes less battery power.
    • Location – This cloud service is single source to get the position lookup data by making use of Wi-Fi, Cellular and GPS data. This service also includes AGPS, which improves fix for GPS.
    • Advertising SDK – This service is useful for monetizing your apps. Also provides efficient reporting mechanism.
    • Other services – Azure, Map, Identity, Social and Feeds are some other services which are supported WP7 platform.
  • Portal Services – Portal services supports marketplace related activities from single location. Below is list of some of the activities which portal services supports
    • Registration and validation – Developers can register here for App Hub using their Live ID.
    • Application submission – This includes set of online tools for helping developers to submit their apps in Marketplace. Here developers can track their apps certification status, provide updates to existing apps etc.
    • App Billing – Developers can use portal services to sell their paid apps. Marketplace supports mobile operator and credit card billing.
    • Business Intelligence – This is dashboard for your apps on marketplace. This dashboard shows all details of your apps like downloads, reviews, crashes etc.

Development Tools

We all know that Microsoft always provides best development tools compared any other technologies. Same is true in case of WP7. WP7 Developers can download and install Windows Phone SDK, which includes all necessary development tools and documents. WP7 SDK package contains below mentioned tools
Visual Studio 2010 Express for WP7
  • Development environment for WP7 which includes
    • Code editor and design surface for WP7
    • WP7 project templates
    • Toolbox containing WP7 controls
  • You can debug and deploy your apps on emulator or device
Note: If VS 2010 Professional or higher is already installed on your PC then WP7 SDK will install only plug-in for VS 2010 instead of VS 2010 Express for WP7
Silverlight SDK
  • Application framework used for writing RIA style user interfaces
  • It is XAML based and event driven app framework
  • Includes WP7 controls and web browser control
Expression Blend
  • Best UI design tool for designing XAML based interfaces for web and desktop applications
  • Accelerated results as design and development can be done independently
  • XAML files designed by UX team can be used by developer in their solutions directly
XNA Game Studio 4.0
  • Programming environment for creating games with VS
  • Includes XNA framework and managed libraries useful for game development for WP7, Windows, Xbox and Zune
WP7 Emulator
  • It can be used as a virtualized environment where you can debug, deploy and test your WP7 apps
  • Provides comparable performance to an actual device
  • Also supports simulation of GPS, accelerometer and orientation
  • Allows capturing screenshots
Other Tools
  • Advertising SDK allows you to monetize your apps
  • XAP deployment, isolated storage explorer and phone registration are some of the tools available as part of SDK
In next blog of this series, I will be discussing more about application development topics like frameworks and development lifecycle.