{Mobile e Smart Client}
About {Stefano Ottaviani} 
• Co-fondatore di DotNetMarche 
• Membro di UGIdotNET 
• Sviluppo desktop e mobile con .Net / c++ 
• Blog: blogs.ugidotnet.org/ste8 
• Mail: steott@gmail.com
Il mondo {Mobile} è in fermento
…come quello degli {Smart Client}
Come affronterà Microsoft 
queste {sfide}
{Sondaggio}
Device {Windows Mobile} 
• “Core”, base per 
tutti gli altri 
•Device industriali 
(palmari / POS, …) 
• Real Time 
• Rinominato in: 
Windows 
Embedded 
Compact 
• Ex 
Windows Mobile 
for Pocket PC 
• Palm “classico” 
• No telefonia 
• Touch Screen 
• Tastiera opzionale 
• Basato su CE 5 
• Ex 
Windows Mobile 
for Pocket PC 
Phone Edition 
• Classic + 
funzioni Telefonia 
• Ex 
Windows Mobile 
for Smartphone 
• No Touch Screen 
• Tastiera fisica 
• Basato su CE 5
{Dove eravamo} 
Da VS2005 
a…ieri!
{Dove eravamo} 
• Unico ambiente .Net / C++ 
• Dismesso Embedded VC++ 
• Integrati i tools per accesso remoto ai device 
• Compact Framework 2 
• Anchor / Docking 
• Subclassing 
• UserControl 
• Controlli Windows Form (DateTimePicker, 
Notification, WebBrowser, Splitter...)
• Accesso ai Dati 
• Sql Server Compact Edition 3.1 
• SqlCeResultSet 
• RDA / Merge Replication 
• Gestione Dispositivi 
• Telefono 
• Camera 
• GPS 
• Serial Port 
{Dove eravamo}
• P.I.M. (Pocket Outlook) 
• State and Notifications Broker 
• Com Interop 
• Threading (migliorie) 
• Global Exception Handler 
{Dove eravamo}
• Tools per logging / profiling 
• Emulatori 
• Versione 2 
• Processori ARM 
• Cell Emulator (con Windows Mobile SDK 6) 
• Soluzioni ‘artigianali’ per testing 
• Test effettuati nel desktop 
• wMobinium.net (TDD + CI) 
{Dove eravamo}
{Dove eravamo} 
• Mobile Client Software Factory 
• Orientation Aware Control Application Block 
• Compact Composite UI Application Block 
• Configuration Application 
• Connection Monitor 
• Disconnected Service Agent 
• Data Access Application Block 
• Data Subscription Application Block 
•….
• Windows Embedded CE 6 
{Dove eravamo} 
• Nato ieri… ma da utilizzare per il domani! 
• Rivoluzionato il kernel 
• Fino a 32.000 processi (contro i 32 precedenti) 
• 2GB memoria virtuale per processo (vs 32 MB) 
• 100% codice in Shared Source
{Dove andremo} 
Da VS2008 
al domani!
Windows Mobile {6.1} 
• User Experience 
• Home Screen 
• Getting Started Center 
• Setup Bluetooth / WiFi / Mail 
• Threaded SMS 
• Task Manager 
• Copy & Paste support for non-touch devices
• Internet Explorer Mobile 
• Zoom Support 
• Page Overview 
• Sicurezza / Amministazione 
{Windows Mobile 6.1} 
• System Center Mobile Device Manager 
• Device Encryption 
• http://www.microsoft.com/windowsmobile/business/strategy/newsecurityfeatures.mspx 
• Basato ancora su Windows CE 5
System Center 
{Mobile Device Manager} 
• Integra i device alla rete aziendale: 
• OTA (Over-the-air) device management 
• Active Directory e Group Policy 
• Mobile VPN 
• Device Inventory and Reporting 
• OTA Software Deployment 
• Supporto da Windows Mobile 6.1
VS2008 e .NET {CF 3.5} 
• Multitargeting (uso .NET CF 2 o 3.5) 
• Piattaforme supportate: stesse del CF 2 
• Nuove classi nel .NET CF 3.5 
• SoundPlayer 
• Compression 
• Stopwatch 
• String.Contains 
• Supporto ClearType sui controlli 
• Piccole migliorie nei Windows Forms
{LINQ} per Mobile / S.C. 
• Subset: solo Standard Query 
• Supporta in .NET CF: 
• LINQ to Objects 
• LINQ to XML 
• LINQ to DataSet 
• LINQ to SQL 
• Supportato solo da SSCE in desktop 
• No designer support: SqlMetal da console
{Compact} WCF 
Windows Communication Foundation 
• Nasce dall’idea dell’E-Mail transport 
(Lunch Launcher) 
• Windows Mobile Mail Transport 
• Risponde alle esigenze: 
• Che indirizzo (IP) ha il device? 
• Come comunico se è offline? 
• Richiede Exchange Server 2007 (ExchangeWebServiceMailTransport) 
• one-way messaging 
• I.M Sample: http://msdn2.microsoft.com/en-us/magazine/cc164240.aspx
{Compact WCF} 
• Subset di WCF 
• Può solo consumare servizi, no hosting 
• No Service Model 
• No Contracts 
• Si Channel Layer 
• Uso di Messaging API (Channel Factories,…) 
• Proxy generato con NetCFSvcUtil.exe 
da Power Toys for .NET CF 3.5
• Transports {Compact WCF} 
• Si HTTP/s, E-Mail 
• No MSMQ, TCP, altri 
• Formatters 
• Si SOAP 
• No Binary 
• Bindings 
• Si BasicHttp, Mail, Custom 
• No WS-* 
http://blogs.msdn.com/andrewarnottms/archive/2007/08/21/the-wcf-subset-supported-by-netcf.aspx
{Silverlight} for Mobile 
• Annuncio al Mix / CTP 2nd Quarter 2008 
• Basato sulla versione 1 di Silverlight 
• Windows Mobile e altri (Nokia) 
• E Windows Presentation Foundation?
Tools per {Debugging} 
• Unit Testing su device (emulatore / reali) 
(da Visual Studio Pro) 
• Remote Performance Monitor 
• CLR Profiler
{Vari} 
• Smart Device Connectivity API 
• Device Security Manager 
• Device Emulator v.3 
• Script per task amministrativi 
• Configurazione via XML 
• Power Toys for .NET CF 3.5
Sql Server {Compact Edition 3.5} 
• Default local database (facile deploy) 
• Nuove funzionalità 
• timestamp (rowversion) data type 
• Nested query 
• CROSS APPLY and OUTER APPLY 
• CAST and DECIMAL 
• SET IDENTITY INSERT 
• TOP 
• SSCE 3.5 vs SQL Server Express 
http://www.microsoft.com/sql/editions/compact/sscecomparison.mspx
Microsoft {Sync Framework} 
• Integrate any application, with any data 
from any store using any protocol over any 
network! 
Ben oltre RDA e Merge Replication! 
• Framework basato su Provider 
• Sync Services for ADO.NET 
• Sync Services for File Systems 
• Sync Services for FeedSync 
• Sync Framework Core Runtime
{Sync Framework} 
Scenari di Utilizzo (1)
{Sync Framework} 
Scenari di Utilizzo (2)
{Sync Framework} 
Partecipanti
Metadata 
•Replica 
•Repository info da sincronizzare 
• Versions 
• Informazioni che indicano se un elemento è modificato 
• Composto da Tick Count e ReplicaID 
• Aggiornati in tempo reale (Inline Tracking) o no (Async Tracking) 
• Knowledge 
• Rappresentazione compatta dei dati modificati 
• Tombstones 
• Traccia degli elementi eliminati
Flusso di Sincronizzazione
Esempio di Sincronizzazione (1) 
Replica A crea un record 
Item 
Update 
Tick Count 
Update 
Replica ID 
Creation 
Tick Count 
Creation 
Replica ID 
I1 1 A 1 A 
Replica A Knowledge = A1
Esempio di Sincronizzazione (2) 
Replica A aggiorna / aggiunge record 
Item 
Update 
Tick Count 
Update 
Replica ID 
Creation 
Tick Count 
Replica A Knowledge = A5 
Creation 
Replica ID 
I2 3 A 2 A 
I3 4 A 4 A 
I1 5 A 1 A
Esempio di Sincronizzazione (3) 
Replica B ha altri record 
Item 
Update 
Tick Count 
Update 
Replica ID 
Creation 
Tick Count 
Replica A Knowledge = A5 
Replica B Knowledge = B4 
Creation 
Replica ID 
I104 2 B 1 B 
I105 4 B 3 B
Esempio di Sincronizzazione (4) 
Replica B dopo sync 
Item 
Update 
Tick Count 
Update 
Replica ID 
Creation 
Tick Count 
Replica B Knowledge = A5, B4 
Creation 
Replica ID 
I104 2 B 1 B 
I105 4 B 3 B 
I2 3 A 2 A 
I3 4 A 4 A 
I1 5 A 1 A
{Sync Framework} 
• Tecnologia da studiare bene! 
• Molti meccanismi diversi da RDA / Merge 
• No tracking a livello di colonna 
• No tracking dei singoli client nel server 
• Diversa riproduzione schema database 
• No range di identity ai client 
• … e tanto altro! 
• Q&A 
http://blogs.msdn.com/stevelasker/archive/2007/03/18/QAforOCS_2D00_SyncServicesForAdoNet.aspx 
• Considerazioni dal blog di Roberto Brunetti 
http://blogs.devleap.com/rob/archive/2008/02/15/ado-net-synchronization-services-considerazioni.aspx
Mobile Line of Business (LOB) 
{Solution Accelerator 2008} 
• Showcase per mobile supply chain 
• Sync Services for ADO.NET 
•WCF: Store and Forward Transport with Exchange Server 2007 
•Web Service retrieval of maps from MapPoint 
• Custom Controls 
• State and Notification Broker 
• ADO.NET Communication with SQL Server CE CAB deployment 
project 
• Use of LINQ 
• Adapt Application to Screen
Questions
© 2008 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.

Mobile e Smart Client

  • 1.
  • 2.
    About {Stefano Ottaviani} • Co-fondatore di DotNetMarche • Membro di UGIdotNET • Sviluppo desktop e mobile con .Net / c++ • Blog: blogs.ugidotnet.org/ste8 • Mail: steott@gmail.com
  • 3.
    Il mondo {Mobile}è in fermento
  • 4.
    …come quello degli{Smart Client}
  • 5.
  • 6.
  • 7.
    Device {Windows Mobile} • “Core”, base per tutti gli altri •Device industriali (palmari / POS, …) • Real Time • Rinominato in: Windows Embedded Compact • Ex Windows Mobile for Pocket PC • Palm “classico” • No telefonia • Touch Screen • Tastiera opzionale • Basato su CE 5 • Ex Windows Mobile for Pocket PC Phone Edition • Classic + funzioni Telefonia • Ex Windows Mobile for Smartphone • No Touch Screen • Tastiera fisica • Basato su CE 5
  • 8.
    {Dove eravamo} DaVS2005 a…ieri!
  • 9.
    {Dove eravamo} •Unico ambiente .Net / C++ • Dismesso Embedded VC++ • Integrati i tools per accesso remoto ai device • Compact Framework 2 • Anchor / Docking • Subclassing • UserControl • Controlli Windows Form (DateTimePicker, Notification, WebBrowser, Splitter...)
  • 10.
    • Accesso aiDati • Sql Server Compact Edition 3.1 • SqlCeResultSet • RDA / Merge Replication • Gestione Dispositivi • Telefono • Camera • GPS • Serial Port {Dove eravamo}
  • 11.
    • P.I.M. (PocketOutlook) • State and Notifications Broker • Com Interop • Threading (migliorie) • Global Exception Handler {Dove eravamo}
  • 12.
    • Tools perlogging / profiling • Emulatori • Versione 2 • Processori ARM • Cell Emulator (con Windows Mobile SDK 6) • Soluzioni ‘artigianali’ per testing • Test effettuati nel desktop • wMobinium.net (TDD + CI) {Dove eravamo}
  • 13.
    {Dove eravamo} •Mobile Client Software Factory • Orientation Aware Control Application Block • Compact Composite UI Application Block • Configuration Application • Connection Monitor • Disconnected Service Agent • Data Access Application Block • Data Subscription Application Block •….
  • 14.
    • Windows EmbeddedCE 6 {Dove eravamo} • Nato ieri… ma da utilizzare per il domani! • Rivoluzionato il kernel • Fino a 32.000 processi (contro i 32 precedenti) • 2GB memoria virtuale per processo (vs 32 MB) • 100% codice in Shared Source
  • 15.
    {Dove andremo} DaVS2008 al domani!
  • 16.
    Windows Mobile {6.1} • User Experience • Home Screen • Getting Started Center • Setup Bluetooth / WiFi / Mail • Threaded SMS • Task Manager • Copy & Paste support for non-touch devices
  • 17.
    • Internet ExplorerMobile • Zoom Support • Page Overview • Sicurezza / Amministazione {Windows Mobile 6.1} • System Center Mobile Device Manager • Device Encryption • http://www.microsoft.com/windowsmobile/business/strategy/newsecurityfeatures.mspx • Basato ancora su Windows CE 5
  • 18.
    System Center {MobileDevice Manager} • Integra i device alla rete aziendale: • OTA (Over-the-air) device management • Active Directory e Group Policy • Mobile VPN • Device Inventory and Reporting • OTA Software Deployment • Supporto da Windows Mobile 6.1
  • 19.
    VS2008 e .NET{CF 3.5} • Multitargeting (uso .NET CF 2 o 3.5) • Piattaforme supportate: stesse del CF 2 • Nuove classi nel .NET CF 3.5 • SoundPlayer • Compression • Stopwatch • String.Contains • Supporto ClearType sui controlli • Piccole migliorie nei Windows Forms
  • 20.
    {LINQ} per Mobile/ S.C. • Subset: solo Standard Query • Supporta in .NET CF: • LINQ to Objects • LINQ to XML • LINQ to DataSet • LINQ to SQL • Supportato solo da SSCE in desktop • No designer support: SqlMetal da console
  • 21.
    {Compact} WCF WindowsCommunication Foundation • Nasce dall’idea dell’E-Mail transport (Lunch Launcher) • Windows Mobile Mail Transport • Risponde alle esigenze: • Che indirizzo (IP) ha il device? • Come comunico se è offline? • Richiede Exchange Server 2007 (ExchangeWebServiceMailTransport) • one-way messaging • I.M Sample: http://msdn2.microsoft.com/en-us/magazine/cc164240.aspx
  • 22.
    {Compact WCF} •Subset di WCF • Può solo consumare servizi, no hosting • No Service Model • No Contracts • Si Channel Layer • Uso di Messaging API (Channel Factories,…) • Proxy generato con NetCFSvcUtil.exe da Power Toys for .NET CF 3.5
  • 23.
    • Transports {CompactWCF} • Si HTTP/s, E-Mail • No MSMQ, TCP, altri • Formatters • Si SOAP • No Binary • Bindings • Si BasicHttp, Mail, Custom • No WS-* http://blogs.msdn.com/andrewarnottms/archive/2007/08/21/the-wcf-subset-supported-by-netcf.aspx
  • 24.
    {Silverlight} for Mobile • Annuncio al Mix / CTP 2nd Quarter 2008 • Basato sulla versione 1 di Silverlight • Windows Mobile e altri (Nokia) • E Windows Presentation Foundation?
  • 25.
    Tools per {Debugging} • Unit Testing su device (emulatore / reali) (da Visual Studio Pro) • Remote Performance Monitor • CLR Profiler
  • 26.
    {Vari} • SmartDevice Connectivity API • Device Security Manager • Device Emulator v.3 • Script per task amministrativi • Configurazione via XML • Power Toys for .NET CF 3.5
  • 27.
    Sql Server {CompactEdition 3.5} • Default local database (facile deploy) • Nuove funzionalità • timestamp (rowversion) data type • Nested query • CROSS APPLY and OUTER APPLY • CAST and DECIMAL • SET IDENTITY INSERT • TOP • SSCE 3.5 vs SQL Server Express http://www.microsoft.com/sql/editions/compact/sscecomparison.mspx
  • 28.
    Microsoft {Sync Framework} • Integrate any application, with any data from any store using any protocol over any network! Ben oltre RDA e Merge Replication! • Framework basato su Provider • Sync Services for ADO.NET • Sync Services for File Systems • Sync Services for FeedSync • Sync Framework Core Runtime
  • 29.
    {Sync Framework} Scenaridi Utilizzo (1)
  • 30.
    {Sync Framework} Scenaridi Utilizzo (2)
  • 31.
  • 32.
    Metadata •Replica •Repositoryinfo da sincronizzare • Versions • Informazioni che indicano se un elemento è modificato • Composto da Tick Count e ReplicaID • Aggiornati in tempo reale (Inline Tracking) o no (Async Tracking) • Knowledge • Rappresentazione compatta dei dati modificati • Tombstones • Traccia degli elementi eliminati
  • 33.
  • 34.
    Esempio di Sincronizzazione(1) Replica A crea un record Item Update Tick Count Update Replica ID Creation Tick Count Creation Replica ID I1 1 A 1 A Replica A Knowledge = A1
  • 35.
    Esempio di Sincronizzazione(2) Replica A aggiorna / aggiunge record Item Update Tick Count Update Replica ID Creation Tick Count Replica A Knowledge = A5 Creation Replica ID I2 3 A 2 A I3 4 A 4 A I1 5 A 1 A
  • 36.
    Esempio di Sincronizzazione(3) Replica B ha altri record Item Update Tick Count Update Replica ID Creation Tick Count Replica A Knowledge = A5 Replica B Knowledge = B4 Creation Replica ID I104 2 B 1 B I105 4 B 3 B
  • 37.
    Esempio di Sincronizzazione(4) Replica B dopo sync Item Update Tick Count Update Replica ID Creation Tick Count Replica B Knowledge = A5, B4 Creation Replica ID I104 2 B 1 B I105 4 B 3 B I2 3 A 2 A I3 4 A 4 A I1 5 A 1 A
  • 38.
    {Sync Framework} •Tecnologia da studiare bene! • Molti meccanismi diversi da RDA / Merge • No tracking a livello di colonna • No tracking dei singoli client nel server • Diversa riproduzione schema database • No range di identity ai client • … e tanto altro! • Q&A http://blogs.msdn.com/stevelasker/archive/2007/03/18/QAforOCS_2D00_SyncServicesForAdoNet.aspx • Considerazioni dal blog di Roberto Brunetti http://blogs.devleap.com/rob/archive/2008/02/15/ado-net-synchronization-services-considerazioni.aspx
  • 39.
    Mobile Line ofBusiness (LOB) {Solution Accelerator 2008} • Showcase per mobile supply chain • Sync Services for ADO.NET •WCF: Store and Forward Transport with Exchange Server 2007 •Web Service retrieval of maps from MapPoint • Custom Controls • State and Notification Broker • ADO.NET Communication with SQL Server CE CAB deployment project • Use of LINQ • Adapt Application to Screen
  • 40.
  • 41.
    © 2008 MicrosoftCorporation. 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.