Costruire applicazioni cross-platform con Xamarin e Visual Studio 2013 Emanuele Bartolesi Blog: http://www.emanuelebartolesi.com Twitter: @kasuken Luca Zulian Blog: http://queube.com Twitter: @luca_julian
#bem14
Chi Sono Founder of SmartCore Tech Build 2012 4/8/2017 Chi Sono Founder of SmartCore Tech DotNetToscana Staff Member & Speaker Speaker for various events Trainer SharePoint addicted from 2007 Enthusiast ASP.NET Developer NopCommerce Contributor MCPD Web applications, MCTS BING Applications, MCTS Silverlight, MCTS HTML5 & CSS3 Italian blog: www.emanuelebartolesi.com English blog: www.geekswithblogs.net/emanueleb/ Twitter enthusiast: @kasuken Email: emanueleb@outlook.com © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.
Chi Sono Developer e Architect in Dev4Side S.r.l. Build 2012 4/8/2017 Chi Sono Developer e Architect in Dev4Side S.r.l. Speaker for various events MCTS Web Applications Blog: queube.com Twitter: @luca_julian © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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 Perché sviluppare con Xamarin Build 2012 4/8/2017 Agenda Perché sviluppare con Xamarin Ambienti di Sviluppo (non solo VS) Condivisione del codice tra le diverse piattaforme Demo Resources © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.
Perchè sviluppare con Xamarin Build 2012 4/8/2017 Perchè sviluppare con Xamarin - write once, run everywhere - - Anything you can do in Objective-C, Swift or Java, you can do in C# - © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.
Approccio con sviluppo nativo
Comparazioni sulle piattaforme
Cosa serve? OS indipendent Eclipse, IntelliJ IDEA or Android Studio or… Java Android SDK SDK Tools Windows OS Visual Studio C# .NET Framework Windows Phone SDK Mac OS X XCode Objective-C Swift iOS SDK Apple Tools
Xamarin – approccio tradizionale
Xamarin.Forms Condivisione del codice per la UI Possibilità di estendere Xamarin.Forms Pensato per MVVM e data binding Creazione delle pagine in XAML Possibilità utilizzare un approccio misto Più di 40 controlli disponibili Android 4.0+, iOS6.1+, WP8
Obiettivi Massimizzare il codice condiviso tra le piattaforme Build 2012 4/8/2017 Obiettivi Massimizzare il codice condiviso tra le piattaforme Ottimizzare i tempi di sviluppo Diminuire i tempi di bug fixing Diminuire i tempi per il testing Diminuire il tempo per l’implementazione di nuove features Utilizzare un solo linguaggio (e magari un solo IDE e magari un solo OS) Create applicazioni sempre up to date (aggiornamento piattaforme, nuovi rilasci, nuove features ecc…) © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.
Xamarin – Win Status Windows APIs 100% coverage
Xamarin – Android Status Android APIs 100% coverage
Xamarin – iOS Status iOS APIs 100% coverage
Build 2012 4/8/2017 Risultato Native User Interfaces Native API Access Native Performance Il look and feel delle applicazioni Xamarin sembra nativo, perché è NATIVO © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.
Come funziona? iOS Android Build 2012 4/8/2017 Come funziona? iOS AOT (ahead-of-time) che traduce il bytecode prodotto nel codice macchina di destinazione Questo è il motivo per cui avete bisogno di un Mac OSX con XCode Android JIT (just-in-time) che compila e ottimizza il bytecode nel codice macchina di destinazione © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.
Cosa serve? Xamarin Studio Visual Studio con plugin Xamarin Account Apple Developer Account Google Play Developer Account Windows Phone Developer Mac OSX con Xcode
- Visual Studio ma non solo - Build 2012 4/8/2017 Ambienti di Sviluppo - Visual Studio ma non solo - © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.
Visual Studio 2013 Migliore integrazione con Xamarin.iOS Mac Build Hosts Full support per le PCL
Xamarin Studio Creare applicazioni per iOS, Android e Mac Code completition e source analysis Supporto completo per C# e F# Xamarin designer per iOS e Android NuGet
Condivisione del codice tra le diverse piattaforme Build 2012 4/8/2017 Condivisione del codice tra le diverse piattaforme © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.
Condivisione – File linking (old way) Includere i files comuni che possono essere utilizzati per la spefica piattaforma
Condivisione – Shared Project Utilizzare il progetto come risorsa condivisa per organizzare il codice sorgente, e utilizzare le direttive del compilatore quanto è necessaria la gestione di esigenze specifiche della piattaforma.
Condivisione – Shared Project Migliore del file linking Integrato con l’IDE Accesso alla parent reference Possibilità di includere codice specifico per piattaforma
Condivisione – PCL Creare una PCL (Portable Class Libraries) specificando le piattaforme che si desidera supportare e utilizzare interfacce per fornire funzionalità specifiche della piattaforma.
Condivisione – PCL Full support per Xamarin.iOS e Xamarin.Android Non è possibile includere references specifiche per piattaforma
Condivisione – PCL Potete utilizzare la Dependency Injection per passare delle feature della specifica piattaforma
Cosa Condivido? Entities Data Access Web Services Client Navigation View Models Business Logic
…e per il resto? Xamarin.Mobile Gestione Contatti Geolocation Media …e per il futuro Notifiche Accelerometro …
…oppure… Component Store NuGet
DEMO
Resources Codice della sessione Build 2012 4/8/2017 Resources Xamarin - https://xamarin.com/ Xamarin Developer - http://developer.xamarin.com/ Xamarin Blog - http://blog.xamarin.com/ Xamarin University - https://xamarin.com/university Xamarin on Channel 9 - http://channel9.msdn.com/search?term=xamarin#ch9Search Xamarin on slideshare - http://www.slideshare.net/Xamarin Xamarin on github - https://github.com/xamarin Codice della sessione https://github.com/lucazulian/betterembedded2014xamarin © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.
GET YOUR C# SHIRT TODAY!
Grazie