Book Image

Windows Phone 7.5 Application Development with F#

By : Lohith G N
Book Image

Windows Phone 7.5 Application Development with F#

By: Lohith G N

Overview of this book

Windows Phone is an OS which is also a platform in itself and provides an opportunity for application developers to build their apps and sell them on the Windows Phone Marketplace. Windows Phone is slowly catching up in the race with iOS and Android. Although well suited for scientific and mathematical calculations, the Windows Phone Platform provides an opportunity to program in F#. "Windows Phone 7.5 Application Development with F#"  focuses on making the user aware of Windows Phone App Development with the F# programming language in as short a time as possible. The book teaches you about the development environment, helps you understand the project structure, understand the controls, and ends with some of the cool features of the platform like sensors, launchers, and choosers. The book starts off with enabling the user with the right tools required to start developing. It focuses on getting the IDE ready, and project and item templates. By the end of the book the user will be familiarized with the different aspects of the platform itself. The transition from one chapter to another is short and focused so that you can get to the meat of the topic quickly.
Table of Contents (16 chapters)
Windows Phone 7.5 Application Development with F#
About the Author
About the Reviewers
Windows Phone Screen Orientations
Windows Phone Gesture Events
Windows Phone and Data Access

What is Windows Phone?

Windows Phone is the new mobile operating system from Microsoft Corporation and was launched in October 2010. After the initial release, there were a series of updates to Windows Phone with the recent one being Windows Phone 7.5 (Mango).

Windows Phone has the tagline "Put people first", and is mainly aimed at consumers or end users. Windows Phone is the successor to a previous version of mobile operating system from Microsoft known as Windows Mobile. Windows Mobile was an operating system designed around the Windows CE (Compact Edition) kernel. Windows Phone, being a new platform written from scratch, is not compatible with the earlier versions of Windows Mobile, that is, it does not support backward compatibility. So applications written for Windows Mobile won't run on Windows Phone. Windows Phone and Windows CE are just two different mobile platforms available at present from Microsoft.

Windows Phone has a fresh and new user interface called Modern UI , a typography-based design language that is inspired by the transport system.

Windows Phone – a standardized platform

The biggest problem that application developers for mobile platforms faced was the varied range of development environments they had to adapt to. The mobile development environment was completely different from those compared to either a desktop application development environment or a web application development environment. Though some development environments like Microsoft Platform, which includes developing using the popular Integrated Development Environment (IDE) Visual Studio and languages like Visual C++ or Visual C# were, to some extent, similar.

But, one had to face the challenges of handling different form factors, device capabilities, hardware differences, and other incompatibilities. With Windows Phone, Microsoft has made sure that it provides a common design and a common set of capabilities for devices from many different manufactures. So be it any device from any manufacturer, as a developer we only have one set of design and capabilities to tackle. This makes it easier for the developers to concentrate on their application and not worry about any other nuances.

Microsoft has set minimum requirements for the hardware on which the Windows Phone runs. The hardware requirements are as follows:

  • Capacitive touch: Four or more contact points

  • Sensors: GPS, accelerometer, compass, light, proximity

  • Camera: 5 MP or more, Flash, dedicated camera button

  • Memory: 256 MB, 8 GB flash storage or more

  • GPU: DirectX 9 acceleration

  • Processor: ARMv7 Cortex/Scorpion or better

  • Screen sizes: 480 x 800 WVGA, 480 x 320 HVGA

  • Keyboard : Optional

  • Hardware buttons: Must be fixed on the face

The following image from shows the various features a Windows Phone has to offer for both developers as well as consumers:

Windows Phone features

Development option for Windows Phone

Windows Phone Application Platform is built on the existing Microsoft tools and technologies, such as Visual Studio, Expression Blend, Silverlight, and XNA Framework. The learning curve for developing Windows Phone Application is minimal for anyone who is familiar with the tools and technologies on which the platform is built. Windows Phone Application Platform provides two main frameworks for development. They are:

  • Silverlight Framework – used for event-driven, XAML-based applications. This framework allows developing markup-based and rich, media-based applications.

  • XNA Framework used for loop-based games. Allows developing immersive and fun gaming- and entertainment-based applications.

Windows Phone Application Platform Architecture

The platform itself is made up of four main components. The following figure from shows the components of Windows Phone Application Platform:

Windows Phone Application Platform

In this figure we have:

  • Runtimes: Silverlight, XNA Framework, and phone-specific features provide the environment to build graphically-rich applications

  • Tools: Visual Studio, Expression Blend, and related tools provide developer experience to create, debug, and deploy applications

  • Cloud Services: Azure, XBOX Live, notification services, and location services provide data sharing across cloud and a seamless experience across the devices a consumer will use

  • Portal Services: Windows Phone Marketplace allows developers to register, certify, and market their applications

The components of interest for any developer are runtime and tools. Runtime because that's the base on which applications are developed. Tools play another major part in the development experience. Visual Studio and Expression Blend try to enhance the development experience by providing features that makes a developer's job easy while developing. Visual Studio in particular is a well-known IDE, which lets you create, debug, and deploy an application without having to go out of the IDE.

All phases of the development can be achieved staying within the IDE and this is the biggest experience one gets when on this platform. Expression Blend makes visual designing very easy as it allows the drag-and-drop capability on the design surface. When designing in Blend, you just set a bunch of properties and the code is automatically written by the Blend for you.