Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Windows Phone 7.5 Application Development with F#
Windows Phone 7.5 Application Development with F#

Windows Phone 7.5 Application Development with F#: Develop amazing applications for Windows Phone using F#

By Lohith G N
₱1,101.99 ₱770.99
Book Apr 2013 138 pages 1st Edition
eBook
₱1,101.99 ₱770.99
Print
₱1,377.99
Subscription
Free Trial
eBook
₱1,101.99 ₱770.99
Print
₱1,377.99
Subscription
Free Trial

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Buy Now

Product Details


Publication date : Apr 15, 2013
Length 138 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781849687843
Vendor :
Microsoft
Category :
Languages :
Table of content icon View table of contents Preview book icon Preview Book

Windows Phone 7.5 Application Development with F#

Chapter 1. Setting up Windows Phone Development with F#

In this chapter, we will try to understand the three important aspects that make up Windows Phone Development using F# (pronounced as F sharp), namely:

  • What is Windows Phone?

  • What is F#?

  • Prerequisites for development

We will go over these aspects, one by one in the coming sections.

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 http://msdn.microsoft.com/en-us/library/gg490768.aspx 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 http://i.msdn.microsoft.com/dynimg/IC513005.jpg 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.

What is F#?


F# is a .NET programming language. F# was initially started as a research project at Microsoft Research Lab by Don Syme. Later, it became a mainstream .NET programming language and is distributed as a fully supported language in the .NET Framework as part of Visual Studio.

According to Microsoft Research, F# is:

A succinct, expressive, and efficient functional and object-oriented language for .NET that helps you write simple code to solve complex problems.

F# is a strongly typed language; it uses the type inference. Since it uses the type inference, programmers need not declare the data types explicitly. The compiler will deduce the data type during compilation. F# will also allow explicit declaration of data types.

Prerequisites for development


To start developing for Windows Phone using F# as a language, you will need some prerequisites to be installed on your development system. The prerequisites are as follows:

  • Visual Studio 2010

  • Windows Phone Software Development Kit 7.1

  • Windows Phone Project and Item Templates for F#

So let's take a look at these one by one.

Visual Studio 2010

When you install Visual Studio 2010 (Professional or Ultimate) and choose the default options during installation, the installer will, by default, install Visual C#, Visual C++, Visual Basic, and Visual F#. This is by far the easiest way of starting to develop with F#.

Windows Phone Software Development Kit 7.1

The Software Development Kit (SDK) provides us with the tools needed to develop applications and games for the Windows Phone platform. The SDK can be downloaded from http://gnl.me/WPSDK71. The SDK installs the following components on your development system:

  • Microsoft Visual Studio 2010 Express for Windows Phone

  • Windows Phone Emulator

  • Windows Phone SDK 7.1 Assemblies

  • Silverlight 4 SDK and DRT

  • Windows Phone SDK 7.1 Extensions for XNA Game Studio 4.0

  • Microsoft Expression Blend SDK for Windows Phone 7

  • Microsoft Expression Blend SDK for Windows Phone OS 7.1

  • WCF Data Services Client for Window Phone

  • Microsoft Advertising SDK for Windows Phone

Windows Phone project and Item Templates for F#

The easiest way to get up and running is to utilize one of the project templates available through the Visual Studio Gallery. These templates have been created by the F# community and they provide a great way to kick-start your project. Daniel Mohl, an F# Most Valuable Professional (MVP) has written a couple of Visual Studio templates that will help us to quickly get up and running with Windows Phone development using F#. You can download any of the following available templates based on your needs. The templates and URL from where you can download them is as follows:

Summary


In this chapter you learned about Windows Phone as a new mobile platform. We looked at how Windows Phone Application Platform offers a standardized platform for developers. We also looked at several features that Windows Phone provides.

Then we looked at a new functional programming language in .NET framework called F#. F#, which started in Microsoft Research Lab is now a mainstream .NET programming language.

After understanding Windows Phone as a platform and F# as a language, we then looked at the prerequisites that are required for developing applications for Windows Phone using F# as the language.

In the next chapter we will take a look at the different project templates we downloaded. We will go in depth into each project and understand the various components of each project.

Left arrow icon Right arrow icon

Key benefits

  • Understand the Windows Phone application development environment and F# as a language
  • Discover how to work with Windows Phone controls using F#
  • Learn how to work with gestures, navigation, and data access

Description

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.

What you will learn

Windows Phone application development with function language F# Work with Windows Phone controls Understand screen orientations in Windows Phone Discover page navigation in Windows Phone Get to grips with gesture events in Windows Phone Explore data access and storage in Windows Phone Become familiar with handlers and choosers in Windows Phone Learn more about sensors in Windows Phone

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Buy Now

Product Details


Publication date : Apr 15, 2013
Length 138 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781849687843
Vendor :
Microsoft
Category :
Languages :

Table of Contents

16 Chapters
Windows Phone 7.5 Application Development with F# Chevron down icon Chevron up icon
Credits Chevron down icon Chevron up icon
About the Author Chevron down icon Chevron up icon
About the Reviewers Chevron down icon Chevron up icon
www.PacktPub.com Chevron down icon Chevron up icon
Preface Chevron down icon Chevron up icon
Setting up Windows Phone Development with F# Chevron down icon Chevron up icon
F# Windows Phone Project Overview Chevron down icon Chevron up icon
Working with Windows Phone Controls Chevron down icon Chevron up icon
Windows Phone Screen Orientations Chevron down icon Chevron up icon
Windows Phone Gesture Events Chevron down icon Chevron up icon
Windows Phone Navigation Chevron down icon Chevron up icon
Windows Phone and Data Access Chevron down icon Chevron up icon
Launchers and Choosers Chevron down icon Chevron up icon
Windows Phone Sensors Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Filter icon Filter
Top Reviews
Rating distribution
Empty star icon Empty star icon Empty star icon Empty star icon Empty star icon 0
(0 Ratings)
5 star 0%
4 star 0%
3 star 0%
2 star 0%
1 star 0%

Filter reviews by


No reviews found
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.