Upload
redfabriq
View
303
Download
1
Embed Size (px)
DESCRIPTION
Session conjointe de Zaak Chalal (RedFabriQ) et de Erik Polzin (Xamarin) au Microsoft Techdays 2014 sur le thème du développement d'applications mobiles en natif.
Code/développement#mstechdays #xamarin
Depuis votre smartphone sur :http://notes.mstechdays.fr
De nombreux lots à gagner toute les heures !!!Claviers, souris et jeux Microsoft…
Merci de nous aider à améliorer les Techdays !
Donnez votre avis !
Code/Développement
Native Mobile App Development
for iOS, Android and Windows
in C# and Visual StudioErik POLZIN - Sr. Partner Manager
[email protected] - www.xamarin.com
Zaak CHALAL - CEORedFabriQ
[email protected] - www.redfabriq.com
Code/développement#mstechdays #xamarin
THE PLATFORM FOR THE MOBILE ENTERPRISE
In partnership with
Code/développement#mstechdays #xamarin
OVERVIEW
Mobile represents the single largest technology innovation of all time
Code/développement#mstechdays #xamarin
Smartphone adoption is happening
Faster than the PC boom of the 80s10X
Faster than the Internet boom of the 90s2X
Faster than the recent social networking explosion3X
Code/développement#mstechdays #xamarin
Enterprises are going mobile on multiple platforms
According to Gartner, by 2016, 70% of the mobile workforce will have a smartphone, and90% of enterprises will have two or more platforms to support
Code/développement#mstechdays #xamarin
Sweet spot for the successful mobile enterprise
End user experienc
e
Great apps delivered to
the user’s choice of device
Development agility to move at mobile speed
Better TCO, productivity and
Developer Experience
+
+
-
Code/développement#mstechdays #xamarin
NATIVE MOBILE APPS STRATEGY CHOICES
Code/développement#mstechdays #xamarin
iOS appObjective-CXCode
Android appJavaEclipse
Windows app
.NET/C# - HTML/JS - C++Visual Studio
The Siloed approach: Build native apps multiple times
Code/développement#mstechdays #xamarin
Objective C+ XIB
Java + XML C# + XAML
Native UI Native UI Native UI
Optional Remote Services(ASP.NET Web API
or any server technology)
Siloed approachBuild native apps multiple times means:
• Client development is completely different for each device type
• Only the Services (server-side) can be re-used, with certain differences when consuming them
• TCO grows exponentially
Code/développement#mstechdays #xamarin
The Siloed approach: Build native apps multiple timesMultiple teams and multiple code bases are expensive and slow
Great apps delivered to the user’s choice of device
Development agility hampered by multiple code bases and fragment toolsets
End user experienc
e
Better TCO, productivity and
Developer Experience
+
+
-
✗
Code/développement#mstechdays #xamarin
The write-once-run-anywhere approach
Black Box
Write-once-run- anywhere black
box
CSS | HTML | Lua | JavaScript | ActionScript
HTML Hybrid scenarios (Semi-native apps) like PhoneGap
Code/développement#mstechdays #xamarin
The write-once-run-anywhere approachHTML Hybrid scenarios (Semi-native apps) like PhoneGap
En
d u
ser
exp
eri
en
ce
Developer experience
Development agility hampered by HTML5 implementations fragmentation and insufficient tooling
Lowest common denominator apps with poor performance✗
Code/développement#mstechdays #xamarin
C# + XIB C# + XML C# + XAML
Native UI Native UI Native UI
Optional Remote Services(ASP.NET Web API
or any server technology)
Shared client app C# logic
C# unique approachpowered by Xamarin and Microsoft .NETFully native apps written entirely in C#
Xamarin exposes 100% of iOS and Android APIs in C#
Mobilize existing code, skills, and tools including Visual Studio
Share app logic code across device platforms
Code/développement#mstechdays #xamarin
ANYTHING YOU CAN DO IN OBJECTIVE-C OR JAVA CAN BE DONE IN C# WITH XAMARIN
Code/développement#mstechdays #xamarin
SHARING CODE ACROSSWINDOWS, IOS AND ANDROIDACCELERATES DEVELOPMENT
Code/développement#mstechdays #xamarin
C# and Xamarin’s unique approachThe best of all worlds
En
d u
ser
exp
eri
en
ceGreat apps delivered to the user’s choice of device
Development agility, with Visual Studio to move at mobile speedDeveloper Experience
Better TCO and productivity
Code/développement#mstechdays #xamarin
THE XAMARIN PLATFORM
Code/développement#mstechdays #xamarin
Recognized as mobile “Visionary” in 2013 Magic Quadrant for MADP
Winner of 2013 Visual Studio Integration Partner of the Year Awarded
Xamarin’s enterprise success500,000 registered developers in just 2 years
500K
Adding over 30,000 developers a month30K+
Customers in 185 countries185
Robust, enterprise-ready technology, in production use for 10 year
10 year
s
Code/développement#mstechdays #xamarin
C#
Azure
Code/développement#mstechdays #xamarin
Xamarin.iOS does full Ahead Of Time (AOT) compilation to produce an ARM binary suitable for Apple’s App Store
Xamarin.Android takes advantage of Just In Time (JIT) compilation on the Android device
Native compilation, native performance
Code/développement#mstechdays #xamarin
• A single solution for iOS, Android, and Windows development
• Leverage the entire Microsoft ecosystem:
• Team Foundation Server (TFS)
• ReSharper• Your favorite code
coverage and profiling tools
Visual Studio 2013 integration for iOS & Android
Code/développement#mstechdays #xamarin
UI design in Visual Studio• Create UI with drag and
drop simplicity
• Target multiple screen sizes, resolutions, and OS versions
• Layouts saved in native resource formats
• Worlds best Android designer available in Visual Studio
• iOS coming soon
Code/développement#mstechdays #xamarin
Xamarin Component Store
Build apps fasterAdd high quality pre-build app components directly from Visual Studio
Beautiful cross-platform UI controls, could services, and enterprise backend integrations are just a few clicks away
Code/développement#mstechdays #xamarin
Accelerate development with code sharing
Code sharing statistics from production Xamarin app:
iOS Android Windows RT Mac OS X
App logic User interface code
70%
30%
86%
14%
85%
15%
88%
12%
Code/développement#mstechdays #xamarin
“With Xamarin, developers combine all of the productivity benefits of C#,
Visual Studio 2013 and Windows Azure with the flexibility to quickly build for
multiple device targets.” S. Somasegar, Corporate Vice
President, Microsoft
Technical collaboration for superior developer
experience
Exclusive MSDN offers that accelerate the transition
to mobile development
Microsoft and Xamarin Partner Globally
Code/développement#mstechdays #xamarin
CASE STUDIES
Code/développement#mstechdays #xamarin
Sharing 50,000 lines of codeAbout Rdio
Rdio is the leading music streaming and sharing service started by the founders of Skype
Rdio is already in 30 countries with over 20 million songs
Available in 31 countries
“Rdio’s mobile app is also the best looking and best implemented of the three [music streaming apps reviewed].” Wired Magazine
Code/développement#mstechdays #xamarin
Sharing 50,000 lines of code
ChallengeUnable to deliver features on all platforms simultaneously because of multiple, platform-specific code bases
High costs to develop and maintain apps
ResultsUsing Xamarin, Rdio now shares over 50,000 lines of C# across iOS, Android, and Windows, enabling them to focus on feature-parity and user experience
Code/développement#mstechdays #xamarin
Matt CrockerDirector of Client Engineering
“Xamarin offers the best of all worlds. We deliver high performance, native apps that, until Xamarin, were only possible with Objective-C and Java. Sharing over 50,000 lines of code across platforms gives us more time to spend on great user experiences.”
Sharing 50,000 lines of code
Code/développement#mstechdays #xamarin
IMPLEMENTATION
Code/développement#mstechdays #xamarin
Which device to target ?
Really, do you have a choice?
Code/développement#mstechdays #xamarin
Architecture reminder
C# + XIB C# + XML C# + XAML
Native UI Native UI Native UI
Optional Remote Services
(ASP.NET Web API or any server technology)
Shared client app C# logic
Team
Foundatio
n S
erv
erSDK : Wrapper + Compiler
Code/développement#mstechdays #xamarin
Application life cycleVisual Studio and TFS
Target
UIDesig
n
Code &
Share
UnitTestin
g
Xamarin
Test cloud
iOSAndroidXAMARIN
Project architecture & methodologies
Code sharing Specific
iOS Android
With Architecture & methodologies
iOS Android
Without Architecture & methodologies
Deploy
Windows Store
iTunesGoogle Play, …
Code/développement#mstechdays #xamarin
Design UI Use xCode to design iOS UI
Use Visual Studio to design Android UI
Code/développement#mstechdays #xamarin
Project organization and code sharing
Code sharing Pragma File Links PCL Partial class Inheritance
Code/développement#mstechdays #xamarin
Understand the « Binding » : Simple sample with button control
Under IOS
Under Android
Code/développement#mstechdays #xamarin
CompilerNative compilationXamarin's compiler is smart - so smart that it can produces exactly the right output for each platform. Xamarin.iOS does full Ahead-of-Time (AOT) compilation to produce an ARM binary suitable for Apple's App Store, while Xamarin.Android takes advantage of Just In Time compilation right on the Android device. Your shared code never needs to know the difference!
démo
Code/développement#mstechdays #xamarin
FIELD SERVICE
https://github.com/xamarin/prebuilt-apps
Code/développement#mstechdays #xamarin
iOS and Android limitations• Two compiling way = two contexts DotNet runtime limitations under iOS
and Android
• Android, Apple limitations
• IOS, Example: Dynamic code generation is forbidden by Apple. So no VM.
• The "DLR" can not be used (cannot use Reflection.System.Emit, …)
• For more information about limitations please read :– Android :
http://docs.xamarin.com/guides/android/advanced_topics/limitations/offline.pdf – iOS : http://docs.xamarin.com/guides/ios/advanced_topics/limitations/offline.pdf
Code/développement#mstechdays #xamarin
Recommendations• Engineered for code sharing
– PCL to isolate your business logic– Partial class (example on your ViewModel)– Pragma (The preprocessors directives)– Controls / components– …
• Architecture and methodologies– Organize and normalize your solutions– Git with TFS– Framework IOC like OpenNetCF ioc / tinyioc– Framework MVVM like mvvmcross– Database : SQLite / NoSQL– TEST, TEST and TEST : Test units (Andr.Unit, Touch.Unit),
Xamarin Test Cloud, – …
• Develop your components and Framework• Components on XAMARIN STORE
Code/développement#mstechdays #xamarin
ENTERPRISE GRADE CAPABILITIES
Code/développement#mstechdays #xamarin
Go Mobile programLive online training from Xamarin experts
Lectures and labs
Two coaching sessions where you meet oneon one with expert Xamarin mobile developers
What you’ll learniOS and Android fundamentals
Mobile app lifecycle
Native UI and controls
Cross-platform architecture
Mobile best practices
Secure backend integration
Xamarin University
Code/développement#mstechdays #xamarin
Xamarin developer certificationsXamarin skills are increasingly in demandcertifications let the market know that you represent top Xamarin talent
Code/développement#mstechdays #xamarin
Xamarin global support
For small business and individualsEmail support
Xamarin-managed forums
Available to allThe Xamarin developer center
150+ guides and tutorials250+ sample appsRelease notes, videos, and much more
Evolve 2013 videos50 sessions covering enterprise mobility
and cross-platform best practices
Code/développement#mstechdays #xamarin
NEXT STEPS
Code/développement#mstechdays #xamarin
MSDN subscriber offersExtended trial Exclusive training
Experience state-of-the-art cross-platform mobiledevelopment with a fully-featured, 90-day trial of Xamarin for Visual Studio.Develop iOS and Android apps with C# in Visual Studio today
Learn the fundamentals of iOS, Android and cross-platform mobile development at your own pace with exclusive training contentVideos, documentation and samples from Xamarin available only to MSDN subscribers
Code/développement#mstechdays #xamarin
MSDN subscriber offersSpecial pricing for individuals and teams
© 2014 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.
Digital is business