Friday, June 24, 2011

Windows Phone 7 Development

Windows Phone 7 Development.

Introduction

For programmes, Windows Phone 7 is also exciting, for it supports two popular and modern
Programming platforms: Silverlight and XNA.

Silverlight

A spinoff of the client-based Windows Presentation Foundation (WPF) has already given Web programmers unprecedented power to develop sophisticated user interfaces with a mix of traditional controls, high-quality text, vector graphics, media, animation, and data binding that run on multiple platforms and browsers. Windows Phone 7 extends Silverlight to mobile devices.

Generally you’ll choose Silverlight for writing programs you might classify as applications or utilities. These programs are built from a combination of markup and code. The markup is the Extensible Application Markup Language, or XAML and pronounced “zammel”. The XAML mostly defines a layout of user-interface controls and panels. Code-behind files can also perform some initialization and logic, but are generally relegated to handling events from the controls. Silverlight is great for bringing to the Windows Phone the style of Rich
Internet Applications (RIA), including media and the Web. Silverlight for Windows Phone is a version of Silverlight 3 excluding some features not appropriate for the phone, but compensating with some enhancements.

XNA

The three letters stand for something like “XNA is Not an Acronym” is Microsoft’s game platform supporting both 2D sprite-based and 3D graphics with traditional game-loop architecture. Although XNA is mostly associated with writing games for the Xbox 360 console, developers can also use XNA to target the PC itself, as well as Microsoft’s classy audio player, the Zune HD.

XNA is primarily for writing high-performance games. For 2D games, you define sprites and backgrounds based around bitmaps; for 3D games you defi ne models in 3D space. The action of the game, which includes moving graphical objects around the screen and polling for user input, is synchronized by the built-in XNA game loop.

The Hardware Chassis

Buttons

  • The front of the phone consists of a multi-touch display and three hardware buttons generally positioned in a row below the display. From left to right, these buttons are called Back, Start, and Search:
    Back Programs can use this button for their own navigation needs, much like the Back button on a Web browser. From the home page of a program, the button causes the program to terminate.
    Start This button takes the user to the start screen of the phone; it is otherwise inaccessible to programs running on the phone.
    Search The operating system uses this button to initiate a search feature.
  • Screen

    The initial releases of Windows Phone 7 devices have a display size of 480 × 800 pixels. In the future, screens of 320 × 480 pixels are also expected. There are no other screen options for Windows Phone 7, so obviously these two screen sizes play a very important role in phone development.

    Of course, phones can be rotated to put the screen into landscape mode. Some programs might require the phone to be held in a certain orientation; others might be more adaptable. You have complete control over the extent to which you support orientation. By default, Silverlight applications appear in portrait mode, but you’ll probably want to write your Silverlight applications so they adjust themselves to orientation changes. New events are available specifically for the purpose of detecting orientation change, and some orientation shifts are handled automatically. In contrast, game programmers can usually impose a particular orientation on the user. XNA programs use landscape mode by default, but it’s easy to override that.

    Like many recent phones and the Zune HD, the Windows Phone 7 displays will likely use OLED (“organic light emitting diode”) technology, although this isn’t a hardware requirement. OLEDs are different from flat displays of the past in that power consumption is proportional to the light emitted from the display. For example, an OLED display consumes less than half the power of an LCD display of the same size, but only when the screen is mostly black. For an all-white screen, an OLED consumes more than three times the power of an LCD.

    Because battery life is extremely important on mobile devices, this characteristic of OLED displays implies an aesthetic of mostly black backgrounds with sparse graphics and light-stroked fonts. Regardless, Windows Phone 7 users can choose between two major color themes: light text on a dark background, or dark text on a light background.

  • Input Device

    Most user input to a Windows Phone 7 program will come through multi-touch. The screens incorporate capacitance-touch technology, which means that they respond to a human fingertip but not to a stylus or other forms of pressure. Windows Phone 7 screens are required to respond to at least four simultaneous touch-points.

    A hardware keyboard is optional. Keep in mind that phones can be designed in different ways, so when the keyboard is in use, the screen might be in either portrait mode or landscape mode. A Silverlight program that uses keyboard input must respond to orientation changes so that the user can both view the screen and use the keyboard without wondering what idiot designed the program sideways. An on-screen keyboard is also provided, known in Windows circles as the Soft Input Panel or SIP. XNA programs also have access to the hardware keyboard and SIP.

Sensors and Services

A Windows Phone 7 device is required to contain several other hardware features sometimes called sensors and provide some software services, perhaps through the assistance of hardware. These are the ones that affect developers the most:
  • Wi-Fi

    The phone has Wi-Fi for Internet access to complement 3G data access through the cell provider. Software on the phone includes a version of Internet Explorer.
  • Camera

    The phone has at least a 5-megapixel camera with flash. Programs can invoke the camera program for their own input, or register themselves as a Photos Extra Application and appear on a menu to obtain access to photographed images, perhaps for some image processing.
  • Accelerometer

    An accelerometer detects acceleration, which in physics is a change in velocity. When the camera is still, the accelerometer responds to gravity. Programs can obtain a three-dimensional vector that indicates how the camera is oriented with respect to the earth. The accelerometer can also detect sharp movements of the phone.
  • Location

    If the user so desires, the phone can use multiple strategies for determining where it is geographically located. The phone supplements a hardware GPS device with information from the Web or cell phone towers. If the phone is moving, course and speed might also be available.
  • Vibration

    The phone can be vibrated through program control.
  • FM Radio

    FM Radio is available and accessible through program control.
  • Push Notifications

    Some Web services would normally require the phone to frequently poll the service to obtain updated information. This can drain battery life. To help out, a push notification service has been developed that will allow any required polling to occur outside the phone and for the phone to receive notifications only when data has been updated.

Requirement

  • Visual studio 2010
  • Windows Phone Developer Tools RTW
    The same powerful and easy to use Visual Studio integrated developer environment (IDE) handles developing Windows Phone 7 phone applications.
    • The Windows Phone Developer Tools includes the following Visual Studio 2010 Express
      • Windows Phone
      • Windows Phone Emulator Resources
      • Silverlight 4 Tools For Visual Studio
      • XNA Game Studio 4.0
      • Microsoft Expression Blend for Windows Phone
    • System Requirements for Windows Phone Developer Tools
      • Supported Operating Systems: Windows 7, Windows Vista
      • Windows® Vista® (x86 and x64) with Service Pack 2 – all editions except Starter Edition
      • Windows 7 (x86 and x64) – all editions except Starter Edition
      • Installation requires 3 GB of free disk space on the system drive.
      • 2 GB RAM

    Note :
    Windows Phone Emulator requires a DirectX 10 capable graphics card with a WDDM 1.1 driver
    Links For Download
    Link for online installation: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=04704acf-a63a-4f97-952c-8b51b34b00ce
    Link for offline installation: http://go.microsoft.com/fwlink/?LinkId=201927

Windows Phone 7 Development Tools and Resources

  • Windows Phone Developer Tools

    The basic tools you’ll need to start writing code for Windows Phone 7 are Visual Studio 2010 and Windows Phone Developer Tools (microsoft.com/express/Phone). The developer tools include Visual Studio 2010 Express for Windows Phone, the Windows Phone Emulator, Silverlight for Windows Phone, XNA Game Studio 4.0 and Expression Blend 4 for Windows Phone. If you already have Visual Studio 2010, XNA Game Studio or Expression Blend 4 installed, the developer tools will just update the applications with templates and other elements you need for Windows Phone development. Once you have the tools installed, start browsing through the MSDN Windows Phone Development documentation (bit.ly/fSYt8d). This is a crucial resource that you’ll come back to again and again.

  • App Hub

    Next, head over to the Microsoft App Hub (create.msdn.com) and set up your account. App Hub is a community for developers of apps and games for Windows Phone 7 or games for Xbox 360. You can find tools, advice and the support of fellow app developers here. Plus, you’ll use the App Hub dashboard as the official tool for submitting your apps for the Windows Phone marketplace.
    To register for App Hub you’ll need a Windows Live ID, and there’s a yearly $99 fee for membership.

  • Visual Basic Development

    The first tools for Windows Phone development focused on C# as the coding language. But if you prefer Visual Basic, don’t fret. The Visual Studio team has released Visual Basic for Windows Phone Developer Tools (http://bit.ly/haiyqH), which allows you to dive right in. The team announcement even includes a tutorial for creating your first Visual Basic app for Windows Phone 7, walking you through the development of a simple tip-calculator app.  No excuses now—get coding!

  • Windows Phone 7 for Absolute Beginners

    Still not sure what to do next? Get yourself over to Channel 9 and check out the “Windows Phone 7 Development for Absolute Beginners” video series (bit.ly/fZJSqC). Clint Rutkus and Bob Tabor (from LearnVisualStudio.net) guide you through this series of 65 short videos covering everything from platform basics to debugging and error handling. You’ll even dive into details such as using the GPS capabilities of Windows Phone 7 devices.

  • XPF: A Layout Framework for XNA

    General UI design and composition on Windows Phone 7 utilizes Windows Presentation Foundation (WPF) and Silverlight. But if you’re building games for the phone platform, you’re most likely going to be using XNA Game Studio (msdn.microsoft.com/aa937791), which uses different layout architecture. To simplify design under XNA, Red Badger has created XPF (bit.ly/dMAIOA), a layout framework for creating Windows and Windows Phone 7 apps with XNA. The XPF framework runs in a pure XNA application, yet was written to be familiar to WPF and Silverlight developers. There are 11 built-in controls, along with support for dependency properties, attached properties, animation and data binding. Plus, XPF is extensible to accommodate your own custom controls. It’s also worth taking a look through the Red Badger blog for additional tips and tricks for building and testing your Windows Phone 7 applications (red-badger.com/Blog/?tag=/wp7).

  • 31 Days of Windows Phone 7

    In the same vein as the Channel 9 videos mentioned earlier, Microsoft developer evangelist Jeff Blankenburg blogged “31 Days of Windows Phone 7” (bit.ly/dJ0u8k), writing a post every day in October 2010 that covers a different aspect of coding for Windows Phone 7. Blankenburg starts with the basic project template and works through topics including storage, UI controls, debugging, and even submitting your app to the Windows Phone Marketplace and integrating ads into your app.
    Blankenburg’s blog is full of other Silverlight and Windows Phone 7 development tips, and the 31 Days posts have been translated into Russian and Spanish.


2 comments:

  1. Microsoft has released the Windows Phone 7.1 Beta tools including all the hyped “mango” goodness targeting WP 7.0 and the 7.1 beta release.
    To download Tools for Windows Phone 7.1 http://bit.ly/kZoLKJ

    Phones running the new software, will let users search for restaurants and businesses in their immediate area, perform voice-based Web searches, identify music playing in their surroundings, and switch back and forth between applications. The release will also include a fully HTML 5 compatible web browser.

    ReplyDelete
  2. I have no words for this great post such a awe-some information i got gathered. Thanks to Author.
    Android apps development| Android app development companies|

    ReplyDelete