Cross Platform Mobile Development with Xamarin
-
Upload
bryancostanich -
Category
Technology
-
view
1.999 -
download
2
Transcript of Cross Platform Mobile Development with Xamarin
![Page 1: Cross Platform Mobile Development with Xamarin](https://reader035.fdocuments.in/reader035/viewer/2022070313/554a2120b4c9058c5d8b5917/html5/thumbnails/1.jpg)
XamarinMobile Cross Platform Development
![Page 2: Cross Platform Mobile Development with Xamarin](https://reader035.fdocuments.in/reader035/viewer/2022070313/554a2120b4c9058c5d8b5917/html5/thumbnails/2.jpg)
bryan costanichem: [email protected]: @bryancostanichslides: slideshare.net/bryancostanich
![Page 3: Cross Platform Mobile Development with Xamarin](https://reader035.fdocuments.in/reader035/viewer/2022070313/554a2120b4c9058c5d8b5917/html5/thumbnails/3.jpg)
Sample Codegithub.com/xamarin/mobile-samples/TaskyProblog.xamarin.com
![Page 4: Cross Platform Mobile Development with Xamarin](https://reader035.fdocuments.in/reader035/viewer/2022070313/554a2120b4c9058c5d8b5917/html5/thumbnails/4.jpg)
Xamarin Platform(The Pitch)
![Page 5: Cross Platform Mobile Development with Xamarin](https://reader035.fdocuments.in/reader035/viewer/2022070313/554a2120b4c9058c5d8b5917/html5/thumbnails/5.jpg)
One Language + FrameworkLINQLambdasTask Parallel Library (TPL)Compile-Time ChecksGarbage Collection
C#º
![Page 6: Cross Platform Mobile Development with Xamarin](https://reader035.fdocuments.in/reader035/viewer/2022070313/554a2120b4c9058c5d8b5917/html5/thumbnails/6.jpg)
Native Perf. + UXCompiles Down to Native CodeNot InterpretedAll Native UX ControlsFull Platform SDK AccessiOS: Selectors/Obj-C RuntimeAndroid: JNIFast Enough for Games
º
![Page 7: Cross Platform Mobile Development with Xamarin](https://reader035.fdocuments.in/reader035/viewer/2022070313/554a2120b4c9058c5d8b5917/html5/thumbnails/7.jpg)
Reuse StoryC# LibrariesObj-C Bindings + Binding Projects.jar Bindings + Binding ProjectsC via pInvokeC++ via Cxxi
º
![Page 8: Cross Platform Mobile Development with Xamarin](https://reader035.fdocuments.in/reader035/viewer/2022070313/554a2120b4c9058c5d8b5917/html5/thumbnails/8.jpg)
Other PlatformsWindows - via .NETMac - via Xamarin.MacLinux - via MonoOuya, XBOX, PSP, etc.Etc.
![Page 9: Cross Platform Mobile Development with Xamarin](https://reader035.fdocuments.in/reader035/viewer/2022070313/554a2120b4c9058c5d8b5917/html5/thumbnails/9.jpg)
Community + SupportHuge C# CommunityStackOverflow.comforums.xamarin.comIRC + chat.xamarin.comGreat Support
º
![Page 10: Cross Platform Mobile Development with Xamarin](https://reader035.fdocuments.in/reader035/viewer/2022070313/554a2120b4c9058c5d8b5917/html5/thumbnails/10.jpg)
VS + Xamarin Studio
Visual StudioXamarin StudioAndroid DesigneriOS Designer (Beta)DebuggingAutoCompleteRefactoringProject ManagementIntegrated Source Control
![Page 11: Cross Platform Mobile Development with Xamarin](https://reader035.fdocuments.in/reader035/viewer/2022070313/554a2120b4c9058c5d8b5917/html5/thumbnails/11.jpg)
General XPlat Considerations
![Page 12: Cross Platform Mobile Development with Xamarin](https://reader035.fdocuments.in/reader035/viewer/2022070313/554a2120b4c9058c5d8b5917/html5/thumbnails/12.jpg)
Design Platform-Specific UX
UX in iOS != Android != Windows PhoneUX Metaphors are Different: Navigation Controller vs. Back ButtonWrite-Once, Run-Anywhere is ProblematicUsers Expect Native UX
º
![Page 13: Cross Platform Mobile Development with Xamarin](https://reader035.fdocuments.in/reader035/viewer/2022070313/554a2120b4c9058c5d8b5917/html5/thumbnails/13.jpg)
Choose Device TargetsiPhone != iPadBeware Android FragmentationForm Factor + Capability Differences Inform UXPro-Tip: Minimize Targets
º
![Page 14: Cross Platform Mobile Development with Xamarin](https://reader035.fdocuments.in/reader035/viewer/2022070313/554a2120b4c9058c5d8b5917/html5/thumbnails/14.jpg)
Building an X-Plat Architecture
![Page 15: Cross Platform Mobile Development with Xamarin](https://reader035.fdocuments.in/reader035/viewer/2022070313/554a2120b4c9058c5d8b5917/html5/thumbnails/15.jpg)
ArchitectureLayersSeparation of ResponsibilityEncapsulationCore Code Sharing
º
![Page 16: Cross Platform Mobile Development with Xamarin](https://reader035.fdocuments.in/reader035/viewer/2022070313/554a2120b4c9058c5d8b5917/html5/thumbnails/16.jpg)
VS Project/Solution Setup
![Page 17: Cross Platform Mobile Development with Xamarin](https://reader035.fdocuments.in/reader035/viewer/2022070313/554a2120b4c9058c5d8b5917/html5/thumbnails/17.jpg)
Code Sharing - Linking vs. PCLPortal Library Projects - Take a Lot of WorkGreat Discussion Here: http://forums.xamarin.com/discussion/28/challenges-thoughts-loves/p1Takeaway: PCL is clean, but difficult to implementLinking is less “clean” but simplerOur Recommendation Now: File Linking for Most ProjectsWalkthrough Here: Linkingº
![Page 18: Cross Platform Mobile Development with Xamarin](https://reader035.fdocuments.in/reader035/viewer/2022070313/554a2120b4c9058c5d8b5917/html5/thumbnails/18.jpg)
WP7 + AndroidNew Blank Solution: "[AppName]"New C# Lib Project: "[AppName].Core"Test Project: “[AppName].Core.Tests”New Mono for Android Project: “[AppName].Droid”New WP7 Project "[AppName].WP7"
º
![Page 19: Cross Platform Mobile Development with Xamarin](https://reader035.fdocuments.in/reader035/viewer/2022070313/554a2120b4c9058c5d8b5917/html5/thumbnails/19.jpg)
Shared Data + Data Access Layer
SQLite on iOS + Android, C# SQLIte on WP7: http://code.google.com/p/csharp-sqlite/SQLite.NET ORMUse Generics for CRUD Convenience Methods: TaskDatabase.cs
º
![Page 20: Cross Platform Mobile Development with Xamarin](https://reader035.fdocuments.in/reader035/viewer/2022070313/554a2120b4c9058c5d8b5917/html5/thumbnails/20.jpg)
Platform AbstractionsHandling Divergence and Taking Advantage of Platform Features
![Page 21: Cross Platform Mobile Development with Xamarin](https://reader035.fdocuments.in/reader035/viewer/2022070313/554a2120b4c9058c5d8b5917/html5/thumbnails/21.jpg)
Conditional CompilationPre-Defined Symbols: #if __MOBILE__ #if __ANDROID__ #if __IOS__ #if WINDOWS_PHONE #if SILVERLIGHTCan Add Additional in Build Settings
![Page 22: Cross Platform Mobile Development with Xamarin](https://reader035.fdocuments.in/reader035/viewer/2022070313/554a2120b4c9058c5d8b5917/html5/thumbnails/22.jpg)
Architectural AbstractionSometimes, You Wanna Provide Different Implementations for Different PlatformsInterfaces
º
![Page 23: Cross Platform Mobile Development with Xamarin](https://reader035.fdocuments.in/reader035/viewer/2022070313/554a2120b4c9058c5d8b5917/html5/thumbnails/23.jpg)
Component StoreTons of ComponentsCross-PlatformIDE-Integration - drop-in!Revenue Model for User Submitted
![Page 24: Cross Platform Mobile Development with Xamarin](https://reader035.fdocuments.in/reader035/viewer/2022070313/554a2120b4c9058c5d8b5917/html5/thumbnails/24.jpg)
Xamarin.* Libraries XPlat API AbstractionsOpen SourceGithub.com/Xamarin/Xamarin.*
Mobile Social Auth
![Page 25: Cross Platform Mobile Development with Xamarin](https://reader035.fdocuments.in/reader035/viewer/2022070313/554a2120b4c9058c5d8b5917/html5/thumbnails/25.jpg)
Other XPlat LibsMonoCross - http://code.google.com/p/monocross/MvvmCross - https://github.com/slodge/MvvmCrossVernacular - https://github.com/rdio/vernacularMonoGame - http://monogame.netCocos2D - http://cocos2DXNA.net
º
![Page 26: Cross Platform Mobile Development with Xamarin](https://reader035.fdocuments.in/reader035/viewer/2022070313/554a2120b4c9058c5d8b5917/html5/thumbnails/26.jpg)
Q+A