SlideShare ist ein Scribd-Unternehmen logo
1 von 22
ROME 27-28 march 2015
Xamarin Forms:
one technology to rule them all
Support Engineer – AppConsult @ Microsoft
matteo.pagani@microsoft.com
@qmatteoq
http://wp.qmatteoq.com
Matteo Pagani
ROME 27-28 march 2015
Agenda
• Sviluppo cross-platform e Xamarin
• Introduzione a Xamarin Forms
• Gestire le differenze
ROME 27-28 march 2015
Una applicazione, tante piattaforme
Nel mondo ideale, dovrebbe essere possibile
sviluppare un’applicazione una volta sola e
farla girare su tutte le piattaforme mobile
Nel mondo reale, purtroppo, non è così:
• Windows Phone: C# / VB.NET + XAML o JS +
HTML e Visual Studio
• iOS: Objective-C / Swift e Xcode
• Android: Java e Eclipse
ROME 27-28 march 2015
Una applicazione, tante piattaforme
Nel mondo ideale, dovrebbe essere possibile
sviluppare un’applicazione una volta sola e
farla girare su tutte le piattaforme mobile
Nel mondo reale, purtroppo, non è così:
• Windows Phone: C# / VB.NET + XAML o JS +
HTML e Visual Studio
• iOS: Objective-C / Swift e Xcode
• Android: Java e Eclipse
ROME 27-28 march 2015
ROME 27-28 march 2015
Native APIs
MapKit
UIViewController
HealthKit
Etc.
App Native Code
Mono Runtime .NET BCL
Xamarin e iOS
Compilazione
AOT (Ahead of
Time) produce un
pacchetto nativo
Stesse
performance di
un’app nativa
Accesso a tutte
le API di iOS
ROME 27-28 march 2015
Xamarin e Android
Mono VM
Native APIs
Google Play
Support Lib
Activity, Fragments
Etc.
APK
IL Code Resources
Dalvik/
ART VM
Bridge
Compilazione JIT
(Just in Time): il
codice C# viene
convertito in IL,
che viene poi
compilato in
nativo dal device
Accesso a tutte
le API di Android
ROME 27-28 march 2015
Gli ambienti di sviluppo
Xamarin Studio
• Incluso nella licenza
• Disponibile sia per Windows (supporto ad
Android) che per OS X (supporto ad Android
e iOS)
Visual Studio
• Plugin di integrazione
• E’ l’unico strumento che consente lo
sviluppo per iOS, Android e Windows
ROME 27-28 march 2015
Sviluppo per iOS
Mac Build Host, consente di sviluppare da
Visual Studio sfruttando un Mac collegato in
rete per la compilazione e il design
dell’interfaccia
Sviluppo per Android
Nessun requisito particolare
E’ possibile effettuare i test con uno qualsiasi
degli emulatori disponibili (Google,
Genymotion, Microsoft, ecc.)
ROME 27-28 march 2015
Lo sviluppo Xamarin tradizionale
Logica di business
condivisa tra le
piattaforme tramite
PCL
UI specializzata con
gli strumenti nativi
della piattaforma
ROME 27-28 march 2015
Lo sviluppo Xamarin Forms
Portable Class Library or Shared Project
C# Platform Specific C# Platform Specific C# Platform Specific
Shared C# Interface Code
(Xamarin.Forms)
Shared C# App Logic
(ViewModels, Models etc)
iOS 6.1+ Android 4.0+ WP8.0+ (Silverlight)
WinRT in preview
ROME 27-28 march 2015
Lo sviluppo Xamarin Forms
• E’ basato sullo XAML, il linguaggio di Microsoft
fondato sull’XML per la realizzazione di interfacce
grafiche
• I controlli XAML vengono tradotti in controlli nativi a
runtime
• Supporto alle principali caratteristiche di XAML:
binding, dependency property, behavior, trigger, ecc.
• Non è lo stesso XAML di Microsoft: molti punti di
contatto, ma alcuni controlli hanno nomi e proprietà
differenti.
ROME 27-28 march 2015
<DatePicker />
ROME 27-28 march 2015
Un progetto Xamarin Forms
Demo
ROME 27-28 march 2015
Gestire le differenze
• Xamarin Forms permette di condividere logica e
interfaccia grafica
• Quando si tratta di interagire con le funzionalità del
device, è necessario usare le API specifiche della
piattaforma
• Xamarin Forms mette a disposizione diversi
meccanismi per gestire le differenze:
• DependencyService
• Custom renderer
• La classe Device
ROME 27-28 march 2015
DependencyService
Portable Class
Library
INetworkService
NetworkService
NetworkService
NetworkService
[assembly: Dependency(typeof(NetworkService))]
ROME 27-28 march 2015
Portable Class
Library
CustomLabel
CustomLabelRenderer
CustomLabelRenderer
CustomLabelRenderer
[assembly: ExportRenderer(typeof(CustomLabel), typeof(CustomLabelRenderer))]
CustomRenderer
ROME 27-28 march 2015
La classe Device
<Label>
<Label.FontSize>
<OnPlatform x:TypeArguments="x:Double"
WinPhone="20"
iOS="25"
Android="30" />
</Label.FontSize>
</Label>
• Device.OpenUri()
• Device.StartTimer()
• Device.BeginInvokeOnMainThread()
ROME 27-28 march 2015
Gestire le differenze
Demo
ROME 27-28 march 2015
Che cos’è Xamarin
• Se si conosce C# e il framework .NET, consente di
non imparare un nuovo linguaggio per sviluppare
per altre piattaforme
• Permette di realizzare applicazioni con le stesse
performance e funzionalità di un’applicazione nativa
• Consente di avere una codebase comune tra le
piattaforme, rendendo più semplice l’aggiunta di
nuove feature e la risoluzione di bug
ROME 27-28 march 2015
Che cosa non è Xamarin
• Un modo per sviluppare applicazioni cross-platform
senza conoscere le caratteristiche delle singole
piattaforme
• Una tecnologia per diventare «one developer man»:
in caso di progetti complessi, un team di lavoro può
fare la differenza
• Una tecnologia adatta a qualsiasi sviluppatore:
• Costi di licenza
• Necessità di conoscere C# e Visual Studio
ROME 27-28 march 2015
Leave your feedback on Joind.in!
https://joind.in/event/view/3347
Join the Microsoft meet-up after the beer!
matteo.pagani@microsoft.com
@qmatteoq
http://wp.qmatteoq.com
Grazie!

Weitere ähnliche Inhalte

Was ist angesagt?

Writing apps for android with .net
Writing apps for android with .net Writing apps for android with .net
Writing apps for android with .net Leonardo Alario
 
Realizzare applicazioni cross-platform con Xamarin e il pattern MVVM
Realizzare applicazioni cross-platform con Xamarin e il pattern MVVMRealizzare applicazioni cross-platform con Xamarin e il pattern MVVM
Realizzare applicazioni cross-platform con Xamarin e il pattern MVVMCodemotion
 
Unofficial Xamarin Day DomusDotNet
Unofficial Xamarin Day DomusDotNetUnofficial Xamarin Day DomusDotNet
Unofficial Xamarin Day DomusDotNetGaetano Paternò
 
Generazione Dinamica di Codice in .NET
Generazione Dinamica di Codice in .NETGenerazione Dinamica di Codice in .NET
Generazione Dinamica di Codice in .NETStefano Ottaviani
 
Sviluppo Web Agile Con MonoRail
Sviluppo Web Agile Con MonoRailSviluppo Web Agile Con MonoRail
Sviluppo Web Agile Con MonoRailStefano Ottaviani
 
Introduzione Xamarin
Introduzione XamarinIntroduzione Xamarin
Introduzione XamarinAndrea Tosato
 
Introduction to C#
Introduction to C#Introduction to C#
Introduction to C#Guido Magrin
 
Introduction to iOS development with Xamarin
Introduction to iOS development with XamarinIntroduction to iOS development with Xamarin
Introduction to iOS development with XamarinRaffaele Fanizzi
 
Nativo vs Xamarin pro e contro
Nativo vs Xamarin pro e controNativo vs Xamarin pro e contro
Nativo vs Xamarin pro e controCarmelo Ruota
 
Utilizzare Windows Vista come Software Developer
Utilizzare Windows Vista come Software DeveloperUtilizzare Windows Vista come Software Developer
Utilizzare Windows Vista come Software DeveloperStefano Ottaviani
 
ASP.NET performance optimization
ASP.NET performance optimizationASP.NET performance optimization
ASP.NET performance optimizationAndrea Dottor
 
Silverlight 4 - Community Tour (RTM)
Silverlight 4 - Community Tour (RTM)Silverlight 4 - Community Tour (RTM)
Silverlight 4 - Community Tour (RTM)XeDotNet
 
Webcast - Introduzione a Visual Studio Online
Webcast - Introduzione a Visual Studio OnlineWebcast - Introduzione a Visual Studio Online
Webcast - Introduzione a Visual Studio OnlineDavide Benvegnù
 
ALM Revolutions - What's new in visual studio ALM 11
ALM Revolutions - What's new in visual studio ALM 11ALM Revolutions - What's new in visual studio ALM 11
ALM Revolutions - What's new in visual studio ALM 11DomusDotNet
 
.NET Core, ASP.NET Core e Linux per il Mobile
.NET Core, ASP.NET Core e Linux per il Mobile.NET Core, ASP.NET Core e Linux per il Mobile
.NET Core, ASP.NET Core e Linux per il MobilePietro Libro
 
Alessandro Forte - Realizzare controlli Ajax in ASP.Net
Alessandro Forte - Realizzare controlli Ajax in ASP.NetAlessandro Forte - Realizzare controlli Ajax in ASP.Net
Alessandro Forte - Realizzare controlli Ajax in ASP.NetAlessandro Forte
 

Was ist angesagt? (20)

Xamarin
XamarinXamarin
Xamarin
 
Writing apps for android with .net
Writing apps for android with .net Writing apps for android with .net
Writing apps for android with .net
 
Realizzare applicazioni cross-platform con Xamarin e il pattern MVVM
Realizzare applicazioni cross-platform con Xamarin e il pattern MVVMRealizzare applicazioni cross-platform con Xamarin e il pattern MVVM
Realizzare applicazioni cross-platform con Xamarin e il pattern MVVM
 
Xamarin Robotics
Xamarin RoboticsXamarin Robotics
Xamarin Robotics
 
Unofficial Xamarin Day DomusDotNet
Unofficial Xamarin Day DomusDotNetUnofficial Xamarin Day DomusDotNet
Unofficial Xamarin Day DomusDotNet
 
Generazione Dinamica di Codice in .NET
Generazione Dinamica di Codice in .NETGenerazione Dinamica di Codice in .NET
Generazione Dinamica di Codice in .NET
 
Sviluppo Web Agile Con MonoRail
Sviluppo Web Agile Con MonoRailSviluppo Web Agile Con MonoRail
Sviluppo Web Agile Con MonoRail
 
Spa with Blazor
Spa with BlazorSpa with Blazor
Spa with Blazor
 
Introduzione Xamarin
Introduzione XamarinIntroduzione Xamarin
Introduzione Xamarin
 
Introduction to C#
Introduction to C#Introduction to C#
Introduction to C#
 
Introduction to iOS development with Xamarin
Introduction to iOS development with XamarinIntroduction to iOS development with Xamarin
Introduction to iOS development with Xamarin
 
Nativo vs Xamarin pro e contro
Nativo vs Xamarin pro e controNativo vs Xamarin pro e contro
Nativo vs Xamarin pro e contro
 
Mobile development .net
Mobile development .netMobile development .net
Mobile development .net
 
Utilizzare Windows Vista come Software Developer
Utilizzare Windows Vista come Software DeveloperUtilizzare Windows Vista come Software Developer
Utilizzare Windows Vista come Software Developer
 
ASP.NET performance optimization
ASP.NET performance optimizationASP.NET performance optimization
ASP.NET performance optimization
 
Silverlight 4 - Community Tour (RTM)
Silverlight 4 - Community Tour (RTM)Silverlight 4 - Community Tour (RTM)
Silverlight 4 - Community Tour (RTM)
 
Webcast - Introduzione a Visual Studio Online
Webcast - Introduzione a Visual Studio OnlineWebcast - Introduzione a Visual Studio Online
Webcast - Introduzione a Visual Studio Online
 
ALM Revolutions - What's new in visual studio ALM 11
ALM Revolutions - What's new in visual studio ALM 11ALM Revolutions - What's new in visual studio ALM 11
ALM Revolutions - What's new in visual studio ALM 11
 
.NET Core, ASP.NET Core e Linux per il Mobile
.NET Core, ASP.NET Core e Linux per il Mobile.NET Core, ASP.NET Core e Linux per il Mobile
.NET Core, ASP.NET Core e Linux per il Mobile
 
Alessandro Forte - Realizzare controlli Ajax in ASP.Net
Alessandro Forte - Realizzare controlli Ajax in ASP.NetAlessandro Forte - Realizzare controlli Ajax in ASP.Net
Alessandro Forte - Realizzare controlli Ajax in ASP.Net
 

Ähnlich wie Xamarin Forms: one technology to rule them all - Matteo Pagani - Codemotion Rome 2015

ASP.NET 4.6 e ASP.NET 5...l'evoluzione del web
ASP.NET 4.6 e ASP.NET 5...l'evoluzione del webASP.NET 4.6 e ASP.NET 5...l'evoluzione del web
ASP.NET 4.6 e ASP.NET 5...l'evoluzione del webAndrea Dottor
 
Improve mobile development with Visual Studio 2017 for Mac & Visual Studio Te...
Improve mobile development with Visual Studio 2017 for Mac & Visual Studio Te...Improve mobile development with Visual Studio 2017 for Mac & Visual Studio Te...
Improve mobile development with Visual Studio 2017 for Mac & Visual Studio Te...Gaetano Paternò
 
Xamarin: Shared Library and Portable Class Library - Aristide Di Francesco - ...
Xamarin: Shared Library and Portable Class Library - Aristide Di Francesco - ...Xamarin: Shared Library and Portable Class Library - Aristide Di Francesco - ...
Xamarin: Shared Library and Portable Class Library - Aristide Di Francesco - ...Codemotion
 
Mobile services multi-piattaforma con Xamarin
Mobile services multi-piattaforma con XamarinMobile services multi-piattaforma con Xamarin
Mobile services multi-piattaforma con XamarinNicolò Carandini
 
Meego Italian Day 2011 - Francesco Baldassarri (1)
Meego Italian Day 2011 - Francesco Baldassarri (1)Meego Italian Day 2011 - Francesco Baldassarri (1)
Meego Italian Day 2011 - Francesco Baldassarri (1)Francesco Baldassarri
 
Lavorare con applicazioni Brownfield: il caso di 39x27.com
Lavorare con applicazioni Brownfield: il caso di 39x27.comLavorare con applicazioni Brownfield: il caso di 39x27.com
Lavorare con applicazioni Brownfield: il caso di 39x27.comSimone Chiaretta
 
Sviluppo di applicazioni web in ambito mobile
Sviluppo di applicazioni web in ambito mobileSviluppo di applicazioni web in ambito mobile
Sviluppo di applicazioni web in ambito mobileRoberto Cappelletti
 
Da Windows Phone a Windows 8: andata e ritorno
Da Windows Phone a Windows 8: andata e ritornoDa Windows Phone a Windows 8: andata e ritorno
Da Windows Phone a Windows 8: andata e ritornoMatteo Pagani
 
ASP.NET Core Services e Linux per il Mobile - Pietro Libro - Codemotion Rome...
ASP.NET Core Services e Linux per il Mobile  - Pietro Libro - Codemotion Rome...ASP.NET Core Services e Linux per il Mobile  - Pietro Libro - Codemotion Rome...
ASP.NET Core Services e Linux per il Mobile - Pietro Libro - Codemotion Rome...Codemotion
 
C# Mobile application architecture
C# Mobile application architectureC# Mobile application architecture
C# Mobile application architectureLeonardo Alario
 
Smau milano 2012 arena social media davide-senatore
Smau milano 2012   arena social media davide-senatoreSmau milano 2012   arena social media davide-senatore
Smau milano 2012 arena social media davide-senatoreSMAU
 
Real world Visual Studio Code
Real world Visual Studio CodeReal world Visual Studio Code
Real world Visual Studio CodeRoberto Messora
 
Smau Napoli 2016 - Michele Aponte, Microsoft
Smau Napoli 2016 - Michele Aponte, MicrosoftSmau Napoli 2016 - Michele Aponte, Microsoft
Smau Napoli 2016 - Michele Aponte, MicrosoftSMAU
 
Le basi per lo sviluppo su Windows Phone tool, SDK, il primo progetto
 Le basi per lo sviluppo su Windows Phone tool, SDK, il primo progetto Le basi per lo sviluppo su Windows Phone tool, SDK, il primo progetto
Le basi per lo sviluppo su Windows Phone tool, SDK, il primo progettoMicrosoft Mobile Developer
 
Introduzione alle app Windows Universal
Introduzione alle app Windows UniversalIntroduzione alle app Windows Universal
Introduzione alle app Windows UniversalAlessandro Scardova
 
Introduzione ai Coded UI Tests
Introduzione ai Coded UI TestsIntroduzione ai Coded UI Tests
Introduzione ai Coded UI TestsPietro Libro
 
Works with ASP.NET Core on Linux and Mac
Works with ASP.NET Core on Linux and MacWorks with ASP.NET Core on Linux and Mac
Works with ASP.NET Core on Linux and MacEmanuele Bartolesi
 

Ähnlich wie Xamarin Forms: one technology to rule them all - Matteo Pagani - Codemotion Rome 2015 (20)

XeDotNet - .Net MAUI
XeDotNet - .Net MAUIXeDotNet - .Net MAUI
XeDotNet - .Net MAUI
 
Introduzione a Xamarin
Introduzione a XamarinIntroduzione a Xamarin
Introduzione a Xamarin
 
ASP.NET 4.6 e ASP.NET 5...l'evoluzione del web
ASP.NET 4.6 e ASP.NET 5...l'evoluzione del webASP.NET 4.6 e ASP.NET 5...l'evoluzione del web
ASP.NET 4.6 e ASP.NET 5...l'evoluzione del web
 
Improve mobile development with Visual Studio 2017 for Mac & Visual Studio Te...
Improve mobile development with Visual Studio 2017 for Mac & Visual Studio Te...Improve mobile development with Visual Studio 2017 for Mac & Visual Studio Te...
Improve mobile development with Visual Studio 2017 for Mac & Visual Studio Te...
 
Xamarin: Shared Library and Portable Class Library - Aristide Di Francesco - ...
Xamarin: Shared Library and Portable Class Library - Aristide Di Francesco - ...Xamarin: Shared Library and Portable Class Library - Aristide Di Francesco - ...
Xamarin: Shared Library and Portable Class Library - Aristide Di Francesco - ...
 
Mobile services multi-piattaforma con Xamarin
Mobile services multi-piattaforma con XamarinMobile services multi-piattaforma con Xamarin
Mobile services multi-piattaforma con Xamarin
 
Meego Italian Day 2011 - Francesco Baldassarri (1)
Meego Italian Day 2011 - Francesco Baldassarri (1)Meego Italian Day 2011 - Francesco Baldassarri (1)
Meego Italian Day 2011 - Francesco Baldassarri (1)
 
Lavorare con applicazioni Brownfield: il caso di 39x27.com
Lavorare con applicazioni Brownfield: il caso di 39x27.comLavorare con applicazioni Brownfield: il caso di 39x27.com
Lavorare con applicazioni Brownfield: il caso di 39x27.com
 
Sviluppo di applicazioni web in ambito mobile
Sviluppo di applicazioni web in ambito mobileSviluppo di applicazioni web in ambito mobile
Sviluppo di applicazioni web in ambito mobile
 
Da Windows Phone a Windows 8: andata e ritorno
Da Windows Phone a Windows 8: andata e ritornoDa Windows Phone a Windows 8: andata e ritorno
Da Windows Phone a Windows 8: andata e ritorno
 
ASP.NET Core Services e Linux per il Mobile - Pietro Libro - Codemotion Rome...
ASP.NET Core Services e Linux per il Mobile  - Pietro Libro - Codemotion Rome...ASP.NET Core Services e Linux per il Mobile  - Pietro Libro - Codemotion Rome...
ASP.NET Core Services e Linux per il Mobile - Pietro Libro - Codemotion Rome...
 
C# Mobile application architecture
C# Mobile application architectureC# Mobile application architecture
C# Mobile application architecture
 
Smau milano 2012 arena social media davide-senatore
Smau milano 2012   arena social media davide-senatoreSmau milano 2012   arena social media davide-senatore
Smau milano 2012 arena social media davide-senatore
 
Real world Visual Studio Code
Real world Visual Studio CodeReal world Visual Studio Code
Real world Visual Studio Code
 
Smau Napoli 2016 - Michele Aponte, Microsoft
Smau Napoli 2016 - Michele Aponte, MicrosoftSmau Napoli 2016 - Michele Aponte, Microsoft
Smau Napoli 2016 - Michele Aponte, Microsoft
 
Le basi per lo sviluppo su Windows Phone tool, SDK, il primo progetto
 Le basi per lo sviluppo su Windows Phone tool, SDK, il primo progetto Le basi per lo sviluppo su Windows Phone tool, SDK, il primo progetto
Le basi per lo sviluppo su Windows Phone tool, SDK, il primo progetto
 
Introduzione alle app Windows Universal
Introduzione alle app Windows UniversalIntroduzione alle app Windows Universal
Introduzione alle app Windows Universal
 
Introduzione ai Coded UI Tests
Introduzione ai Coded UI TestsIntroduzione ai Coded UI Tests
Introduzione ai Coded UI Tests
 
Works with ASP.NET Core on Linux and Mac
Works with ASP.NET Core on Linux and MacWorks with ASP.NET Core on Linux and Mac
Works with ASP.NET Core on Linux and Mac
 
Ibm bluemix r pozzi
Ibm bluemix r pozziIbm bluemix r pozzi
Ibm bluemix r pozzi
 

Mehr von Codemotion

Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Codemotion
 
Pompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyPompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyCodemotion
 
Pastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaPastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaCodemotion
 
Pennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserPennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserCodemotion
 
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Codemotion
 
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Codemotion
 
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Codemotion
 
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 - Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 - Codemotion
 
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Codemotion
 
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Codemotion
 
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Codemotion
 
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Codemotion
 
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Codemotion
 
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Codemotion
 
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Codemotion
 
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...Codemotion
 
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Codemotion
 
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Codemotion
 
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Codemotion
 
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Codemotion
 

Mehr von Codemotion (20)

Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
 
Pompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyPompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending story
 
Pastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaPastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storia
 
Pennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserPennisi - Essere Richard Altwasser
Pennisi - Essere Richard Altwasser
 
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
 
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
 
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
 
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 - Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
 
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
 
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
 
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
 
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
 
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
 
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
 
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
 
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
 
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
 
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
 
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
 
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
 

Xamarin Forms: one technology to rule them all - Matteo Pagani - Codemotion Rome 2015

  • 1. ROME 27-28 march 2015 Xamarin Forms: one technology to rule them all Support Engineer – AppConsult @ Microsoft matteo.pagani@microsoft.com @qmatteoq http://wp.qmatteoq.com Matteo Pagani
  • 2. ROME 27-28 march 2015 Agenda • Sviluppo cross-platform e Xamarin • Introduzione a Xamarin Forms • Gestire le differenze
  • 3. ROME 27-28 march 2015 Una applicazione, tante piattaforme Nel mondo ideale, dovrebbe essere possibile sviluppare un’applicazione una volta sola e farla girare su tutte le piattaforme mobile Nel mondo reale, purtroppo, non è così: • Windows Phone: C# / VB.NET + XAML o JS + HTML e Visual Studio • iOS: Objective-C / Swift e Xcode • Android: Java e Eclipse
  • 4. ROME 27-28 march 2015 Una applicazione, tante piattaforme Nel mondo ideale, dovrebbe essere possibile sviluppare un’applicazione una volta sola e farla girare su tutte le piattaforme mobile Nel mondo reale, purtroppo, non è così: • Windows Phone: C# / VB.NET + XAML o JS + HTML e Visual Studio • iOS: Objective-C / Swift e Xcode • Android: Java e Eclipse
  • 6. ROME 27-28 march 2015 Native APIs MapKit UIViewController HealthKit Etc. App Native Code Mono Runtime .NET BCL Xamarin e iOS Compilazione AOT (Ahead of Time) produce un pacchetto nativo Stesse performance di un’app nativa Accesso a tutte le API di iOS
  • 7. ROME 27-28 march 2015 Xamarin e Android Mono VM Native APIs Google Play Support Lib Activity, Fragments Etc. APK IL Code Resources Dalvik/ ART VM Bridge Compilazione JIT (Just in Time): il codice C# viene convertito in IL, che viene poi compilato in nativo dal device Accesso a tutte le API di Android
  • 8. ROME 27-28 march 2015 Gli ambienti di sviluppo Xamarin Studio • Incluso nella licenza • Disponibile sia per Windows (supporto ad Android) che per OS X (supporto ad Android e iOS) Visual Studio • Plugin di integrazione • E’ l’unico strumento che consente lo sviluppo per iOS, Android e Windows
  • 9. ROME 27-28 march 2015 Sviluppo per iOS Mac Build Host, consente di sviluppare da Visual Studio sfruttando un Mac collegato in rete per la compilazione e il design dell’interfaccia Sviluppo per Android Nessun requisito particolare E’ possibile effettuare i test con uno qualsiasi degli emulatori disponibili (Google, Genymotion, Microsoft, ecc.)
  • 10. ROME 27-28 march 2015 Lo sviluppo Xamarin tradizionale Logica di business condivisa tra le piattaforme tramite PCL UI specializzata con gli strumenti nativi della piattaforma
  • 11. ROME 27-28 march 2015 Lo sviluppo Xamarin Forms Portable Class Library or Shared Project C# Platform Specific C# Platform Specific C# Platform Specific Shared C# Interface Code (Xamarin.Forms) Shared C# App Logic (ViewModels, Models etc) iOS 6.1+ Android 4.0+ WP8.0+ (Silverlight) WinRT in preview
  • 12. ROME 27-28 march 2015 Lo sviluppo Xamarin Forms • E’ basato sullo XAML, il linguaggio di Microsoft fondato sull’XML per la realizzazione di interfacce grafiche • I controlli XAML vengono tradotti in controlli nativi a runtime • Supporto alle principali caratteristiche di XAML: binding, dependency property, behavior, trigger, ecc. • Non è lo stesso XAML di Microsoft: molti punti di contatto, ma alcuni controlli hanno nomi e proprietà differenti.
  • 13. ROME 27-28 march 2015 <DatePicker />
  • 14. ROME 27-28 march 2015 Un progetto Xamarin Forms Demo
  • 15. ROME 27-28 march 2015 Gestire le differenze • Xamarin Forms permette di condividere logica e interfaccia grafica • Quando si tratta di interagire con le funzionalità del device, è necessario usare le API specifiche della piattaforma • Xamarin Forms mette a disposizione diversi meccanismi per gestire le differenze: • DependencyService • Custom renderer • La classe Device
  • 16. ROME 27-28 march 2015 DependencyService Portable Class Library INetworkService NetworkService NetworkService NetworkService [assembly: Dependency(typeof(NetworkService))]
  • 17. ROME 27-28 march 2015 Portable Class Library CustomLabel CustomLabelRenderer CustomLabelRenderer CustomLabelRenderer [assembly: ExportRenderer(typeof(CustomLabel), typeof(CustomLabelRenderer))] CustomRenderer
  • 18. ROME 27-28 march 2015 La classe Device <Label> <Label.FontSize> <OnPlatform x:TypeArguments="x:Double" WinPhone="20" iOS="25" Android="30" /> </Label.FontSize> </Label> • Device.OpenUri() • Device.StartTimer() • Device.BeginInvokeOnMainThread()
  • 19. ROME 27-28 march 2015 Gestire le differenze Demo
  • 20. ROME 27-28 march 2015 Che cos’è Xamarin • Se si conosce C# e il framework .NET, consente di non imparare un nuovo linguaggio per sviluppare per altre piattaforme • Permette di realizzare applicazioni con le stesse performance e funzionalità di un’applicazione nativa • Consente di avere una codebase comune tra le piattaforme, rendendo più semplice l’aggiunta di nuove feature e la risoluzione di bug
  • 21. ROME 27-28 march 2015 Che cosa non è Xamarin • Un modo per sviluppare applicazioni cross-platform senza conoscere le caratteristiche delle singole piattaforme • Una tecnologia per diventare «one developer man»: in caso di progetti complessi, un team di lavoro può fare la differenza • Una tecnologia adatta a qualsiasi sviluppatore: • Costi di licenza • Necessità di conoscere C# e Visual Studio
  • 22. ROME 27-28 march 2015 Leave your feedback on Joind.in! https://joind.in/event/view/3347 Join the Microsoft meet-up after the beer! matteo.pagani@microsoft.com @qmatteoq http://wp.qmatteoq.com Grazie!