Entwickeln von Windows Phone Unternehmens-Apps Thomas Claudius Huber Trivadis AG
Thomas Claudius Huber Principal Consultat bei Trivadis www.trivadis.com www.thomasclaudiushuber.com Trainer, Coach, Developer, Architect Spezialisiert auf XAML, WPF, UI Microsoft MVP im Bereich Client Development Autor umfassender Handbücher WPF, Windows Store Apps und Silverlight
Thomas’ Phone-CV 2000 Nokia 3210 2002 Nokia 7650 … some other Nokias 2007 HTC Dual Touch (Windows Mobile) 2007 Sony Ericsson 2009 iPhone 3GS 2010 Samsung Omnia 7 (WP7) 2011 Samsung Galaxy SII (Android) 2012 Nokia Lumia 920
Sessioninhalt Windows Phone 8 Überblick Eine App erstellen Deployment-Möglichkeiten
Windows Phone 8 Überblick
Als Entwickler loslegen Portal unter http://dev.windowsphone.com Zum Entwickeln wird kein Account benötigt Neu: Mit einem Account lassen auch Windows Store Apps veröffentlichen Individual: 19$; Company: 99$
Windows Phone 8 Apps mit XAML/C#, C/C++, HTML/JavaScript Native C++-Apps werden unterstützt -> Insbesondere beim Gaming-Bereich interessant (DirectX) Windows Phone 7-Apps laufen nach wie vor Microsoft hat diese aus Optimierungsgründen neu kompiliert Baut auf Windows Phone Runtime auf (WinPRT)
Windows Phone Runtime (WinPRT) Untermenge der Windows Runtime (WinRT) + Phone-spezifische Klassen Code lässt sich somit in Windows Store Apps und Windows Phone Apps wiederverwenden Besteht aus nativem Code und .NET Metadaten Metadaten werden in .winmd-Dateien gespeichert (Windows Metadata) C:\Program Files (x86)\Windows Phone Kits\8.0\Windows MetaData\Windows.winmd Demo
Windows Phone 8 - Auflösungen 1280x768 (WXGA) 1280x720 (720p) 800x480 (WVGA)
Windows Phone 8 - Auflösungen Betriebssystem übernimmt Skalierung Vektorgrafiken für 800x480 erstellen Bitmaps für WXGA (1280x768) erstellen Im AppManifest lassen sich Skalierungen festlegen Per default werden alle Skalierungen unterstützt DisplayProperties-Klasse enthält aktuelle Skalierung Klasse enthält statische ResolutionScale-Properties Klasse stammt aus dem Namespace Windows.Graphics.Display Demo
Windows Phone 8 Update 3 Das nächste grosse Update für WP8 Wird auch als GDR3 bezeichnet (General Distribution Release) Bringt Full HD (1920x1080) Das neue Nokia Lumia 1520 wird das erste «Phablet» mit dieser Auflösung Ab 5“ Bildschirmdiagonale zusätzliche Standard-Live-Tile-Spalte Unterstützt neue Prozessoren z.B. Qualcomms Snapdragon 800
Sessioninhalt Windows Phone 8 Überblick Eine App erstellen Deployment-Möglichkeiten
Eine App erstellen
Windows Phone 8 im Unternehmen Clients Windows Phone Windows Store Apps WPF ... Services (Rest, WCF, ...) Business Layer Database
Windows Phone 8 im Unternehmen Clients Windows Phone App DataProvider Services (Rest, WCF, ...) Local Storage Folder Business Layer Database
Business-Apps – Windows Phone Daten anzeigen und bearbeiten typische CRUD-Szenarien Validieren von Eingaben Fehler anzeigen, Speichern unterbinden Wart- und Testbarkeit mit MVVM erhöhen UI-Logik wird in ViewModels gepackt
Eine kleine App erstellen Demo
Validierung Verschiedene Validierungs-Möglichkeiten Exceptions, IDataErrorInfo, INotifyDataErrorInfo,... NotifyOnValidationErrros-Property des Binding-Objekts auf true setzen Ansonsten wird das BindingValidationError-Event nicht ausgelöst BindingValidationError-Event registrieren Darin Fehler anzeigen/verbergen Demo
Windows Phone Toolkit Enthält für Business-Apps wichtige Controls DatePicker, AutoCompleteBox, ContextMenu etc. Weitere Infos unter http://phone.codeplex.com/ Download via NuGet http://nuget.org/packages/wptoolkit Alternativ zu NuGet lässt sich der Source-Code auch selbst kompilieren Download des Source-Codes unter http://phone.codeplex.com/SourceControl/latest
Weiteres SQLite Datenbank für lokalen Speicher http://sqlwinrt.codeplex.com/ Microsoft Sharepoint SDK for Windows Phone Enthält Bibliotheken und Projektvorlagen, um Sharepoint-Apps zu entwickeln
Sessioninhalt Windows Phone 8 Überblick Eine App erstellen Deployment-Möglichkeiten
Deployment-Möglichkeiten
Windows Phone 8 - Deployment Via Windows Phone Store Hier steht die App der breiten Öffentlichkeit zur Verfügung Windows Intune oder SSCM SSCM=System Center 2012 Configuration Manager Beides sind Verwaltungstools, Windows Intune ist cloud-basiert Neue Apps lassen sich bspw. per E-Mail an Benutzer versenden Als Company App
Company App – notwendige Schritte Unternehmens-Account erstellen dev.windowsphone.com Enterprise Zertifikat von Symantec erwerben https://products.websecurity.symantec.com/orders/enrollment/microsoftCert.do Die benötigte Symantec Id steht im Unternehmensaccount unter dev.windowsphone.com Enterprise Zertifikat als PFX exportieren
Company-App – notwendige Schritte Application Enrollment Token (AET) erstellen Windows Phone 8 SDK enthält dazu den AETGenerator C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.0\Tools\AETGenerator Empfohlen: Company Hub-App erstellen eine Portal für den Benutzer, das ihn zu allen Apps der Firma führt: Erlaubt Suche, Installation etc. Company-Apps zum Verteilen vorbereiten In der XAP enthaltene Managed Assemblies vorkompilieren XAP-Datei mit der aus dem Enterprise Zertifikat generierten PFX-Datei signieren: C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.0\Tools\XapSignTool\
Company-App – notwendige Schritte Benutzern die AET und Company Hub XAP bereitstellen AET ist eine .aetx-Datei Klick auf .aetx-Datei fügt Unternehmens-Account zum Phone hinzu Es lassen sich mit mehreren .aetx-Dateien auf einem Phone auch mehrere Firmen nutzen Klick auf XAP-Datei installiert Company Hub-App That’s it! Jetzt kann der Benutzer darüber die weiteren Firmen-Apps installieren
Sessioninhalt Windows Phone 8 Überblick Eine App erstellen Deployment-Möglichkeiten
Fazit Mit Windows Phone 8 lassen sich Business-Apps entwickeln Deployment im Unternehmen ist mit Windows Phone 8 in wenigen Schritten möglich
Tolle Preise am Trivadis Stand
www.thomasclaudiushuber.com/talks.php Slides/Samples unter: 3/28/2017 8:11 PM Slides/Samples unter: www.thomasclaudiushuber.com/talks.php Twitter: @thomasclaudiush Mail: thomas.huber@trivadis.com © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.