SlideShare a Scribd company logo
1 of 27
1. Classification of the document
1.1 Purpose
By making this document, the developer community who wanted to get started in
Windows PhoneApp Development, can easily understandfew important aspects of
Windows PhoneMobile Platformlike UI/UX, Design Guidelines, Naming Conventions,
Architecture, so on and so forth.
1.2 Target Audiences
This document is targetedto:
 Those developers who know basics of Application development,especially
Mobile App Development andwant to get startedwith Windows Phone App
Development.
 Those developers who want to know more aboutArchitecture, Design and
Flow of Windows PhoneApp
2. General
 Framework
 Windows PhoneApplication can be developed on the base of total 2
Framework for two different Operating Systems, Windows Phone OS 8.0 & OS
8.1
 App Development for Windows Phone 8.0 can be done only on “Silverlight
Framework” Platform, whereas if we develop App for Windows Phone 8.1,
then there are 2 choices. Windows Phone OS 8.1 made on the base of two
different Frameworks, one of them is “SilverlightFramework” and the other
one is “Windows Runtime” framework (WinRT framework).
2.1 Deliverables foraproject
 In Windows Phone Application project the main deliverable is the Application
Installation Package wrapped in the file format and encryption of “.xap” or
else “.appx”
(Here XAP is the application package of Silverlightbased App, and APPX is the
application package of Windows Runtime(WinRT) based App.)
2.1.1 One Pager
 Windows PhoneApplication developmentmade easy with the help of
Interactive Development Environment(IDE) Visual Studio.
 While Application development, debuggingof the app can be done in a
developer unlockedWindows Phone device as well as “Windows Phone
Emulator”.
 One Application of Windows Phone can contain multiple projects developed
in same framework.
 While Developing Windows Phone OS 8.1 Application based on “Windows
Runtime” platform, developer needs to have “Windows 8.1 Developer
License” installedwith the visualstudio IDE. To gain the Developer License,
one needs to just signin with respective Microsoft account.
 Key Featuresof Windows Phone Application which makes the app different
from otherplatforms are:
- Pin to Startfunctionality:- Pin specific application page on startscreen as a
Tile
- Tile Notification:- developer can set notification on Tile pinned to start
screen
- Live Tile:- developer can updatethe Tile pinned to startscreen periodically
- Setting Lock Screen Notification & Background
- Fast App Switching functionality
 After developing application, developer needs to select a unique “App Name”
from the Windows phone store Developer portaland uploadthe released
version of Windows Phone Installationpackage in form of XAP. With that
developer alsoneeds to provide Application specific information in order to
certify the app on store.
 The durationof Application certification on Windows Phone Store Developer
Portal,varies with the scenarios and circumstances in which App submitted to
verify. After successfulverification of Application, the application can be
publishedon the storemanually as well as automatically.
2.1.2 Release Candidate
 After developing the basic application, developer can submit the app to the
Beta storefor testersto testthe application flow andfor Quality Assurance.
 After completion of Beta app testing, developer can submit the application on
store as Release Candidate with integration of App Track functionality.
 Developer can check the Error & Exception logs of the Application published
on the store from the Developer portalof Windows PhoneStore.
2.1.3 Technical Aspects
 After completing Development of Windows Phone Application, We need to
Build the Solution in terms of gettingOutputXAP package file.
 While Building the Solution, the IDE Visual Studio will make a root Folder with
the name of Application Project. And in thatroot folder, Source Code of whole
Application goes.
 As the Structureof Windows PhoneApplication Project, the Opening file will
be with the “.SLN” extension which standsfor “Solution”.
 So, Technically the deliverable of Windows Phone App Project, we’ll get a fully
working copy of Source code in form of Code files as “.cs”, “.xaml”, “.sln”,
“.csproject” etc.
2.1.4 Security Aspects
 The Application package thata developer will get after successfully building a
Windows Phoneapplication, will be kind of a compressed form of the code
files. Anyone with File extraction technologycan open thatapplication
installationpackage and extract the code files resides in the package.
 But, once if developer will host thatXAP package ontothe store and if that
package publishedafter successfullyverified and certified by Windows Phone
Store, then the application package downloaded from the store, is a non
extractable file in the same form of XAP package.
 Once publishingthe application, Windows Phone Store Encrypt the whole XAP
package and the code files in the package with some unique technology and
key. So, the XAP files downloadedfrom the Store cannot be extracted by
anyone except “Windows Phone” at the time of installation.
3. Development
 Overview – Windows Phone Development
 Windows Phone8.1 Application Development can be done with the help of
two different frameworks as “SilverlightFramework” and “Windows Runtime
framework”. Whereas Windows Phone 8.0 applications development can be
done with only “Silverlight Framework”.
 Here, while developing Windows Phone 8.1 application developer can choose
from two different development environmentsto develop application with.
- XAML + C# (XAMLas Frontend+ C# as Backend)
- HTML5 + CSS3 + JavaScript (HTML5 & CSS3 as Frontend+ JavaScriptas
backend)
 Provision of Windows Phone Application Development with HTML5 + CSS3 +
JavaScript is especially for Web Developers, who wanted to develop windows
phone applications as well.
 Web Developers can directly migrate their Mobile Website code to Windows
Phone application with smallamountof changes and few changesin including
libraries specific for windows phone application.
 There is one more option available for .NET developersto developwindows
Phone 8.0 as well as Windows Phone 8.1 application with the help of XAML +
VB.net. Here XAML used as Frontendand VB.net is for Backend.
 Universal Application:
- Developers can also build Windows Phone Application by creating
UniversalApplication in Visual Studio.
- UniversalApplication based on the concept of “Write Once, Run
Everywhere” concept. Here Universal App contains two kind of application
from which one is Windows Phone Application (targetedto Windows
Phone OS 8.1)and the second one is Windows Store (MetroApp)
application targeted to (Windows 8.1 & higher).
- UniversalApplication is based on “Windows Runtime” framework.
 Application developed for Windows Phone OS 8.0 can runon Windows phone
OS 8.1 or greater,but app developed in WinRT framework and for OS 8.1
cannot be migrated to Windows Phone OS 8.0
 Windows PhoneApplication is following Forward Migration butnot reverse
with respect to Windows Phone OS versioning system.
3.1 SolutionStructure
 Windows PhoneApplication is made easy with the help of VisualStudio (VS)
Interactive Development Environment(IDE).
 Visual Studio has severalversions from which VS 2012 or greater is required in
order to develop Windows Phone OS 8.0 or higher application. Althoughto
develop windows phone7.5/7.8 application, visual studio2010 or greater
versions required.
3.1.1 Visual Studio
 Visual Studio provides an integratedenvironment and fullsolution to develop
windows phoneapplication.
 Solution Explorer in visual studiois the tool which managesall the code
portions. In Solution explorer, the root directory is the Solution which
contains more than one project (if any) andthose projects are placed
hierarchically in the Folderscreated by Visual Studio.
 Solution Explorer reflects the Copy of files and folders created by visual studio
and those required to build the project.
 In the Project root folder there are couples of folders and files which contain
the resources thatapplication is usingand the code thatexecutes the
application.
 Project rootfolder is mainly divided into 5 portions as mentioned below:
- Properties
- References
- Assets
- Resources
- Other manuallyadded code files
 Properties:
- This section contains 3 files by default when creating project.
“AssemblyInfo.cs”, “AppManifest.xml” and“WMAppManifest.xml”
- Here WMAppManifest.xml file is the file which containsthe code of
Application properties and the configuration of the Windows Phone
App.
- From this WMAppManifest.xml file, developer can change the App
configuration of Application UI, Capabilities that application holdsfrom
the device it installsin, Requirementsof device in order to installthe
app and the packaging information of the application installation
package which generatesat the time of building the project.
 References:
- This section holdsthe references to the Libraries usedin the
application whether the library is a third party external or internal
project Code.
- Reference section is the one in which Visual Studio installsthe NuGet
Packages in the project solution.
- MoreoverThe Reference section also holdsthe reference to the core
libraries that used in the application in order to execute the basic
project.
 Assets:
- In most of the case this folder used to hold allof the images thatused
in the application anywhere, including the tile images and Logos with
different resolutionsof the application.
- There can be nested folders in the assetsroot folder to maintain the
modularity.
 Resources:
- This section contains allthose code files which define the styles and
Templates of specific controlsused in the whole application project.
- By default there will be a resource file named “AppResources.resx”.
 Other thanthese four Sections, the Developer can add customfolders and
files as requirement and as appropriate.
3.2 Namingin Windows Phone & C#
3.2.1 Naming Conventionin C#
 In fact there isn’t any strict ruleto follow the Naming convention in C#
languagebut it’s always a good practice to follow a specific form of
Naming Conventionto make it easier to maintain futureconflictions in
Applications Variable declarations.
 Here are few importantGuidelines which is used by Microsoft, to
develop Samples and Documents in order to maintain the common
understandingof coding standardsin C#.
 This Portion of the Document is taken from “Microsoft Developer
Network” Community Library, to make surethe preciseness of
Content.
 Selecting Variable Names
- Choose the names of variablethose can be easily readable.
i.e. a variableshouldnamed “SelectedObject” instead “SeleObj”.
- Try to avoid using Underscores, Hyphens &nonalphanumeric
keyword.
i.e. a variableshouldnamed “TextboxName” instead “textbox_name”.
- Try to avoid use of wildly usedkeywords or matching the keywords.
- Avoid usingHungarian Notation.
 Proper Abbreviationsand Acronyms
While choosingidentifier names, do not use abbreviation or
contractionsas part of it. Try to avoid use of acronyms thoseare not
wildly accepted.
 Letter Capitalization
In capitalization style, there are 3 cases.
- Pascal Case
The first letter in the identifier and the first letterof each subsequent
concatenated word are capitalized. You can use Pascal case for
identifiers of three or more characters.For example:
i.e. TextBox
- Camel Case
The first letter of an identifier is lowercase and the first letterof each
subsequentconcatenatedword is capitalized. For example:
i.e. textBox
- Upper Case
All lettersin the identifier are capitalized. Use this convention only
for identifiers thatconsist of two or fewer letters.For example:
i.e. System.IO
i.e. System.Web.UI
 Case Sensitivity
 Do not usenames thatrequire case sensitivity. Components
must be fully usable from both case-sensitive andcase-
insensitive languages.Case-insensitivelanguagescannot
distinguishbetween two names within the same context that
differ only by case. Therefore, you must avoid this situation in
the components or classesthat you create.
 Do not create two namespaces with names thatdiffer only by
case. Forexample, a case insensitive languagecannot
distinguishbetween the following two namespace declarations.
i.e. namespaceee.cummings;
namespaceEe.Cummings;
 Do not create a function with parameter names thatdiffer only
by case. The following example is incorrect.
i.e. void MyFunction(stringa, stringA)
 Do not create a namespace with type names thatdiffer only by
case. In the following example, Point p and POINT p are
inappropriate type names because they differ only by case.
i.e. System.Windows.Forms.Point p
System.Windows.Forms.POINT p
 Do not create a type with property names that differ only by
case. In the following example, int Color and int COLOR are
inappropriate property names because they differ only by case.
i.e. int Color {get, set}
int COLOR {get, set}
 Do not create a type with method names thatdiffer only by
case. In the following example, calculateand Calculateare
inappropriate method names because they differ only by case.
i.e. void calculate()
void Calculate()
 Type Name Confusion
 Use names that describe a type's meaning ratherthannames
thatdescribe the type. In the rare case that a parameter hasno
semantic meaning beyond its type, use a generic name. For
example, a classthat supportswriting a variety of datatypes
into a streammight havethe following methods.
i.e.
void Write(double value);
void Write(float value);
void Write(long value);
void Write(int value);
void Write(short value);
 Do not create language-specific method names, as in the
following example.
i.e.
void Write(double doubleValue);
void Write(float floatValue);
void Write(long longValue);
void Write(intintValue);
void Write(short shortValue);
 Namespace Naming Guidelines
 The generalrule for naming namespaces is to use the company
name followed by the technologyname andoptionally the
feature and design as follows.
Format:
CompanyName.TechnologyName[.Feature][.Design]
i.e.
Microsoft.Media
icrosoft.Media.Design
 Prefixing namespace names with a company name or other
well-establishedbrand avoids the possibility of two published
namespaces havingthe same name. For example,
Microsoft.Office is an appropriateprefix for the Office
AutomationClasses provided by Microsoft.
 Use Pascal case for namespaces, and separatelogical
components with periods, as in Microsoft.Office.PowerPoint. If
your brandemploys nontraditionalcasing, follow the casing
defined by your brand,even if it deviates from the prescribed
Pascal case. For example, the namespaces NeXT.WebObjects
and ee.cummings illustrateappropriate deviations from the
Pascal case rule.
 Class Naming Guidelines
 Use a noun or nounphrase to name a class.
 Use Pascal case.
 Use abbreviations sparingly.
 Do not usea type prefix, suchas C for class, on a class name.
For example, use the classname FileStream ratherthan
CFileStream.
 Do not usethe underscorecharacter(_).
 Occasionally, it is necessary to provide a classname thatbegins
with the letterI, even thoughtheclass is not an interface. This
is appropriateas long as I is the first letter of an entire word
thatis a part of the class name. For example, the classname
IdentityStore is appropriate.
 i.e.
public class FileStream
public class Button
public class String
 Interface Naming Guidelines
 Name interfaces with nounsor nounphrases,or adjectives that
describe behavior. For example, the interface name
IComponent uses a descriptive noun. The interface name
ICustomAttributeProviderusesa nounphrase. The name
IPersistable uses an adjective.
 Use Pascal case.
 Use abbreviations sparingly.
 Prefix interface names with the letter I, to indicate thatthe type
is an interface.
 Use similar names when you define a class/interface pair where
the class is a standardimplementation of the interface. The
names shoulddiffer only by the letter I prefix on the interface
name.
 Do not usethe underscorecharacter(_).
 i.e.
public interface IServiceProvider
public interface IFormatable
 Attribute Naming Guidelines
 always add the suffix Attribute to custom attributeclasses. The
following is an example of a correctly named attributeclass.
i.e.
public class ObsoleteAttribute{}
 Enumeration Type Naming Guidelines
 Use Pascal case for Enum types andvalue names.
 Use abbreviations sparingly.
 Do not usean Enum suffix on Enum type names.
 Use a singularname for most Enum types, but usea pluralname
for Enum types that are bit fields.
 Always add the FlagsAttributeto a bit field Enum type.
 Static Field Naming Guidelines
 Use nouns,noun phrases,or abbreviations of nounsto name
static fields.
 Use Pascal case.
 Do not usea Hungariannotation prefix on static field names.
 It is recommended thatyou use static properties instead of
public static fields whenever possible.
 Parameter Naming Guidelines
 It is important to carefully follow these parameternaming
guidelines because visual design toolsthatprovide context
sensitive help and class browsingfunctionality display method
parameter names to usersin the designer.
 Use camel case for parameter names.
 Use names that describe a parameter'smeaning rather than
names that describe a parameter'stype. Development tools
shouldprovide meaningful information about a parameter's
type. Therefore, a parameter'sname can be put to better use
by describing meaning. Use type-based parameter names
sparingly andonly where it is appropriate.
 Do not usereserved parameters. Reservedparameters are
private parametersthat might be exposed in a future versionif
they are needed. Instead, if more data is needed in a future
version of your classlibrary, add a new overloadfor a method.
 Do not prefix parameternames with Hungariantype notation.
i.e.
Type GetType(string typeName)
stringFormat(stringformat, object[] args)
 Method Naming Guidelines
 Use verbs or verb phrasesto name methods.
 Use Pascal case.
i.e.
RemoveAll()
GetCharArray()
Invoke()
 Property Naming Guidelines
 Use a nounor nounphrase to name properties.
 Use Pascal case.
 Do not useHungarian notation.
 Consider creating a property with the same name as its
underlyingtype. For example, if you declare a property named
Color, the type of the property shouldlikewise be Color. See the
example later in this topic.
 Below are the examples:
 public enum Color
{
// Insert code for Enum here.
}
public class Control
{
public Color Color
{
get {// Insert code here.}
set {// Insert code here.}
}
}
 publicenum Color{// Insert code for Enum here.}
public class Control
{
publicint Color
{
get {// Insert code here.}
set {// Insert code here.}
}
}
 Event NamingGuidelines
 Use Pascal case.
 Do not useHungarian notation.
 Use an EventHandler suffix on event handlernames.
 Specify two parametersnamed sender and e. The sender
parameter representsthe object thatraised the event. The
sender parameteris always of type object, even if it is possible
to use a more specific type. The state associated with the event
is encapsulatedin an instance of an event class named e. Use an
appropriate andspecific event classfor the e parameter type.
 Name an event argumentclass with the EventArgssuffix.
 Consider naming eventswith a verb. For example, correctly
named event names include Clicked, Painting, and
DroppedDown.
 Use a gerund(the"ing" form of a verb) to create an event name
thatexpresses the concept of pre-event, anda past-tenseverb
to represent post-event.For example, a Close event thatcan be
canceled shouldhave a Closing event and a Closed event. Do
not use the BeforeXxx/AfterXxx namingpattern.
 Do not usea prefix or suffix on the event declaration on the type.
For example, use Close instead of OnClose.
 In general,you shouldprovide a protected method called OnXxx
on types with events thatcan be overridden in a derived class.
This method shouldonly have the event parameter e, because
the sender is always the instance of the type.
i.e.
 public delegate void MouseEventHandler(objectsender,
MouseEventArgse);
 public class MouseEventArgs:EventArgs
{
int x;
int y;
publicMouseEventArgs(intx,int y)
{ this.x = x; this.y = y; }
publicint X { get { returnx; } }
publicint Y { get { returny; } }
}
 LayoutConventions
 Write only one statement per line.
 Write only one declaration per line.
 If continuation lines are not indented automatically, indent
them one tabstop (four spaces).
 Add at least one blankline between methoddefinitions and
property definitions.
 Use parenthesesto make clausesin an expression apparent,
as shown in the following code.
 Commenting Convention
 Place the comment on a separate line, not at the end of a line of
code.
 Begin comment text with an uppercase letter.
 End comment text with a period.
 Insert one space between the comment delimiter (//) and the
comment text, as shown in the following example.
 Implicitly Typed Local Variable
 Use implicit typing for local variableswhen the type of the
variable is obvious from the right side of the assignment, or
when the precise type is not important.
 Do not usevar when the type is not apparentfrom the rightside
of the assignment.
 Do not rely on the variable name to specify the type of the
variable. It might notbe correct.
 Avoid the use of var in place of dynamic.
 Use implicit typing to determine the type of the loop variable in
for andforeach loops.
3.2.2 NamingConventionin Windows Phone
 If the developer uses C# as a backend in Windows Phone Application
Development, then in most of the cases Naming conventionis same as
Naming convention used in C#.
 UIElement Naming
 Naming of UIElement generallygoes in below manner:
ElementName_UniqueKeyword
 Source Folder Naming
 Folderscontain the source code of specific modulesof the
application generally named by the purposeor functionality of
thatspecific module.
 Naming of Application Page
 As the naming of source code folders, Application pages should
also name after the functionality or the portion of the
application functionality thatit holds.
 Every Application Page must be named with prefix of “Page”
which can overcome the confliction with the classes’ names
those named after the same functionality or same Modulesin
the Application.
3.3 Checkingthe Code
 Checking the Code for quality is very important aspect for Major
projects and those projects which are future planned.
 Here is severalguidelines for checking the Quality Code.
 Use of Checklist:
Track the kinds of mistakes that you typically make and use
them as a checklist for future code. Youcan startyour checklist
with common errorsthat your groupor division made, andthen
personalize that list for your use.
 Conductcode reviews:
Code reviews give you an opportunityto explain and better
understandyourown code, and give othersan opportunity to
view your code anew.
 Unit Tests:
The best way to ensurequality is to write tests thatvalidate
data and algorithmsandverify thatprior mistakes do notrecur.
 Code Analysis Tool:
The simplest way to catch bugsearly is by increasing the
warning level in your compiler and usingcode analysis tools.
The critical points are to never ignore a warning and fix the
code.
 User friendly names of Variables:
 Consist coding style:
To maintain good quality for the code written by several team
members in the same team for different modules,whole team
must follow the same and consistent coding style.
 Code reusability:
Code reusability is also one of the most important aspect of
Major projects. Code reusability will decrease the complexity
and Lines of Code for any specific project.
3.3.1 Dispose Check
 Dispose checking is as importantas the importance of Quality of
code. There are few toolsavailable in the marketfor Checking the
memory leaks andthe Object disposal.
 Specifically for silverlightframework based windows phone
application project, the dispose checker toolwill integrate with the
application throughvisualstudio and it will check whether there
are any memory leaksor any object thatshouldnot furtherin
scope or not.
3.3.2 Code Analysis using Visual Studio
 There is a functionality in visual studio itself is for analyzing the
code for Errors, Quality and generalExceptions.
 There is one limitation, Code Analysis tool will be activated and
integrated by default with two high level versions of visual studios
which are, Visual Studio Premium and Visual Studio Ultimate. In
other two versions VisualStudio Professionaland Visual Studio
Express do not contain the Code Analysistool integrated by default
with the Installationof Visual Studio.
 Configure Code Analysis for a Project:
Rulesfor managedcode are organized into rulesets that target
specific areas, such as security and design. You can use one of
the Microsoft standardrule setsor create your own.
 RunCode Analysis:
You can specify code analysisto be run automaticallyevery time
thata project configuration is built, and you can run code
analysis manuallyon a project.
 Analyze code analysis results:
Code analysis warnings anderrors are listed in the VisualStudio
Error List window. You can click a warning or an error to display
the source code thatcontains the issue, and the warningsare
linked to detailed information and possible corrections.
 Integrate code analysis with your development life-cycle:
Check-in policies in Team Foundationversion control enable
development teams to make sure thatall code check-ins meet a
common set of code analysis standards.
3.3.3 CleanCode
 There are few major guidelineswhich makes the code cleaner and
more readable for developerswho will refer thatcode in future.
 Write short methods
 Enable reusability of code in multiple classes and even projects if
required.
 More Classesare better than big classes. Simply write smallclasses.
 Avoid mixing abstractionlayers.
 Write Comments wherever needed to understandany portion of
the code.
 Give appropriatecode titles before writing the code to make
understandotherdeveloper who reads it.
 Code regions are also one of the important aspects of Code
Structurewhich helpsdeveloper understandthe purposeof the
code andit also helpsdeveloper distinguish specific code regions
from other.
3.3.4 CommentedCode
 Generally comments shouldonly be usedwherever developer
needs to make it clear what the code is written for in the future.
 Instead of usingcomments for making better understanding,
sometimes the versioningof application leads to change the code,
and at thattime, developer will comment the old code and rewrite
it from the scratch.
 Here Commented old code is like a dead giveaway for those who
will read andtry to understandthecode in future.
 Instead of making old code commented, it’s a goodpractice to
maintain the versioning by any kind of Source controlsystem. This
will helpreduce unnecessarycommented oldcode.
3.3.5 ExceptionHandling and Logging
 Exceptions are the key full-stopperin the whole application
project. Every developermust handleall kind of exceptions as well
as consider every situation where exception can be generated.
 In Windows Phone application, exceptions can be handledby using
Try and Catchblock in the code.
 If there is any possibility of exception generation, thenwrite that
code in try block. So here if the code generatesany kind of
exception, then compiler will directly go into the Catch block
written exactly after the try block.
 Windows PhoneApplication usedwith C# as backend, also
provides nested Try Catch functionality to handlemultiple
exceptions at same time if there is any requirement.
 For major projects it’s always betterto use Loggeras the exception
provider.
 Exceptions can be loggedany time during processing;they do not
have to be loggedat the beginning of the event handling
sequence. For example, you can log an exception after it is
wrapped or replaced.
 The Exception HandlingApplication Block provides a logging
exception handlerthatdepends on the Logging Application Block.
You can also incorporatecustom loggingfunctionality into your
own exception handlerto use instead of the Logging Application
Block.
3.4 ProgrammingConsiderationforWindows Phone App
Development
3.4.1 Multi LanguageSupport
 Developer can add Multi-Languagesupportin Windows Phone Application
by adding MultilingualAppToolkit in the application.
 Windows PhoneApp Store is currently availablein 191countries with several
different languages.This requires an App to be localized in many of other
languagesthenEnglish.
 The MultilingualAppToolkit helps developerlocalize specific application in
more than one language.This Multilingualapptoolkit also helps localize
your app either by Microsoft Translatororalso by the developer itself
manually.
 You can also import the translationfile made by some expert into your
project andintegrate it to localize your own app.
 Important note here is, Windows Phone 8 is well integrated with the
MultilingualAppToolkit andwhen you create a Windows Phone 8 project
most of the work to enable localization is done for you.
 The toolsalso work on Windows Phone 7 provided that you first follow
these steps before gettingstarted.
 In orderto usethe Multilingual AppToolkit your application must be builtor
modified in order to supportlocalization. This means that allyour localized
resourcesare separatedfrom the code.
3.4.2 Layout Design
 Windows Phoneprovides a flexible layoutsystem thatenables you to
specify how controlsare positioned on the screen.
 Windows Phoneprovides various Panelcontrols,such as Canvas,
StackPanel, andGrid, thatserve as containers and enable you to position
and arrangethe controls.
 The Windows Phone layout system supports bothan absolutelayout and a
dynamic layout. In an absolutelayout, controlsare positioned usingexplicit
x/y coordinates (for example, by using a Canvas).In a dynamic layout, the
user interface automaticallysizes to various screen resolutions(for
example, by using a StackPanel or a Grid).
 Absolute Layout:
Windows Phoneprovides a Canvascontrolto supportabsolutepositioning.
By default, when you create a new Windows Phoneapp project, the root
layout panelis a Grid to create a layoutbased on absolute positioning, you
must replace the Grid with a Canvas.
 Dynamic Layout:
In a dynamic layout, the userinterface appears correctly on various screen
resolutions.You arrangechild elements by specifying how they shouldbe
arrangedand how they shouldwrap relative to their parent.
 Auto and Star Sizing:
Auto sizing is used to allow controlsto fit their content, even if the content
changessize. Star sizing is used to distribute availablespace amongthe
rows and columnsof a grid by weighted proportions.
3.4.3 Resource Files
 While creating new windows phone application project, VisualStudio will
give you one resource file by default. This resource file contains the default
styling and controltemplates which is used by the app.
 Moreoverthat, developer can write specific resource code in any other file
like xaml or cs, and make thatfile code available in whole application.
 Generally the main function of resourcefile comes into picture when any
app needs to be localized. At thattime, developer need to addregion
specific resources into the resource files andthen use it in the app
whenever required.
3.4.4 Package Configurationfile
 In visualstudio solutionexplorer, you can see one more file named
“Packages.config”. This is the configuration files which contains information
of libraries and packagesused in the specific windows phone application
project.
 This config file, is general XML file, formatted to store the information like
package identity, package name, package function andspecific package’s
location into the project root directory.
3.4.5 Manifest File
 The Manifest file resides under the Properties section of project’s root
directory. This Manifest file containsinformation regardingthe whole
project.
 There are mainly 4 sections in this Manifest File. In Windows phone
application project based on WinRT framework, the project manifest may
contains more then 4 sections.
 Application UI:
This section contains the information regardingApp Name, Application
description, Application icon, supportedresolutionsof the windows phone
application, Tile Images, Till Title, Tile templates.
 Capabilities:
This section specifies the capabilities thatapplication uses.
Those capabilities may be like, Camera access, Phone Book access,
Microphone, Media Library access so on and so forth.
 Requirements:
This section specifies the hardwarerequirement of the application by the
windows phone.
It can be like FrontCamera, Gyroscope, and Magnetometeretc.
 Packaging:
This section contains information regardingthe package generated after
building the application project which will be deployed to specific windows
phone device.
This information is like Author,publisher, ProductID, PublisherID and
Versions etc.
3.4.6 REST Clients
 Using RESTful services and REST client for WebService or calls are the best
and the secure way of communication between client andserver in
windows phoneapplication.
 Thoughusing REST Client is not the easy way to do it, as there are hundreds
of third party libraries available in the market as of now.
 Throughthe use REST client developer can call the server URL directly
throughcommunication API with any of the methodlike GET, POST or Do.
 Windows PhoneApplication project supportsmost of allkind of data
encoding to send it to the server throughpostor any other method. Those
can be in form of “jSon” or may be in form of “Multipart-FormData”.
3.5 PublishingConsiderationforWindows Phone Application
 App certification is required, in order to publishany app on windows phone
store.
 To certify your app on store,the windows phone application must comply
with the terms andcondition supplied by windows phone store. With that,
application also requires to fulfill the criteria decided by windows phone
store, for any application to be publishedon store.
3.5.1 App Publishing
 To publishany app on Windows Phone Store, one need to have Windows
Phone Developer account. There are two different types of developer
account available.Individual Developer Account& Enterprise Developer
Account. Both Functionality and Pricing differs for both types of developer
account.
 To publishany app on windows phone store, developer need to generate
application package by building the app from visualstudio in “Release”
mode of configuration manager.
 After generating “Release” package of Windows Phone application project,
go to the “Windows Phone Developer portal”,
URL: http://www.dev.windowsphone.com/dashboard
 On the portal, submit the Information regardingyour application as per
asked by the portaland provide the screenshots(Maximum of 8, Minimum
of 1) of your application, and icons with Store icon in appropriate resolution.
 After providing the general information regardingthe app, upload the
“Release” mode package of application thatyou gotfrom building the
application in visualstudio.
 PublishingStages:
The application submittedto the storewill go throughvariousstagesof
certification andprocess the submission. Here are the main four stages
among many.
- Submission Processing
- Signing Stage
- Pending certification
- Published
3.5.2 App Feature Update
 After publishing the app on store, developercan make updatesto the app
and publishthe updated application package on store with it’s appropriate
description and properties changed in update.
 Here, to update any already published windows phone application on store,
simply create an update submissionfrom the windows phone store
developer portaland specify the asked properties andinformation related
to update, then submit thennewer generatedapplication package on store.
 After submitting updateto any app, the update submission will further go
throughallof those stepswhile it went throughwhile submitting first
impression of application.
 If the application featurescertify the windows phone criteria, thenit will be
publishedas the next version of the app on store.
4. Tools
 Windows PhoneSDK 8.0 installseverything you need to build andtest Windows
Phone apps.
 Other thanwindows phone SDK 8.0, if one needs some extra featuresprovided by
Ultimate, professional or premium Visualstudio, then windows phone SDK can also
be integratedwith VisualStudio of any versionsby default when installingspecific
Visual studioversion.
 Code & Design
 Visual Studio Express 2012 for Windows Phone8 is a complete development
environment for creating Windows Phoneapps. It includes development
features such as project templates, a code editor, a visualdesigner, and a
Toolbox of controls.
 It alsoincludes integrated testingfeatures such as simulation, monitoringand
profiling, and the Windows Phone Store Test Kit.
 Blend for visualstudio is usedto design the Windows Phone application with
extra ordinary designs. Blend can make greatUser Interface for the app.
 There are many Design Libraries available as well in the market to design some
of the great User Interface of windows phone application.
 Run& Debug
 Windows phoneemulatorscan be used for debuggingthe application.
Emulatorscan also scale to available Windows phone resolutionsto test and
check whether it’s compatible with all resolutionsor not.

More Related Content

What's hot

Wp7 guide for i phone app developers
Wp7 guide for i phone app developersWp7 guide for i phone app developers
Wp7 guide for i phone app developersacebisli
 
follow-app BOOTCAMP 2: Building windows phone applications with visual studio...
follow-app BOOTCAMP 2: Building windows phone applications with visual studio...follow-app BOOTCAMP 2: Building windows phone applications with visual studio...
follow-app BOOTCAMP 2: Building windows phone applications with visual studio...QIRIS
 
22 universal apps for windows
22   universal apps for windows22   universal apps for windows
22 universal apps for windowsWindowsPhoneRocks
 
Mfc programming tutorial automation step by-step
Mfc programming tutorial automation step by-stepMfc programming tutorial automation step by-step
Mfc programming tutorial automation step by-stepnamtranvanpt
 
18 windows phone 8.1 for the enterprise developer
18   windows phone 8.1 for the enterprise developer18   windows phone 8.1 for the enterprise developer
18 windows phone 8.1 for the enterprise developerWindowsPhoneRocks
 
Windows Phone 8 - 1 Introducing Windows Phone 8 Development
Windows Phone 8 - 1 Introducing Windows Phone 8 DevelopmentWindows Phone 8 - 1 Introducing Windows Phone 8 Development
Windows Phone 8 - 1 Introducing Windows Phone 8 DevelopmentOliver Scheer
 
Introduction to vb.net
Introduction to vb.netIntroduction to vb.net
Introduction to vb.netSaad Wazir
 
QBS Visual Studio 2012 and modern windows apps
QBS Visual Studio 2012 and modern windows appsQBS Visual Studio 2012 and modern windows apps
QBS Visual Studio 2012 and modern windows appsLee Stott
 
Android deep dive
Android deep diveAndroid deep dive
Android deep diveAnuSahniNCI
 
An Introduction to Universal Windows Apps
An Introduction to Universal Windows AppsAn Introduction to Universal Windows Apps
An Introduction to Universal Windows Apps Ken Cenerelli
 
A Review Paper on Cross Platform Mobile Application Development IDE
A Review Paper on Cross Platform Mobile Application Development IDEA Review Paper on Cross Platform Mobile Application Development IDE
A Review Paper on Cross Platform Mobile Application Development IDEIOSR Journals
 
Monetizing Your Windows Phone App
Monetizing Your Windows Phone AppMonetizing Your Windows Phone App
Monetizing Your Windows Phone AppDave Bost
 

What's hot (15)

Wp7 guide for i phone app developers
Wp7 guide for i phone app developersWp7 guide for i phone app developers
Wp7 guide for i phone app developers
 
follow-app BOOTCAMP 2: Building windows phone applications with visual studio...
follow-app BOOTCAMP 2: Building windows phone applications with visual studio...follow-app BOOTCAMP 2: Building windows phone applications with visual studio...
follow-app BOOTCAMP 2: Building windows phone applications with visual studio...
 
22 universal apps for windows
22   universal apps for windows22   universal apps for windows
22 universal apps for windows
 
Mfc programming tutorial automation step by-step
Mfc programming tutorial automation step by-stepMfc programming tutorial automation step by-step
Mfc programming tutorial automation step by-step
 
18 windows phone 8.1 for the enterprise developer
18   windows phone 8.1 for the enterprise developer18   windows phone 8.1 for the enterprise developer
18 windows phone 8.1 for the enterprise developer
 
Android by aftab
Android by aftabAndroid by aftab
Android by aftab
 
Windows Phone 8 - 1 Introducing Windows Phone 8 Development
Windows Phone 8 - 1 Introducing Windows Phone 8 DevelopmentWindows Phone 8 - 1 Introducing Windows Phone 8 Development
Windows Phone 8 - 1 Introducing Windows Phone 8 Development
 
Radwp
RadwpRadwp
Radwp
 
Introduction to vb.net
Introduction to vb.netIntroduction to vb.net
Introduction to vb.net
 
QBS Visual Studio 2012 and modern windows apps
QBS Visual Studio 2012 and modern windows appsQBS Visual Studio 2012 and modern windows apps
QBS Visual Studio 2012 and modern windows apps
 
Android deep dive
Android deep diveAndroid deep dive
Android deep dive
 
Windows Phone
Windows PhoneWindows Phone
Windows Phone
 
An Introduction to Universal Windows Apps
An Introduction to Universal Windows AppsAn Introduction to Universal Windows Apps
An Introduction to Universal Windows Apps
 
A Review Paper on Cross Platform Mobile Application Development IDE
A Review Paper on Cross Platform Mobile Application Development IDEA Review Paper on Cross Platform Mobile Application Development IDE
A Review Paper on Cross Platform Mobile Application Development IDE
 
Monetizing Your Windows Phone App
Monetizing Your Windows Phone AppMonetizing Your Windows Phone App
Monetizing Your Windows Phone App
 

Viewers also liked

20091209 jawaban soalutssim
20091209 jawaban soalutssim20091209 jawaban soalutssim
20091209 jawaban soalutssimamikom
 
20121214 m odul_sim2012.doctt
20121214 m odul_sim2012.doctt20121214 m odul_sim2012.doctt
20121214 m odul_sim2012.docttamikom
 
Kodiginti Rajesh Performance tracker from 2011 -2015 in IBM India Pvt Ltd
Kodiginti Rajesh Performance tracker from 2011 -2015 in IBM India Pvt LtdKodiginti Rajesh Performance tracker from 2011 -2015 in IBM India Pvt Ltd
Kodiginti Rajesh Performance tracker from 2011 -2015 in IBM India Pvt LtdKodiginti Rajesh
 
Evaluation Question 1
Evaluation Question 1 Evaluation Question 1
Evaluation Question 1 woodliv
 
20120920 a.pengendalianstrategi
20120920 a.pengendalianstrategi20120920 a.pengendalianstrategi
20120920 a.pengendalianstrategiamikom
 
Chicago's Best Running Trails
Chicago's Best Running TrailsChicago's Best Running Trails
Chicago's Best Running TrailsForRent.com
 

Viewers also liked (8)

16f88
16f8816f88
16f88
 
20091209 jawaban soalutssim
20091209 jawaban soalutssim20091209 jawaban soalutssim
20091209 jawaban soalutssim
 
20121214 m odul_sim2012.doctt
20121214 m odul_sim2012.doctt20121214 m odul_sim2012.doctt
20121214 m odul_sim2012.doctt
 
Resume nistha
Resume nisthaResume nistha
Resume nistha
 
Kodiginti Rajesh Performance tracker from 2011 -2015 in IBM India Pvt Ltd
Kodiginti Rajesh Performance tracker from 2011 -2015 in IBM India Pvt LtdKodiginti Rajesh Performance tracker from 2011 -2015 in IBM India Pvt Ltd
Kodiginti Rajesh Performance tracker from 2011 -2015 in IBM India Pvt Ltd
 
Evaluation Question 1
Evaluation Question 1 Evaluation Question 1
Evaluation Question 1
 
20120920 a.pengendalianstrategi
20120920 a.pengendalianstrategi20120920 a.pengendalianstrategi
20120920 a.pengendalianstrategi
 
Chicago's Best Running Trails
Chicago's Best Running TrailsChicago's Best Running Trails
Chicago's Best Running Trails
 

Similar to Classification of the document

Windows phone 8 session 2
Windows phone 8 session 2Windows phone 8 session 2
Windows phone 8 session 2hitesh chothani
 
Windows Phone 7 Applications with Silverlight
Windows Phone 7 Applications with SilverlightWindows Phone 7 Applications with Silverlight
Windows Phone 7 Applications with SilverlightRishu Mehra
 
Windowsphone7
Windowsphone7Windowsphone7
Windowsphone7yuvaraj72
 
"Discover windows phone" 01. Project Template
"Discover windows phone"  01. Project Template"Discover windows phone"  01. Project Template
"Discover windows phone" 01. Project TemplateYasmine Abdelhady
 
Top Cross Platform Mobile App Development Frameworks
Top Cross Platform Mobile App Development FrameworksTop Cross Platform Mobile App Development Frameworks
Top Cross Platform Mobile App Development FrameworksWDP Technologies
 
Windows phone 8 session 1
Windows phone 8 session 1Windows phone 8 session 1
Windows phone 8 session 1hitesh chothani
 
Windows Universal Apps
Windows Universal AppsWindows Universal Apps
Windows Universal AppsJames Quick
 
Dev windows phone_apps_getting_started_guide
Dev windows phone_apps_getting_started_guideDev windows phone_apps_getting_started_guide
Dev windows phone_apps_getting_started_guideTrioBlack Trioblack
 
Seminar on android app development
Seminar on android app developmentSeminar on android app development
Seminar on android app developmentAbhishekKumar4779
 
Software training report
Software training reportSoftware training report
Software training reportNatasha Bains
 
Wp7 guide for android developers
Wp7 guide for android developersWp7 guide for android developers
Wp7 guide for android developersacebisli
 
Mobile Application Development-Lecture 03 & 04.pdf
Mobile Application Development-Lecture 03 & 04.pdfMobile Application Development-Lecture 03 & 04.pdf
Mobile Application Development-Lecture 03 & 04.pdfAbdullahMunir32
 
Android Interview Questions
Android Interview QuestionsAndroid Interview Questions
Android Interview QuestionsGaurav Mehta
 

Similar to Classification of the document (20)

Presentation[1]
Presentation[1]Presentation[1]
Presentation[1]
 
Windows phone 8 session 2
Windows phone 8 session 2Windows phone 8 session 2
Windows phone 8 session 2
 
Windows Phone 7 Applications with Silverlight
Windows Phone 7 Applications with SilverlightWindows Phone 7 Applications with Silverlight
Windows Phone 7 Applications with Silverlight
 
Windowsphone7
Windowsphone7Windowsphone7
Windowsphone7
 
Android session 1
Android session 1Android session 1
Android session 1
 
Ios - Introduction to swift programming
Ios - Introduction to swift programmingIos - Introduction to swift programming
Ios - Introduction to swift programming
 
"Discover windows phone" 01. Project Template
"Discover windows phone"  01. Project Template"Discover windows phone"  01. Project Template
"Discover windows phone" 01. Project Template
 
Top Cross Platform Mobile App Development Frameworks
Top Cross Platform Mobile App Development FrameworksTop Cross Platform Mobile App Development Frameworks
Top Cross Platform Mobile App Development Frameworks
 
Android
AndroidAndroid
Android
 
Mobile Application Development class 001
Mobile Application Development class 001Mobile Application Development class 001
Mobile Application Development class 001
 
Windows phone 8 session 1
Windows phone 8 session 1Windows phone 8 session 1
Windows phone 8 session 1
 
Windows Universal Apps
Windows Universal AppsWindows Universal Apps
Windows Universal Apps
 
Dev windows phone_apps_getting_started_guide
Dev windows phone_apps_getting_started_guideDev windows phone_apps_getting_started_guide
Dev windows phone_apps_getting_started_guide
 
Seminar on android app development
Seminar on android app developmentSeminar on android app development
Seminar on android app development
 
Software training report
Software training reportSoftware training report
Software training report
 
Android
Android Android
Android
 
Android Basic
Android BasicAndroid Basic
Android Basic
 
Wp7 guide for android developers
Wp7 guide for android developersWp7 guide for android developers
Wp7 guide for android developers
 
Mobile Application Development-Lecture 03 & 04.pdf
Mobile Application Development-Lecture 03 & 04.pdfMobile Application Development-Lecture 03 & 04.pdf
Mobile Application Development-Lecture 03 & 04.pdf
 
Android Interview Questions
Android Interview QuestionsAndroid Interview Questions
Android Interview Questions
 

Classification of the document

  • 1. 1. Classification of the document 1.1 Purpose By making this document, the developer community who wanted to get started in Windows PhoneApp Development, can easily understandfew important aspects of Windows PhoneMobile Platformlike UI/UX, Design Guidelines, Naming Conventions, Architecture, so on and so forth. 1.2 Target Audiences This document is targetedto:  Those developers who know basics of Application development,especially Mobile App Development andwant to get startedwith Windows Phone App Development.  Those developers who want to know more aboutArchitecture, Design and Flow of Windows PhoneApp
  • 2. 2. General  Framework  Windows PhoneApplication can be developed on the base of total 2 Framework for two different Operating Systems, Windows Phone OS 8.0 & OS 8.1  App Development for Windows Phone 8.0 can be done only on “Silverlight Framework” Platform, whereas if we develop App for Windows Phone 8.1, then there are 2 choices. Windows Phone OS 8.1 made on the base of two different Frameworks, one of them is “SilverlightFramework” and the other one is “Windows Runtime” framework (WinRT framework). 2.1 Deliverables foraproject  In Windows Phone Application project the main deliverable is the Application Installation Package wrapped in the file format and encryption of “.xap” or else “.appx” (Here XAP is the application package of Silverlightbased App, and APPX is the application package of Windows Runtime(WinRT) based App.) 2.1.1 One Pager  Windows PhoneApplication developmentmade easy with the help of Interactive Development Environment(IDE) Visual Studio.  While Application development, debuggingof the app can be done in a developer unlockedWindows Phone device as well as “Windows Phone Emulator”.  One Application of Windows Phone can contain multiple projects developed in same framework.  While Developing Windows Phone OS 8.1 Application based on “Windows Runtime” platform, developer needs to have “Windows 8.1 Developer
  • 3. License” installedwith the visualstudio IDE. To gain the Developer License, one needs to just signin with respective Microsoft account.  Key Featuresof Windows Phone Application which makes the app different from otherplatforms are: - Pin to Startfunctionality:- Pin specific application page on startscreen as a Tile - Tile Notification:- developer can set notification on Tile pinned to start screen - Live Tile:- developer can updatethe Tile pinned to startscreen periodically - Setting Lock Screen Notification & Background - Fast App Switching functionality  After developing application, developer needs to select a unique “App Name” from the Windows phone store Developer portaland uploadthe released version of Windows Phone Installationpackage in form of XAP. With that developer alsoneeds to provide Application specific information in order to certify the app on store.  The durationof Application certification on Windows Phone Store Developer Portal,varies with the scenarios and circumstances in which App submitted to verify. After successfulverification of Application, the application can be publishedon the storemanually as well as automatically. 2.1.2 Release Candidate  After developing the basic application, developer can submit the app to the Beta storefor testersto testthe application flow andfor Quality Assurance.  After completion of Beta app testing, developer can submit the application on store as Release Candidate with integration of App Track functionality.  Developer can check the Error & Exception logs of the Application published on the store from the Developer portalof Windows PhoneStore.
  • 4. 2.1.3 Technical Aspects  After completing Development of Windows Phone Application, We need to Build the Solution in terms of gettingOutputXAP package file.  While Building the Solution, the IDE Visual Studio will make a root Folder with the name of Application Project. And in thatroot folder, Source Code of whole Application goes.  As the Structureof Windows PhoneApplication Project, the Opening file will be with the “.SLN” extension which standsfor “Solution”.  So, Technically the deliverable of Windows Phone App Project, we’ll get a fully working copy of Source code in form of Code files as “.cs”, “.xaml”, “.sln”, “.csproject” etc. 2.1.4 Security Aspects  The Application package thata developer will get after successfully building a Windows Phoneapplication, will be kind of a compressed form of the code files. Anyone with File extraction technologycan open thatapplication installationpackage and extract the code files resides in the package.  But, once if developer will host thatXAP package ontothe store and if that package publishedafter successfullyverified and certified by Windows Phone Store, then the application package downloaded from the store, is a non extractable file in the same form of XAP package.  Once publishingthe application, Windows Phone Store Encrypt the whole XAP package and the code files in the package with some unique technology and key. So, the XAP files downloadedfrom the Store cannot be extracted by anyone except “Windows Phone” at the time of installation.
  • 5. 3. Development  Overview – Windows Phone Development  Windows Phone8.1 Application Development can be done with the help of two different frameworks as “SilverlightFramework” and “Windows Runtime framework”. Whereas Windows Phone 8.0 applications development can be done with only “Silverlight Framework”.  Here, while developing Windows Phone 8.1 application developer can choose from two different development environmentsto develop application with. - XAML + C# (XAMLas Frontend+ C# as Backend) - HTML5 + CSS3 + JavaScript (HTML5 & CSS3 as Frontend+ JavaScriptas backend)  Provision of Windows Phone Application Development with HTML5 + CSS3 + JavaScript is especially for Web Developers, who wanted to develop windows phone applications as well.  Web Developers can directly migrate their Mobile Website code to Windows Phone application with smallamountof changes and few changesin including libraries specific for windows phone application.  There is one more option available for .NET developersto developwindows Phone 8.0 as well as Windows Phone 8.1 application with the help of XAML + VB.net. Here XAML used as Frontendand VB.net is for Backend.  Universal Application: - Developers can also build Windows Phone Application by creating UniversalApplication in Visual Studio. - UniversalApplication based on the concept of “Write Once, Run Everywhere” concept. Here Universal App contains two kind of application from which one is Windows Phone Application (targetedto Windows Phone OS 8.1)and the second one is Windows Store (MetroApp) application targeted to (Windows 8.1 & higher). - UniversalApplication is based on “Windows Runtime” framework.
  • 6.  Application developed for Windows Phone OS 8.0 can runon Windows phone OS 8.1 or greater,but app developed in WinRT framework and for OS 8.1 cannot be migrated to Windows Phone OS 8.0  Windows PhoneApplication is following Forward Migration butnot reverse with respect to Windows Phone OS versioning system. 3.1 SolutionStructure  Windows PhoneApplication is made easy with the help of VisualStudio (VS) Interactive Development Environment(IDE).  Visual Studio has severalversions from which VS 2012 or greater is required in order to develop Windows Phone OS 8.0 or higher application. Althoughto develop windows phone7.5/7.8 application, visual studio2010 or greater versions required. 3.1.1 Visual Studio  Visual Studio provides an integratedenvironment and fullsolution to develop windows phoneapplication.  Solution Explorer in visual studiois the tool which managesall the code portions. In Solution explorer, the root directory is the Solution which contains more than one project (if any) andthose projects are placed hierarchically in the Folderscreated by Visual Studio.  Solution Explorer reflects the Copy of files and folders created by visual studio and those required to build the project.  In the Project root folder there are couples of folders and files which contain the resources thatapplication is usingand the code thatexecutes the application.  Project rootfolder is mainly divided into 5 portions as mentioned below: - Properties - References - Assets - Resources - Other manuallyadded code files
  • 7.  Properties: - This section contains 3 files by default when creating project. “AssemblyInfo.cs”, “AppManifest.xml” and“WMAppManifest.xml” - Here WMAppManifest.xml file is the file which containsthe code of Application properties and the configuration of the Windows Phone App. - From this WMAppManifest.xml file, developer can change the App configuration of Application UI, Capabilities that application holdsfrom the device it installsin, Requirementsof device in order to installthe app and the packaging information of the application installation package which generatesat the time of building the project.  References: - This section holdsthe references to the Libraries usedin the application whether the library is a third party external or internal project Code. - Reference section is the one in which Visual Studio installsthe NuGet Packages in the project solution. - MoreoverThe Reference section also holdsthe reference to the core libraries that used in the application in order to execute the basic project.  Assets: - In most of the case this folder used to hold allof the images thatused in the application anywhere, including the tile images and Logos with different resolutionsof the application. - There can be nested folders in the assetsroot folder to maintain the modularity.  Resources: - This section contains allthose code files which define the styles and Templates of specific controlsused in the whole application project. - By default there will be a resource file named “AppResources.resx”.
  • 8.  Other thanthese four Sections, the Developer can add customfolders and files as requirement and as appropriate. 3.2 Namingin Windows Phone & C# 3.2.1 Naming Conventionin C#  In fact there isn’t any strict ruleto follow the Naming convention in C# languagebut it’s always a good practice to follow a specific form of Naming Conventionto make it easier to maintain futureconflictions in Applications Variable declarations.  Here are few importantGuidelines which is used by Microsoft, to develop Samples and Documents in order to maintain the common understandingof coding standardsin C#.  This Portion of the Document is taken from “Microsoft Developer Network” Community Library, to make surethe preciseness of Content.  Selecting Variable Names - Choose the names of variablethose can be easily readable. i.e. a variableshouldnamed “SelectedObject” instead “SeleObj”. - Try to avoid using Underscores, Hyphens &nonalphanumeric keyword. i.e. a variableshouldnamed “TextboxName” instead “textbox_name”. - Try to avoid use of wildly usedkeywords or matching the keywords. - Avoid usingHungarian Notation.  Proper Abbreviationsand Acronyms While choosingidentifier names, do not use abbreviation or contractionsas part of it. Try to avoid use of acronyms thoseare not wildly accepted.
  • 9.  Letter Capitalization In capitalization style, there are 3 cases. - Pascal Case The first letter in the identifier and the first letterof each subsequent concatenated word are capitalized. You can use Pascal case for identifiers of three or more characters.For example: i.e. TextBox - Camel Case The first letter of an identifier is lowercase and the first letterof each subsequentconcatenatedword is capitalized. For example: i.e. textBox - Upper Case All lettersin the identifier are capitalized. Use this convention only for identifiers thatconsist of two or fewer letters.For example: i.e. System.IO i.e. System.Web.UI  Case Sensitivity  Do not usenames thatrequire case sensitivity. Components must be fully usable from both case-sensitive andcase- insensitive languages.Case-insensitivelanguagescannot distinguishbetween two names within the same context that differ only by case. Therefore, you must avoid this situation in the components or classesthat you create.  Do not create two namespaces with names thatdiffer only by case. Forexample, a case insensitive languagecannot distinguishbetween the following two namespace declarations. i.e. namespaceee.cummings; namespaceEe.Cummings;  Do not create a function with parameter names thatdiffer only by case. The following example is incorrect.
  • 10. i.e. void MyFunction(stringa, stringA)  Do not create a namespace with type names thatdiffer only by case. In the following example, Point p and POINT p are inappropriate type names because they differ only by case. i.e. System.Windows.Forms.Point p System.Windows.Forms.POINT p  Do not create a type with property names that differ only by case. In the following example, int Color and int COLOR are inappropriate property names because they differ only by case. i.e. int Color {get, set} int COLOR {get, set}  Do not create a type with method names thatdiffer only by case. In the following example, calculateand Calculateare inappropriate method names because they differ only by case. i.e. void calculate() void Calculate()  Type Name Confusion  Use names that describe a type's meaning ratherthannames thatdescribe the type. In the rare case that a parameter hasno semantic meaning beyond its type, use a generic name. For example, a classthat supportswriting a variety of datatypes into a streammight havethe following methods. i.e. void Write(double value); void Write(float value); void Write(long value); void Write(int value); void Write(short value);
  • 11.  Do not create language-specific method names, as in the following example. i.e. void Write(double doubleValue); void Write(float floatValue); void Write(long longValue); void Write(intintValue); void Write(short shortValue);  Namespace Naming Guidelines  The generalrule for naming namespaces is to use the company name followed by the technologyname andoptionally the feature and design as follows. Format: CompanyName.TechnologyName[.Feature][.Design] i.e. Microsoft.Media icrosoft.Media.Design  Prefixing namespace names with a company name or other well-establishedbrand avoids the possibility of two published namespaces havingthe same name. For example, Microsoft.Office is an appropriateprefix for the Office AutomationClasses provided by Microsoft.  Use Pascal case for namespaces, and separatelogical components with periods, as in Microsoft.Office.PowerPoint. If your brandemploys nontraditionalcasing, follow the casing defined by your brand,even if it deviates from the prescribed Pascal case. For example, the namespaces NeXT.WebObjects and ee.cummings illustrateappropriate deviations from the Pascal case rule.
  • 12.  Class Naming Guidelines  Use a noun or nounphrase to name a class.  Use Pascal case.  Use abbreviations sparingly.  Do not usea type prefix, suchas C for class, on a class name. For example, use the classname FileStream ratherthan CFileStream.  Do not usethe underscorecharacter(_).  Occasionally, it is necessary to provide a classname thatbegins with the letterI, even thoughtheclass is not an interface. This is appropriateas long as I is the first letter of an entire word thatis a part of the class name. For example, the classname IdentityStore is appropriate.  i.e. public class FileStream public class Button public class String  Interface Naming Guidelines  Name interfaces with nounsor nounphrases,or adjectives that describe behavior. For example, the interface name IComponent uses a descriptive noun. The interface name ICustomAttributeProviderusesa nounphrase. The name IPersistable uses an adjective.  Use Pascal case.  Use abbreviations sparingly.  Prefix interface names with the letter I, to indicate thatthe type is an interface.  Use similar names when you define a class/interface pair where the class is a standardimplementation of the interface. The names shoulddiffer only by the letter I prefix on the interface name.  Do not usethe underscorecharacter(_).  i.e. public interface IServiceProvider public interface IFormatable
  • 13.  Attribute Naming Guidelines  always add the suffix Attribute to custom attributeclasses. The following is an example of a correctly named attributeclass. i.e. public class ObsoleteAttribute{}  Enumeration Type Naming Guidelines  Use Pascal case for Enum types andvalue names.  Use abbreviations sparingly.  Do not usean Enum suffix on Enum type names.  Use a singularname for most Enum types, but usea pluralname for Enum types that are bit fields.  Always add the FlagsAttributeto a bit field Enum type.  Static Field Naming Guidelines  Use nouns,noun phrases,or abbreviations of nounsto name static fields.  Use Pascal case.  Do not usea Hungariannotation prefix on static field names.  It is recommended thatyou use static properties instead of public static fields whenever possible.  Parameter Naming Guidelines  It is important to carefully follow these parameternaming guidelines because visual design toolsthatprovide context sensitive help and class browsingfunctionality display method parameter names to usersin the designer.  Use camel case for parameter names.  Use names that describe a parameter'smeaning rather than names that describe a parameter'stype. Development tools
  • 14. shouldprovide meaningful information about a parameter's type. Therefore, a parameter'sname can be put to better use by describing meaning. Use type-based parameter names sparingly andonly where it is appropriate.  Do not usereserved parameters. Reservedparameters are private parametersthat might be exposed in a future versionif they are needed. Instead, if more data is needed in a future version of your classlibrary, add a new overloadfor a method.  Do not prefix parameternames with Hungariantype notation. i.e. Type GetType(string typeName) stringFormat(stringformat, object[] args)  Method Naming Guidelines  Use verbs or verb phrasesto name methods.  Use Pascal case. i.e. RemoveAll() GetCharArray() Invoke()  Property Naming Guidelines  Use a nounor nounphrase to name properties.  Use Pascal case.  Do not useHungarian notation.  Consider creating a property with the same name as its underlyingtype. For example, if you declare a property named Color, the type of the property shouldlikewise be Color. See the example later in this topic.  Below are the examples:
  • 15.  public enum Color { // Insert code for Enum here. } public class Control { public Color Color { get {// Insert code here.} set {// Insert code here.} } }  publicenum Color{// Insert code for Enum here.} public class Control { publicint Color { get {// Insert code here.} set {// Insert code here.} } }  Event NamingGuidelines  Use Pascal case.  Do not useHungarian notation.  Use an EventHandler suffix on event handlernames.  Specify two parametersnamed sender and e. The sender parameter representsthe object thatraised the event. The sender parameteris always of type object, even if it is possible to use a more specific type. The state associated with the event is encapsulatedin an instance of an event class named e. Use an appropriate andspecific event classfor the e parameter type.  Name an event argumentclass with the EventArgssuffix.  Consider naming eventswith a verb. For example, correctly named event names include Clicked, Painting, and DroppedDown.  Use a gerund(the"ing" form of a verb) to create an event name thatexpresses the concept of pre-event, anda past-tenseverb to represent post-event.For example, a Close event thatcan be canceled shouldhave a Closing event and a Closed event. Do not use the BeforeXxx/AfterXxx namingpattern.
  • 16.  Do not usea prefix or suffix on the event declaration on the type. For example, use Close instead of OnClose.  In general,you shouldprovide a protected method called OnXxx on types with events thatcan be overridden in a derived class. This method shouldonly have the event parameter e, because the sender is always the instance of the type. i.e.  public delegate void MouseEventHandler(objectsender, MouseEventArgse);  public class MouseEventArgs:EventArgs { int x; int y; publicMouseEventArgs(intx,int y) { this.x = x; this.y = y; } publicint X { get { returnx; } } publicint Y { get { returny; } } }  LayoutConventions  Write only one statement per line.  Write only one declaration per line.  If continuation lines are not indented automatically, indent them one tabstop (four spaces).  Add at least one blankline between methoddefinitions and property definitions.  Use parenthesesto make clausesin an expression apparent, as shown in the following code.  Commenting Convention  Place the comment on a separate line, not at the end of a line of code.  Begin comment text with an uppercase letter.  End comment text with a period.  Insert one space between the comment delimiter (//) and the comment text, as shown in the following example.
  • 17.  Implicitly Typed Local Variable  Use implicit typing for local variableswhen the type of the variable is obvious from the right side of the assignment, or when the precise type is not important.  Do not usevar when the type is not apparentfrom the rightside of the assignment.  Do not rely on the variable name to specify the type of the variable. It might notbe correct.  Avoid the use of var in place of dynamic.  Use implicit typing to determine the type of the loop variable in for andforeach loops. 3.2.2 NamingConventionin Windows Phone  If the developer uses C# as a backend in Windows Phone Application Development, then in most of the cases Naming conventionis same as Naming convention used in C#.  UIElement Naming  Naming of UIElement generallygoes in below manner: ElementName_UniqueKeyword  Source Folder Naming  Folderscontain the source code of specific modulesof the application generally named by the purposeor functionality of thatspecific module.  Naming of Application Page  As the naming of source code folders, Application pages should also name after the functionality or the portion of the application functionality thatit holds.  Every Application Page must be named with prefix of “Page” which can overcome the confliction with the classes’ names those named after the same functionality or same Modulesin the Application.
  • 18. 3.3 Checkingthe Code  Checking the Code for quality is very important aspect for Major projects and those projects which are future planned.  Here is severalguidelines for checking the Quality Code.  Use of Checklist: Track the kinds of mistakes that you typically make and use them as a checklist for future code. Youcan startyour checklist with common errorsthat your groupor division made, andthen personalize that list for your use.  Conductcode reviews: Code reviews give you an opportunityto explain and better understandyourown code, and give othersan opportunity to view your code anew.  Unit Tests: The best way to ensurequality is to write tests thatvalidate data and algorithmsandverify thatprior mistakes do notrecur.  Code Analysis Tool: The simplest way to catch bugsearly is by increasing the warning level in your compiler and usingcode analysis tools. The critical points are to never ignore a warning and fix the code.  User friendly names of Variables:  Consist coding style: To maintain good quality for the code written by several team members in the same team for different modules,whole team must follow the same and consistent coding style.  Code reusability: Code reusability is also one of the most important aspect of Major projects. Code reusability will decrease the complexity and Lines of Code for any specific project.
  • 19. 3.3.1 Dispose Check  Dispose checking is as importantas the importance of Quality of code. There are few toolsavailable in the marketfor Checking the memory leaks andthe Object disposal.  Specifically for silverlightframework based windows phone application project, the dispose checker toolwill integrate with the application throughvisualstudio and it will check whether there are any memory leaksor any object thatshouldnot furtherin scope or not. 3.3.2 Code Analysis using Visual Studio  There is a functionality in visual studio itself is for analyzing the code for Errors, Quality and generalExceptions.  There is one limitation, Code Analysis tool will be activated and integrated by default with two high level versions of visual studios which are, Visual Studio Premium and Visual Studio Ultimate. In other two versions VisualStudio Professionaland Visual Studio Express do not contain the Code Analysistool integrated by default with the Installationof Visual Studio.  Configure Code Analysis for a Project: Rulesfor managedcode are organized into rulesets that target specific areas, such as security and design. You can use one of the Microsoft standardrule setsor create your own.  RunCode Analysis: You can specify code analysisto be run automaticallyevery time thata project configuration is built, and you can run code analysis manuallyon a project.  Analyze code analysis results: Code analysis warnings anderrors are listed in the VisualStudio Error List window. You can click a warning or an error to display the source code thatcontains the issue, and the warningsare linked to detailed information and possible corrections.
  • 20.  Integrate code analysis with your development life-cycle: Check-in policies in Team Foundationversion control enable development teams to make sure thatall code check-ins meet a common set of code analysis standards. 3.3.3 CleanCode  There are few major guidelineswhich makes the code cleaner and more readable for developerswho will refer thatcode in future.  Write short methods  Enable reusability of code in multiple classes and even projects if required.  More Classesare better than big classes. Simply write smallclasses.  Avoid mixing abstractionlayers.  Write Comments wherever needed to understandany portion of the code.  Give appropriatecode titles before writing the code to make understandotherdeveloper who reads it.  Code regions are also one of the important aspects of Code Structurewhich helpsdeveloper understandthe purposeof the code andit also helpsdeveloper distinguish specific code regions from other. 3.3.4 CommentedCode  Generally comments shouldonly be usedwherever developer needs to make it clear what the code is written for in the future.  Instead of usingcomments for making better understanding, sometimes the versioningof application leads to change the code, and at thattime, developer will comment the old code and rewrite it from the scratch.  Here Commented old code is like a dead giveaway for those who will read andtry to understandthecode in future.  Instead of making old code commented, it’s a goodpractice to maintain the versioning by any kind of Source controlsystem. This will helpreduce unnecessarycommented oldcode.
  • 21. 3.3.5 ExceptionHandling and Logging  Exceptions are the key full-stopperin the whole application project. Every developermust handleall kind of exceptions as well as consider every situation where exception can be generated.  In Windows Phone application, exceptions can be handledby using Try and Catchblock in the code.  If there is any possibility of exception generation, thenwrite that code in try block. So here if the code generatesany kind of exception, then compiler will directly go into the Catch block written exactly after the try block.  Windows PhoneApplication usedwith C# as backend, also provides nested Try Catch functionality to handlemultiple exceptions at same time if there is any requirement.  For major projects it’s always betterto use Loggeras the exception provider.  Exceptions can be loggedany time during processing;they do not have to be loggedat the beginning of the event handling sequence. For example, you can log an exception after it is wrapped or replaced.  The Exception HandlingApplication Block provides a logging exception handlerthatdepends on the Logging Application Block. You can also incorporatecustom loggingfunctionality into your own exception handlerto use instead of the Logging Application Block. 3.4 ProgrammingConsiderationforWindows Phone App Development 3.4.1 Multi LanguageSupport  Developer can add Multi-Languagesupportin Windows Phone Application by adding MultilingualAppToolkit in the application.  Windows PhoneApp Store is currently availablein 191countries with several different languages.This requires an App to be localized in many of other languagesthenEnglish.  The MultilingualAppToolkit helps developerlocalize specific application in more than one language.This Multilingualapptoolkit also helps localize your app either by Microsoft Translatororalso by the developer itself manually.
  • 22.  You can also import the translationfile made by some expert into your project andintegrate it to localize your own app.  Important note here is, Windows Phone 8 is well integrated with the MultilingualAppToolkit andwhen you create a Windows Phone 8 project most of the work to enable localization is done for you.  The toolsalso work on Windows Phone 7 provided that you first follow these steps before gettingstarted.  In orderto usethe Multilingual AppToolkit your application must be builtor modified in order to supportlocalization. This means that allyour localized resourcesare separatedfrom the code. 3.4.2 Layout Design  Windows Phoneprovides a flexible layoutsystem thatenables you to specify how controlsare positioned on the screen.  Windows Phoneprovides various Panelcontrols,such as Canvas, StackPanel, andGrid, thatserve as containers and enable you to position and arrangethe controls.  The Windows Phone layout system supports bothan absolutelayout and a dynamic layout. In an absolutelayout, controlsare positioned usingexplicit x/y coordinates (for example, by using a Canvas).In a dynamic layout, the user interface automaticallysizes to various screen resolutions(for example, by using a StackPanel or a Grid).  Absolute Layout: Windows Phoneprovides a Canvascontrolto supportabsolutepositioning. By default, when you create a new Windows Phoneapp project, the root layout panelis a Grid to create a layoutbased on absolute positioning, you must replace the Grid with a Canvas.  Dynamic Layout: In a dynamic layout, the userinterface appears correctly on various screen resolutions.You arrangechild elements by specifying how they shouldbe arrangedand how they shouldwrap relative to their parent.  Auto and Star Sizing: Auto sizing is used to allow controlsto fit their content, even if the content changessize. Star sizing is used to distribute availablespace amongthe rows and columnsof a grid by weighted proportions.
  • 23. 3.4.3 Resource Files  While creating new windows phone application project, VisualStudio will give you one resource file by default. This resource file contains the default styling and controltemplates which is used by the app.  Moreoverthat, developer can write specific resource code in any other file like xaml or cs, and make thatfile code available in whole application.  Generally the main function of resourcefile comes into picture when any app needs to be localized. At thattime, developer need to addregion specific resources into the resource files andthen use it in the app whenever required. 3.4.4 Package Configurationfile  In visualstudio solutionexplorer, you can see one more file named “Packages.config”. This is the configuration files which contains information of libraries and packagesused in the specific windows phone application project.  This config file, is general XML file, formatted to store the information like package identity, package name, package function andspecific package’s location into the project root directory. 3.4.5 Manifest File  The Manifest file resides under the Properties section of project’s root directory. This Manifest file containsinformation regardingthe whole project.  There are mainly 4 sections in this Manifest File. In Windows phone application project based on WinRT framework, the project manifest may contains more then 4 sections.  Application UI: This section contains the information regardingApp Name, Application description, Application icon, supportedresolutionsof the windows phone application, Tile Images, Till Title, Tile templates.
  • 24.  Capabilities: This section specifies the capabilities thatapplication uses. Those capabilities may be like, Camera access, Phone Book access, Microphone, Media Library access so on and so forth.  Requirements: This section specifies the hardwarerequirement of the application by the windows phone. It can be like FrontCamera, Gyroscope, and Magnetometeretc.  Packaging: This section contains information regardingthe package generated after building the application project which will be deployed to specific windows phone device. This information is like Author,publisher, ProductID, PublisherID and Versions etc. 3.4.6 REST Clients  Using RESTful services and REST client for WebService or calls are the best and the secure way of communication between client andserver in windows phoneapplication.  Thoughusing REST Client is not the easy way to do it, as there are hundreds of third party libraries available in the market as of now.  Throughthe use REST client developer can call the server URL directly throughcommunication API with any of the methodlike GET, POST or Do.  Windows PhoneApplication project supportsmost of allkind of data encoding to send it to the server throughpostor any other method. Those can be in form of “jSon” or may be in form of “Multipart-FormData”.
  • 25. 3.5 PublishingConsiderationforWindows Phone Application  App certification is required, in order to publishany app on windows phone store.  To certify your app on store,the windows phone application must comply with the terms andcondition supplied by windows phone store. With that, application also requires to fulfill the criteria decided by windows phone store, for any application to be publishedon store. 3.5.1 App Publishing  To publishany app on Windows Phone Store, one need to have Windows Phone Developer account. There are two different types of developer account available.Individual Developer Account& Enterprise Developer Account. Both Functionality and Pricing differs for both types of developer account.  To publishany app on windows phone store, developer need to generate application package by building the app from visualstudio in “Release” mode of configuration manager.  After generating “Release” package of Windows Phone application project, go to the “Windows Phone Developer portal”, URL: http://www.dev.windowsphone.com/dashboard  On the portal, submit the Information regardingyour application as per asked by the portaland provide the screenshots(Maximum of 8, Minimum of 1) of your application, and icons with Store icon in appropriate resolution.  After providing the general information regardingthe app, upload the “Release” mode package of application thatyou gotfrom building the application in visualstudio.  PublishingStages: The application submittedto the storewill go throughvariousstagesof certification andprocess the submission. Here are the main four stages among many. - Submission Processing - Signing Stage - Pending certification - Published
  • 26. 3.5.2 App Feature Update  After publishing the app on store, developercan make updatesto the app and publishthe updated application package on store with it’s appropriate description and properties changed in update.  Here, to update any already published windows phone application on store, simply create an update submissionfrom the windows phone store developer portaland specify the asked properties andinformation related to update, then submit thennewer generatedapplication package on store.  After submitting updateto any app, the update submission will further go throughallof those stepswhile it went throughwhile submitting first impression of application.  If the application featurescertify the windows phone criteria, thenit will be publishedas the next version of the app on store.
  • 27. 4. Tools  Windows PhoneSDK 8.0 installseverything you need to build andtest Windows Phone apps.  Other thanwindows phone SDK 8.0, if one needs some extra featuresprovided by Ultimate, professional or premium Visualstudio, then windows phone SDK can also be integratedwith VisualStudio of any versionsby default when installingspecific Visual studioversion.  Code & Design  Visual Studio Express 2012 for Windows Phone8 is a complete development environment for creating Windows Phoneapps. It includes development features such as project templates, a code editor, a visualdesigner, and a Toolbox of controls.  It alsoincludes integrated testingfeatures such as simulation, monitoringand profiling, and the Windows Phone Store Test Kit.  Blend for visualstudio is usedto design the Windows Phone application with extra ordinary designs. Blend can make greatUser Interface for the app.  There are many Design Libraries available as well in the market to design some of the great User Interface of windows phone application.  Run& Debug  Windows phoneemulatorscan be used for debuggingthe application. Emulatorscan also scale to available Windows phone resolutionsto test and check whether it’s compatible with all resolutionsor not.