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.
2. 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 !
3. Code/Développement
Native Mobile App Development
for iOS, Android and Windows
in C# and Visual Studio
Erik POLZIN - Sr. Partner Manager
XAMARIN
Erik.polzin@xamarin.com - www.xamarin.com
Zaak CHALAL - CEO
RedFabriQ
Zaak.chalal@redfabriq.com - www.redfabriq.com
12. Code/développement#mstechdays #xamarin
Objective C
+ XIB
Java + XML C# + XAML
Native UI Native UI Native UI
Optional Remote Services
(ASP.NETWeb API
or any servertechnology)
Siloed approach
Build 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
16. Code/développement#mstechdays #xamarin
C# + XIB C# + XML C# + XAML
Native UI Native UI Native UI
Optional Remote Services
(ASP.NETWeb API
or any servertechnology)
C# unique approach
powered by Xamarin and Microsoft .NET
Fully 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
24. 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
25. 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
26. Code/développement#mstechdays #xamarin
Xamarin Component Store
Build apps faster
Add 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
28. 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
30. Code/développement#mstechdays #xamarin
Sharing 50,000 lines of code
About 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
31. Code/développement#mstechdays #xamarin
Sharing 50,000 lines of code
Challenge
Unable to deliver features on all platforms
simultaneously because of multiple,
platform-specific code bases
High costs to develop and maintain apps
Results
Using 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
36. Code/développement#mstechdays #xamarin
Application life cycle
Visual Studio and TFS
Target
UI
Design
Code &
Share
Unit
Testing
Xamarin
Test
cloud
iOSAndroidXAMARIN
Project architecture & methodologies
Deploy
Windows Store
iTunesGoogle Play, …
40. Code/développement#mstechdays #xamarin
Compiler
Native compilation
Xamarin'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!
42. 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
43. 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
45. Code/développement#mstechdays #xamarin
Go Mobile program
Live online training from Xamarin experts
Lectures and labs
Two coaching sessions where you meet one
on one with expert Xamarin mobile developers
What you’ll learn
iOS and Android fundamentals
Mobile app lifecycle
Native UI and controls
Cross-platform architecture
Mobile best practices
Secure backend integration
Xamarin University
47. Code/développement#mstechdays #xamarin
Xamarin global support
For small business and individuals
Email support
Xamarin-managed forums
Available to all
The Xamarin developer center
150+ guides and tutorials
250+ sample apps
Release notes, videos, and much more
Evolve 2013 videos
50 sessions covering enterprise mobility
and cross-platform best practices
The write-once-run-anywhere approach means approaches like PhoneGap and similar
C# + XAML
C# + XML
C# + XIB
Highlight that thru PCL (Portable Class Libraries) you can also re-used binary-compiled .DLLs between the three platforms rather than just C# code.