Dr. Frank Prengel Embedded Evangelist Microsoft Deutschland GmbH 4/12/2017 9:41 PM Smartere Devices mit Visual Studio 2008 und dem .NET Compact Framework 3.5 Dr. Frank Prengel Embedded Evangelist Microsoft Deutschland GmbH DEVICES © 2007 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.
Agenda Markt & Infrastruktur Deviceentwicklung & Microsoft: Was bisher passierte Visual Studio 2008 for Devices Wermutstropfen Neue Möglichkeiten .NET Compact Framework 3.5 SQL Server Compact Edition 3.5
Wussten Sie schon…? The world champion record is held by Mikko Lampi. He threw 94,97 metres in 2005.
Mobile Lösungen im Trend 34.1% Converged Mobile Phones 35 30 25 20 15 10 5 YOY % shipping growth 18.6% Mobile PCs 5.8% Mobile Phones 3.9% Desktop PCs 2006-2010 SOURCE: Gartner Dataquest, and IDC 2006
Enterprise Ready Mobility
Der Werkzeugkasten Managed & Native! Desktop Parity, Designers, Data Device Emulator 1.0 & 2.0* .NET CF Framework 1.0 & 2.0 Microsoft Windows CE 5.0 & 6.0 Smartphone & Pocket PC 2003, Windows Mobile 5.0* Windows Mobile 6* SQL Server 2005 Mobile Embedded Visual Tools 3.0 Microsoft eMbedded Visual C++ 4.0 Visual Studio .NET 2003 Visual Studio 2005 Visual Studio 2008 Nur Native Windows CE 4.x, 5.0 Smartphone & PPC 2003 x86 Emulator Native & Managed Device Emulator 3.0 Security Aware IDE / Unit Testing Windows CE 5.0 and CE 6.0 Windows Mobile 2003 Smartphone** & Pocket PC (**Nur Native) Windows Mobile 5.0 Smartphone Windows Mobile 5.0 Pocket PC Windows Mobile 6 Professional* Windows Mobile 6 Standard* .NET Compact Framework 2.0 & 3.5 SQL Server Compact Edition 3.5 Nur Managed Windows CE 4.2 .NET Compact Framework 1.0 Smartphone & Pocket PC 2003 eVB, eVC Windows CE 3.0 * separater Download
Introducing…
Vorweg: Wermutstropfen … oder: Entdecke die Unmöglichkeiten Device-Entwicklung mit VS 2008 erst ab Professional Edition
Vorweg: Wermutstropfen … oder: Entdecke die Unmöglichkeiten Kein Hosting von Platform Builder 6.0 für Windows Embedded CE 6.0
Vorweg: Wermutstropfen … oder: Entdecke die Unmöglichkeiten Keine Templates & Designer für ASP.NET Mobile Web Sites
Neu in Visual Studio 2008 Unit Testing for Devices Device Configuration Manager Device Certificate Manager Device Emulator Version 3.0 Windows Mobile 5.0 SDK "in the box" .NET Compact Framework 2.0 SP2 + 3.5 Updates für Compiler, MFC, Tools Managed CoreCon Framework
Demo { VS 2008 for Devices} 4/12/2017 9:41 PM © 2007 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.
Unit Testing for Devices Unit-Test-Unterstützung für NETCF-Anwendungen Gleiche "Experience" wie bei Desktop-Anwendungen Nahtlose Integration mit Team System und Team Foundation Server Einfaches Testen für diverse Konfigurationsszenarien Unterstützt Testausführung von der Kommandozeile
Testausführung … auf verschiedenen Geräten oder Emulatoren möglich durch Editieren der Konfiguration
Testausführung: Was läuft? Hostadapter für Smart Devices klinkt sich in die Hostadapter-Architektur der Testing-Tools ein Kopiert (binäre) Dateien auf Device/Emulator Startet SmartDeviceTestHost.exe auf dem Device/Emulator – Tests werden ausgeführt und Resultate an VS auf dem Desktop kommuniziert Am Schluss werden Log-Dateien zurückkopiert
Was geht nicht? Nicht unterstützt sind Code Coverage Performance Session
Demo { Device Testing } 4/12/2017 9:41 PM © 2007 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.
Erinnerung: Gerätesicherheit "Security through identity" Zertifikate: X.509 identifiziert den Hersteller Mobile2Market Privilegien: unsigned, unprivileged, privileged Ausführung: normal, trusted Start: normal, User Prompt, verhindert Konfigurationen: One-Tier Pocket PC Two-Tier Smartphone
Security configuration 4/12/2017 9:41 PM Certificate Application Authentication Certificate Stores Security configuration User prompt Permission (Privileged/Normal/Blocked)
Gerätesicherheitsmanagement Konfiguration der Gerätesicherheit (Device Configuration Manager) Sicherheitsrichtlinien überprüfen und setzen Sicherheitseinstellungen exportieren Eigene Sicherheitsrichtlinien erstellen Zertifikatsverwaltung auf dem Gerät (Device Certificate Manager) Zertifikate einsehen Zertifikate hinzufügen oder entfernen
Demo { Geräteverwaltung } 4/12/2017 9:41 PM © 2007 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.
Managed CoreCon Framework Basiert auf existierendem Core Connectivity Framework Wird intern von MS-eigenen Tools verwendet (z.B. Unit Testing) Macht das Erstellen eigener Remote-Tools leicht Referenz hinzufügen auf: Microsoft.Smartdevice.Connectivity.dll
Device Emulator 3.0 Verfügbar mit Visual Studio 2008 Verbesserungen Evolutionäre Weiterentwicklung von Version 2.0 Verbesserungen Unterstützung für Automatisierung (COM) Zugriff auf Interfaces über VBScript Einfaches Hinzufügen eigener Images im Device Emulator Manager XML-File zur Konfiguration von Emulator-Instanzen
3.5
Versionen und Schwerpunkte .NET für Devices Performance Features Tools Verteilte Anwendungen Mobile Daten 2002 2003 2004 2005 2006 2007 XNA 1.0 1.0 SP1 1.0 SP2 1.0 SP3 2.0 2.0 SP1 2.0 SP2 3.5 Smartphone Landscape Autoscroll Performance Generics COM Interop Direct3D Windows Communication Foundation Language Integrated Query CLR Profiler Headless Windows CE 4.2 Remote Performance Monitor
.NET Compact Framework 3.5 WCF "Light" LINQ (XML, Objekte, DataSet) incl. Store-And-Forward Channel LINQ (XML, Objekte, DataSet) Neues Tool: CLR Profiler Kompression Client-Side-Zertifikate Sound API Diverse Verbesserungen & Fixes
NETCF + verteilte Anwendungen Kommunikation für Online-/Offline-Situationen einfacher implementieren Server soll Kommunikation mit Geräten initiieren Anwendungen sollen von Gerät zu Gerät kommunizieren können (P2P) WCF für die mobile Welt
WCF im NETCF 3.5 Desktop (>10 MB) Device (< 1 MB) Endpoints, Contracts, Config files, etc… Messages, Bindings, Transports
WCF im NETCF 3.5: Features Transport Encoding Security Reliability Protocol HTTP Text WS-* HTTP Text WS-* WS-* WS-* Exchange Custom Custom Custom Custom Custom MTOM TCP Binary Pipes MSMQ http://blogs.msdn.com/andrewarnottms/ archive/2007/08/21/ The-WCF-subset-supported-by-NetCF.aspx
"Occasional Connectivity" Grundproblem mobiler Anwendungen Adresse und Identität IP-Adresse des Mobilgeräts kann wechseln und (serverseitig) nicht erkannt werden Dynamic DNS und IPv6 noch nicht universell verfügbar TCP/HTTP nur zum "Herausrufen" vom Gerät aus Echtes P2P nicht machbar QoS (intermittente Verbindungen) Anwendungen müssen explizit Offline-Status voraussetzen Benötigt wird eine Möglichkeit, Nachrichten aufzubewahren und erst bei Verbindung zu versenden ("store and forward")
Die Lösung?
Store And Forward Messaging "WCF über Email" Email-Infrastruktur löst Adressierbarkeits- und Erreichbarkeitsprobleme Konsistentes Programmiermodell für Windows Mobile und Windows auf PCs Nutzt Erweiterbarkeit der WCF-Architektur Spezieller "store-and-forward"-Transportkanal über Email Nutzt ActiveSync “Always-Up-To-Date”-Funktion ("Push Email") und Exchange 2007 Web Services
Adressschema net.mail://sales/orderschannel#service@company.com Scheme john@microsoft.com Application 1 Application 3 Application 2 Application 4 net.mail://sales/orderschannel#service@company.com Scheme Channel Name Separator Distribution list
Demo { Store & Forward } 4/12/2017 9:41 PM © 2007 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.
Demo { Store & Forward } http://blogs.msdn.com/frankpr 4/12/2017 9:41 PM { Store & Forward } Demo http://blogs.msdn.com/frankpr http://www.techfiles.de/frankpr/WCFCompact.wmv © 2007 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.
LINQ im NETCF 3.5 Kompatible Teilmenge der Funktionalität im .NET Framework 3.5 LINQ to Objects LINQ to XML LINQ to DataSet, DataTable Nicht verfügbar: LINQ to SQL Expression Trees
LINQ to Objects BURKE DAVID FRANK using System; using System.Linq; using System.Collections.Generic; class app { static void Main() { string[] names = { "Burke", "Connor", "Frank", "Everett", "Albert", "George", "Harris", "David" }; IEnumerable<string> expr = from s in names where s.Length == 5 orderby s select s.ToUpper(); foreach (string item in expr) Console.WriteLine(item); }
XML: Vor LINQ (d.h. DOM) <Books> <Book> XmlDocument doc = new XmlDocument(); XmlElement books = doc.CreateElement("Books"); XmlElement book = doc.CreateElement("Book"); XmlElement title = doc.CreateElement("Title"); XmlElement price = doc.CreateElement("Price"); doc.AppendChild(books); books.AppendChild(book); book.AppendChild(title); book.AppendChild(price); title.AppendChild( doc.CreateTextNode("Short DOM reference, vol.5")); price.AppendChild(doc.CreateTextNode("99.95")); doc.Save(“MyBooks.xml”); <Books> <Book> <Title>Short DOM reference, vol.5</Title> <Price>99.95</Price> </Book> </Books>
LINQ to XML <Books> <Book> XDocument doc = new XDocument( new XElement("Books", new XElement("Book", new XElement("Title", "What to do in spare time freed up from XML programming."), new XElement("Price", "19.95") ) doc.Save(“MyBooks.xml”); <Books> <Book> <Title>What to do in spare time freed up from XML programming.</Title> <Price>19.95</Price> </Book> </Books>
Neue APIs Sie haben sich gewünscht: Kompression Client-Side-Zertifikate Sound Windows Forms-Verbesserungen Plattform-Identifikation
Bsp.: Plattform-ID using Microsoft.WindowsCE.Forms; … textBox1.Text = SystemSettings.Platform.ToString();
NETCF 3.5 Power Toys
NETCF 3.5 Power Toys Remote Performance Monitor, GC Heap Viewer (Update) NETCF CLR Profiler App Configuration Tool (NetCFcfg.exe) NETCF ServiceModel Metadata Tool (netcfsvcutil.exe) Remote Logging Configuration Tool NETCF Network Log Viewer
Demo { Power Toys } 4/12/2017 9:41 PM © 2007 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.
Was? Wo? Wofür? Sehr kleine (~1MB) Embedded-, In-Proc-DB Subset der SQL Server-Typen und -Sprache Keine Stored Procs, Views, Xquery Warum T-SQL, wenn man Managed Code haben kann? Wo? Mobile & Embedded-Geräte Windows Vista, Media Center PC, MSN Client, ZUNE, Windows Media Player, … Default für Lokale DB in VS 2008 Wofür? Lokaler Online / Offline-Cache Lokale DB für Stand-Alone-Apps Persistieren von Daten aus In-Memory-Caches Strukturiertes Dokumentenformat für Apps
Funktionserweiterungen nach Kundenfeedback ‘01 ‘03 ‘05 ‘06 ‘07 SQL Server Compact 3.5 Synchronisierung mit Sync Services for ADO.NET SQL Server Compact 3.1 Alle Desktop-Szenarien möglich SQL Server Mobile 3.0 Tablet PC-Unterstützung * Interne Verwendung in Windows: Vista SQL Server CE 2.0 .NET Compact Framework unterstützt SQL Server CE 1.0 Embedded-DB für Devices – eVC, eVB
Neu in SSCE 3.5 Neues Dateiformat Konvertierung notwendig VS2008 / SQL2008 Mgmt Studio als Tool PK/FK-Auswahl im Table Designer timestamp (rowversion)-Datentyp Neue T-SQL-Statements Stärkere Verschlüsselung (Nur für Desktop: LINQ to SQL, Sync Services)
Upgrade 3.1 3.5
Neue T-SQL-Statements Nested Query in SELECT FROM CROSS APPLY & OUTER APPLY CAST TOP SET IDENTITY INSERT
4/12/2017 9:41 PM { SSCE 3.5 } Demo © 2007 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.
Zusammenfassung Visual Studio 2008 bringt kleine und große Neuerungen … und (fast) alle Features von VS 2005 .NET Compact Framework 3.5 vereinfacht OCS-Lösungen ("store and forward" WCF) Datenzugriff (LINQ) Debugging & Profiling (Power Toys) SQL Server Compact Edition 3.5 ohne umwälzende Neuerungen Fazit: Device-Entwicklung wird leichter!
Literatur A. Wigley, D. Moth, P. Foot: Microsoft Mobile Development Handbook http://www.microsoft.com/ mspress/books/10294.aspx
Literatur Rob Tiffany: Windows Mobile Data Synchronization with SQL Server 2005 and SQL Server Compact 3.1 http://blogs.msdn.com/robtiffany/
Literatur Douglas Boling: Programming Windows® Embedded CE 6.0 Developer Reference, Fourth Edition http://www.microsoft.com/ mspress/books/11064.aspx
Noch Fragen? ?
Vielen Dank! http://blogs.msdn.com/frankpr
4/12/2017 9:41 PM © 2007 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. © 2007 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.