Getting Started with Caliburn.Micro and Windows Phone 7 Gary Ewan Park Twitter: Blog:

Slides:



Advertisements
Similar presentations
FIM MOBILE PRESENTATION
Advertisements

Microsoft Office SharePoint Portal Server 2007 Introduction to InfoPath Forms Services Daryl L. Rudolph.
MVVM Basics with Caliburn.Micro Presented by Stefan Nuxoll, Lithium PC.
John Culviner johnculviner.com DEMO CODE:
Developing HTML5 Application using MVVM pattern Pekka Ylenius.
USING THE MODEL-VIEW- VIEWMODEL PATTERN Laurent Bugnion Director, User Experience Integration IdentityMine
Lessons learned from developing a Windows 8 Metro application in C# Frode Nilsen Nilsen Labs Ticki.
CROSS PLATFORM DEVELOPMENT WITH MVVM CROSS By Ken Tucker.
Learning WebMatrix Part 3 of 3 Akber Alwani
Updating an installation with Windows® Embedded Developer Update. Windows and Microsoft are registered trademarks, All rights reversed. KRAK LLC © 2011.
An introduction to. Introductions  I’m Rob Fonseca-Ensor  A Solution Architect at Infusion  I run the Canary Wharf.NET User Group  I blog at
Real world Windows Phone development Igor
Building Silverlight Applications Using the MVVM pattern An Introduction by Peter Messenger Senior Developer – Qmastor
Agenda Unit Test Framework for the XAML app developer Automated end-user testing using Coded UI Test Q&A.
‘Metro’ / Modern – ‘WinRT’ Also known as ‘Windows Store Apps’ --o-0-o-- Windows 8 comes as two parts Win32 and WinRT The Traditional Desktop is Win32 The.
Hot Tuna CROSS PLATFORM DEVELOPMENT WITH.NET, XAMARIN AND MVVMCROSS.
Introduction to Mobile Programming. Slide 2 Overview Fundamentally, it all works the same way You get the SDK for the device (Droid, Windows, Apple) You.
Windows Windows Phone Azure … and WakeUpAndCode.com.
An Introduction to Silverlight Matt Harrington Developer Evangelist, Microsoft October 20, 2011.
Virtual techdays INDIA │ Nov 2010 Developing Office Biz Application using WPF on Windows 7 Sarang Datye │ Sr. Consultant, Microsoft Sridhar Poduri.
StyleCop Breaking down the barriers to entry Gary Ewan Park Twitter: Blog:
Windows Phone 8 Tips & Tricks for Developers Sascha Corti, Microsoft Switzerland Technical Evangelist | techpreacher.corti.com.
Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy
C# Tutorial -1 ASP.NET Web Application with Visual Studio 2005.
An Introduction to Progress Arcade ™ June 12, 2013 Rob Straight Senior Manager, OpenEdge Product Management.
Support Training Module. Support Manual 1.“On The Lot” – How it all works… 2.Craigslist Settings 3.Post to Craigslist 4.Backpage Settings 5.Post to Backpage.
How to request a Facility and/or equipment in “Within My Reach”
Windows Phone MVVM and Unit Testing Step by Step Andy Wigley Windows Phone Development MVP, Mobile Software Consultant APPA Mundi Ltd WPH208.
Office Business Applications Workshop Defining Business Process and Workflows.
Mtivity Client Support System Quick start guide. Mtivity Client Support System We are very pleased to announce the launch of a new Client Support System.
Windows Phone 7 Mobile Code Camp The Why Why develop for Windows Phone 7 versus Droid or iPhone? It’s all relative to total app users. SDK and Environment.
Andrew Coates Advanced Windows 10 development with the Office 365 APIs DEV33 5.
Slide 1. Agenda  Introduction to Windows Workflow What is it? What are activities? Hosting  Out of the box Activities  Custom Activities and Dependency.
04 |Sharing Code Between Windows 8 and Windows Phone 8 in Visual Studio Ben Riga
TODAY Android Studio Installation Getting started Creating your 1 st App Beginning to understanding Intents.
UNDERSTANDING YOUR OPTIONS FOR CLIENT-SIDE DEVELOPMENT IN OFFICE 365 Mark Rackley
Model View ViewModel Architecture. MVVM Architecture components.
Working with the interface and interacting with the iPad app.
Workflow in Microsoft Office SharePoint Server Jessica Gruber Consultant Microsoft Corporation.
Entity Framework Database Connection with ASP Notes from started/getting-started-with-ef-using-mvc/creating-an-
Office 365: Attack of the Clones! Building reusable site templates with the Office 365 PnP Framework.
Spaso Lazarević Microsoft MVP Nova banka ad Banja Luka Building business application using Visual Studio 2013 LightSwitch.
Programming with MVVM Miguel A. Castro Architect -
Understanding Dependency Injection… and those pesky containers Miguel A. Castro Architect -
Continuous Delivery and Team Foundation Server 2013 Ognjen Bajić Ana Roje Ivančić Ekobit.
Vladimir Milev New Venture Software Sharing Code between WPF and Universal Apps.
/DEV/TM #1 Building Cross-Platform Apps with Xamarin and MvvmCross Flavius-Radu DEMIAN.
Software services delivering SharePoint, Mobile, and Business Intelligence solutions Creating mobile applications that integrate with SharePoint 2013 on-
GrapeCity Build Experiences with Enterprise-level Tools and Solutions
Introduction ITEC 420.
In Windows 8 Store Applications
Real world Windows Phone development
Partners – MaaS360 Portal Management
MVVM Made Simple with Prism
5/15/2018 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
Build Windows 10 UWP MVVM Apps with Prism
Enterprise Library Overview
Affordable iPhone Mobile Apps Development Services Company
SharePoint Essentials Toolkit
Developer Patterns to Integrate Silverlight 4.0 with SharePoint 2010
Office 365 Development.
An introduction to MVVM using WPF NISCHAL S
SharePoint Permissions Manager
Microsoft Build /16/2019 1:17 PM Adding Interactions in the Visual Layer to Create Customized & Responsive Experiences Anthony Young & Lindsay Kubasik.
Microsoft Office 4/3/2019 Deep Dive into native Universal App development with the Office 365 APIs Speaker name Title Microsoft Corporation © 2012 Microsoft.
Erik Porter Program Manager ASP.NET Microsoft Corporation
.NET Framework V3.5+ & RESTful web services
SCCM Advanced Task Sequence Part 1
Ch07 生命週期(Life Cycle).
11/11/2019 1:15 PM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN.
Presentation transcript:

Getting Started with Caliburn.Micro and Windows Phone 7 Gary Ewan Park Twitter: Blog:

Agenda What is Caliburn.Micro? Blank Project Navigation Service Guarding Actions More Conventions and Navigation Using a Custom Service Application Life Cycle Tombstoning Launchers and Choosers

Source Code

My Development Rig… Host Operating System: Windows 8 Visual Studio 2012 Office 2013 Home Premium Preview Virtual Machine Windows 7 Visual Studio 2010 Windows Phone 7 SDK Local Git Repo for all code (using GitHub for Windows) Local Nuget Repo for Packages

What is MVVM?

The answer… Unfortunately, that is the topic of a whole other talk During the talk, if there are any concepts that you want covered, please feel free to ask, and I will do my best to answer the question Have a look here for more info:

What is Caliburn.Micro?

A Definition… “Caliburn.Micro is a small, yet powerful framework, designed for building applications across all Xaml Platforms. With strong support for MVVM and other proven UI patterns, Caliburn.Micro will enable you to build your solution quickly, without the need to sacrifice code quality or testability.” Reference 

What does that mean? Caliburn.Micro is an Open Source Framework which helps with the development of MVVM applications (as well as other patterns) It supports: WPF 4.0 Silverlight 4.0/5.0 WP7 WinRT (soon to be released) Ships as a Nuget package which can be easily added to your Projects Strongly driven by Convention over Configuration Project is coordinated by Rob Eisenberg

Blank Project

Get into good habits… Caliburn.Micro has a number of conventions, but it helps if you get into good habits: Consistent Folder Structure Suffix Views and ViewModels Once you do, the Caliburn.Micro magic starts working for you

Get started with Caliburn.Micro in 4(ish) steps Install Nuget Package Adopt consistent folder structure Clear out App.xaml and App.xaml.cs Update WMAppManifest.xml Job done… Detailed steps can be found here:

Demo 1 Blank Project Using Caliburn.Micro on a New Project

Navigation Service

What is Caliburn.Micro doing for us? AppBootstrapper DI Container ViewModelLocator MainPageView.xaml MainPageViewModel Register MainPageViewModel Type 2.Navigation to MainPageView.xaml 3.Retrieve MainPageViewModel 4.Create on Request 5.Assign MainPageViewModel as DataContext, optionally assign matching properties from QueryString

Demo 2 Navigation Service Navigating between ViewModels with ease using the Navigation Service

Guarding Actions

Wait, I want to prevent an action happening… Any method, or navigation action, can be controlled (i.e. disabled) based on a Convention of prefixing a method call with Can…

Demo 3 Guarding Actions Easily prevent/allow an action from occurring using only properties in ViewModel

More Conventions and Navigation

Apply Convention Binding to a ListBox

Assigning parameters to navigation Query String Support for strongly typed navigation Uses Fluent API to add information to resulting navigation QueryString Full access to available ViewModel Properties Never mistype a Uri or mess up a query string

Demo 4 More Conventions and Navigation Applying Conventions to more complicated controls and passing variables between ViewModels

Using a Custom Service

DI Container For The Win… In addition to being able to provide ViewModels to the ViewModelLocator, Caliburn.Micro’s DI Container can also be used to provide other “services” There are built in services already available NavigationService EventAggregator PhoneService But there is nothing to stop you adding your own These “services” can be used, when required, on any class, simply be adding them as a parameter into the constructor of the class

You can chain lots of these services together…

Demo 5 Using a Custom Service Use the Caliburn.Micro Dependency Injection Container to provide services to ViewModel

Application Life Cycle

The IPhoneService… No, nothing to do with the iPhone, sorry Exposes application level events that make more sense than the built in events Launching Activated Deactivated Closing Continuing Continued Resurrecting Resurrected

ViewModel Events The following ViewModels events are exposed: OnViewAttached OnInitialize OnActivate OnViewReady OnViewLoaded OnDeactivate

Demo 6 Application Life Cycle Tap into Application and ViewModel level events

Tombstoning

Tombstoning in Caliburn.Micro Makes use of the events exposed in the IPhoneService to reliably and accurately save/restore important data Extension methods provided for common user scenarios Possible to persist information in both Application State as well as Phone State Possible to define at which point the information is restored Uses Fluent API to easily string user scenarios together

Demo 7 Tombstoning Use Caliburn.Micro’s ability to Tombstone individual properties of a ViewModel into Application and Phone State

Launchers and Choosers

Launchers and Choosers are painful to work with if you want to do MVVM, not in Caliburn.Micro. Built on top of the IEventAggregator Using the IHandle interface, possible to return a TaskCompleted Generic which matches the Launcher/Chooser that you are using Simple Subscribe/Unsubscribe model

Demo 8 Launchers and Choosers Easily use Windows Phone 7 Launchers and Choosers in an MVVM pattern

The Future… Does Caliburn.Micro support Windows Phone 8? The answer is yes Check here for more information:

Useful Links An Introduction n-Micro-for-Windows-Phone-7http:// n-Micro-for-Windows-Phone-7 Project Home Page Work in Progress Sample Application

Questions? Feel free to me any additional questions at