wi phug windows phone development from z to a
DESCRIPTION
The kickoff presentation of our Belgian Windows Phone User GroupTRANSCRIPT
Windows PhoneApp Developmentfrom Z to A
26/04/2012
@WiPhug
• sharing is caring• developers for developers
26/04/2012
about WiPhug
@depechie @johanpeters @modul8com @nicovermeir @bartlannoeye @goofys_friend @miscoriadennis
26/04/2012
thank you sponsors
26/04/2012
community request• Belgian Apps• are a Windows Phone developer ?• can’t find your app in this app ?• mail your ApplicationId to :
speakers of today
26/04/2012
Bart Lannoeye@bartlannoeye
Glenn Versweyveld@depechie
Michael Bruyninckx@modul8com
tweet#wiphug
Marketplace submission processMVVMLight 4.0MS SQL Server CEAgFxCimbalinoHubTilesJeffWilcox.Maps & Bing Mapsmtiks for Windows Phone
agenda
26/04/2012
Marketplace submission
submit a new app
download statisticsdaily vs total
status ongoing
submissions
26/04/2012
Marketplace submissionupload page
give your app a nameselect XAPselect if it’s a beta or notgive a version number
beta submission
give your app to max 50 testers and let them evaluate it during max 90 days26/04/20
12
Marketplace submissiondescribe your App
the xap is uploaded and analyzed
in case of multi language support, several “detail pages” have to be filled out, short description, detailed description, keywords, even artwork and screenshots, etc. – a lot of work!
add multi language support directly in project file<project name>.csproj
<SupportedCultures>nl,fr,de,en</SupportedCultures>
26/04/2012
Marketplace submission
set your priceand select the availability per country
26/04/2012
Marketplace submissiontest information
the most important setting of the publishing process, i.e. “the publish options”
26/04/2012
Approval process = +- 5 working daysIf rejected, perfect explanation why• pdf document that details problems• step by step reproduction of problem
Test your app with the Marketplace Test kit
Marketplace submission
Bart Demo26/04/2012
what is MVVM ?• architectural design pattern• targeted to modern UI development
• Windows Presentation Foundation (WPF)• Silverlight• Windows Phone• HTML5 (KnockOut.js for example)• Windows 8
MVVMLight 4.0
26/04/2012
why MVVM ?• collaboration (designers and developers)• maintainability
• model never changes when view changes• viewmodel rarely changes when view changes• code is easier to find
• flexible UI changes• separation of concerns
• single responsibility
• unit testability• reusability of components
MVVMLight 4.0
26/04/2012
MVVM’s how ?• INotifyPropertyChanged• bindings• commanding
MVVMLight 4.0
26/04/2012
the Model• as good as all possible data sources• expose data as collections• one Model can serve several ViewModels• use Interfaces to provide data
• allows database mocking• Eliminate tight coupling of services with
Model
MVVMLight 4.0
26/04/2012
the View• represent the user interface• contains no testable logic• keep as simple as possible
• designers playground
MVVMLight 4.0
26/04/2012
the ViewModel• abstraction of the view• glue between view and model• keeps the View’s state
MVVMLight 4.0
26/04/2012
why MVVMLight 4.0 ?• developed by Laurent Bugnion (MVP)• same framework for Silverlight, WPF,
Windows Phone 7 and Windows 8• emphasis on “blend-ability”• easy to learn, lots of examples online
MVVMLight 4.0
26/04/2012
How does it work ?• uses a locator pattern via ViewModelLocator• uses ICommand for Commanding
• bind with Buttons• bind with Event Triggers for Events
• Or with MVVM Light RelayCommands
• uses Event Aggregator / mediator / messenger• ViewModels communicate with each other
MVVMLight 4.0
Glenn Demo26/04/2012
• build in database support since WP 7.5
• database SQL Server CE (.sdf file)• uses isolated storage• DB server runs only when app is
active • code first approach• Linq to SQL to query
MS SQL Server CE
26/04/2012
create POCO’s• classes = tables • properties = columns (& indexes)• create associations between tables
create DataContext classes• expose tables
MS SQL Server CE
Bart Demo26/04/2012
what is it ?• framework for fetching and caching
data• keeps the work off the UI thread• optimizes network usage
• automatically determines if cache is valid
• MVVM support
AgFx
26/04/2012
how ?• describe how to fetch data• tell it how to deserialize that data• say when the data expires, so fresh
data can be fetched
• then all the rest happens automagically
AgFx
Glenn Demo26/04/2012
what is it ?a set of useful and powerful elements:
• an ApplicationBar behaviour to make it bindable• MVVM navigation service• MVVM compatible services for camera access• and a few other sevices• converters, helper classes and extension
methods
Cimbalino
26/04/2012
how ?• NavigationService
• constructor injects the NavigationService in your ViewModels
• ApplicationBar Behaviour• add a namespace reference in XAML to
Cimbalino.Phone.Toolkit.Behaviors
Cimbalino
Glenn Demo26/04/2012
what is it ?• in-app ‘live tiles’• makes the app more vivid• control available in the Silverlight Toolkit for WP
HubTiles
26/04/2012 Bart Demo
how to use the map ?• register at http://www.bingmapsportal.com
• use your Windows (Live) Account
• generate a “mobile” key• 1 key for all your mobile apps !
• use key in app• BingMaps Control : CredentialsProvider
property• JeffWilcox.Maps : Application.Resources
Bing Maps
26/04/2012
what is it ?• performance optimisation• image button• image = Bing or Google Map • only 1 – non templated pushpin• click event shows Bing Maps• Bing Maps key via Application.Resources
JeffWilcox.Maps
Glenn Demo26/04/2012
allows analyticsreal time app usage statistics
anti piracy protection
super easy implementation
mtiks for Windows Phone
26/04/2012
mtiks for Windows Phone
26/04/2012
mtiks for Windows Phone
26/04/2012
mtiks for Windows Phone
26/04/2012
mtiks for Windows Phone
26/04/2012
mtiks for Windows Phone
Microsoft Marketplace+ out of box - delay 1 week
Distimo+ rich data- 3 to 4 days delay
Flurry+ fast results- incorrect results
Google Analytics+ feature rich- lots of code
why mtiks and not another ?
26/04/2012
mtiks for Windows Phonehow to implement ?
1. register at http://www.mtiks.com/signup
2. nuget mtiksor download SDK = zip containing a DLL and reference it
3. in App.XAMLusing System.Reflection;
using com.mtiks.winmobile;
4. in Application_Launching and Application_Activatedmtiks.Instance.Start(“YourKey", Assembly.GetExecutingAssembly());
5. In Application_Deactivated and Application_Closingmtiks.Instance.Stop();
Bart Demo26/04/2012
mtiks for Windows Phone
anti piracy ?protection against illegal downloads
how ?- silent piracy tracking- automatic message box
Demo26/04/2012
MVVMLight• http://mvvmlight.codeplex.com/releases• http://nuget.org/packages/MvvmLightPreview
AgFx• http://agfx.codeplex.com/• http://nuget.org/packages/AgFx
Cimbalino• https://github.com/PedroLamas/Cimbalino-Phone-Toolkit• http://nuget.org/packages/Cimbalino.Phone.Toolkit
used tools
26/04/2012
JeffWilcox.Maps• http://www.jeff.wilcox.name/2012/01/jeffwilcox-maps/• https://github.com/jeffwilcox/wp-maps• http://nuget.org/packages/JeffWilcox.Maps
mtiks• http://www.mtiks.com • http://nuget.org/packages/mtiks
SQL Compact Edition• http://www.microsoft.com/download/en/details.aspx?id=17876
used tools
26/04/2012
more planned in november & december !
planned events
26/04/2012
24/05 Advanced data access strategiesKevin Dockx
21/06 Community Day
June 3 speakers, 3 sessions
20/09 MVVMLight & Bing MapsJoost Van Schaik (MVP NL)
25/10 Application lifecycle, isolated Storage & local databaseKevin Dockx
?q & a
26/04/2012