cross platform mobile development with xamarin
TRANSCRIPT
PowerPoint Presentation
Puja Pramudya@poedja_pTechnology Director @ Radya LabsNative iOS & Android Development with Xamarin
Lets talk Mobile App Development
So we know what we want how do we get there? Lets talk about the state of mobile development.4
Silo ApproachiOSWindowsAndroidObjective-CXcodeC#Visual StudioJavaAndroid StudioNo shared code Many languages & development environments Multiple teams
Multiple TeamsMultiple Code BasesExpensive & SlowPositive = Great apps delivered to users platformNegative = Development hampered by multiple code bases & fragmentation5
Write Once, Run Anywhere
App Generator
LuaJavascriptActionscriptHTML+CSS
Limited native API access Slow performance Poor user experience
Unhappy UsersUnhappy DevelopersIncrease in Abandoned AppsLimited to what is implemented
2014 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.2/18/20176
Xamarins Unique ApproachShared C# codebase 100% native API access High performance
iOS C# UI Windows C# UIAndroid C# UIShared C# Mobile
Build 2015 2015 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.2/18/2017 10:25 AM7
Xamarin + Xamarin.FormsTraditional Xamarin ApproachWith Xamarin.Forms:More code-sharing, all native iOS C# UI Windows C# UIAndroid C# UI
Shared C# Backend
Shared UI CodeShared C# Backend
Native PerformanceXamarin.iOS does full Ahead Of Time (AOT) compilation to produce an ARM binary for Apples App Store.Xamarin.Android takes advantage of Just In Time (JIT) compilation on the Android device.
Rule of thumb
Anything you can do in Objective-C, Swift, or Javacan be done in C# and Visual Studio with Xamarin.
Coming up next is bubbles 2014 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.2/18/201711
Xamarin is includedin Visual StudioXamarin is included in Visual StudioIncluding Community Edition!
Xamarin.com/DownloadVisual Studio Integration
Android Designer
Create UI with drag & drop simplicity
Target multiple screen sizes, resolutions and Android versions
Layouts saved in standard Android XML files
Android Hyper-V Emulators for PCMulti-Touch EnabledSuper FastRotate, screenshots, location changes, and more!http://bit.ly/hyperv-android
Xamarin Designer for iOS
Follows familiar Visual Studio designer idioms
Supports all UIKit elements
Edit custom and 3rd party components
Live preview of changes to properties
Visual Studio iOS Simulator RemotingMulti-Touch EnabledPressure SensitiveSuper FastRotate, screenshots, location changesNever leave VS
*available as a preview
Xamarin Studio Mac
Xamarin Studio on Mac offers: Android, iOS and Mac developmentWorld Class IDE with great features:Code AnalysisUpload to Test FlightGit & Subversion IntegrationCode CompletionCode NavigationEasy transition from Visual StudioThe same Solution & Projects open in BOTH Xamarin Studio and Visual Studio!18
Sharing Code
1 AssemblyMultiple Platforms
Including:Xamarin.iOS and Xamarin.AndroidPortable Class Libraries
NuGet
Shared Projects
Code SharingStatsMaciOSAndroidWindows PhoneCalcaiCircuitTouch Draw
PagesPage is an abstract class used to define a single screen of content. Derived types provide specific visualization/ behavior
Page that navigates between children using tab bar
Content
Master DetailNavigation
Tabbed
Carousel
Page allowing swipe gestures to switch between children
ViewsView is the base class for all visual controls, most standard controls are presentsLabelImageSearchBarEntryProgressBarActivityIndicatorButtonSliderOpenGLViewEditorStepperWebViewDatePickerSwitchListViewBoxViewTimePickerFramePicker
25
Rendering viewsPlatform defines a renderer for each view that creates a native representation of the UIButton button = new Button {Text = "Click Me!"};UI uses a Xamarin.Forms Button
Platform Renderer takes view andturns it into platform-specific control
Android.Widget.Button
UIButton
System.Windows.Button
26
Lets Build an App
MVVM Magic
PlatformSpecific CodeWhat if we didnt have to write this code?
What if we could access it from shared code?
UI+APIsUI + APIsUI + APIsBatteryGPSLightsNotificationsSettingsText To SpeechBatteryGPSLightsNotificationsSettingsText To SpeechBatteryGPSLightsNotificationsSettingsText To Speech
TextToSpeechSpeak(Hello World);
AVSpeechSynthesizerSpeechSynthesizer
Plugins for Xamarin Common API
github.com/xamarin/plugins
Xamarin Your Complete Mobile Solution
DevelopTestBuildDistributeMonitor
Xamarin is your complete mobile solution.
Xamarin Platform is usually what you hear about which is building native iOS, Android, Mac, and Windows Apps all in C#
However Xamarin offers a wide range of products for developers to go mobile including Test Cloud, Hockey App, and a way to learn all of mobile with University.32
Trust them, not me
Trust their apps
http://bit.ly/xamarindicoding Check learning material @ Dicoding
Puja Pramudya@poedja_pTechnology Director @ Radya LabsNative iOS & Android Development with Xamarin
PRESENTASI BANDUNG DEVELOPER DAY #6 WITH UNIKOM