SlideShare a Scribd company logo
Pembuatan Aplikasi
Multiplatform dengan Xamarin
Forms
Erick Kurniawan
erick.@actual-training.com
Hybrid vs Native
Automatically test your app on
hundreds of mobile devices
Create native iOS, Android, Mac and
Windows apps in Visual Studio and
C#
Xamarin’s Unique Approach
Native With
Code Sharing
Business Layer
Windows APIs
iOS APIs | 100% Coverage
Android APIs | 100% Coverage
Anything you can do in Objective-C, Swift, or Java
can be done in C# with Xamarin using
Visual Studio or Xamarin Studio on a Mac
Xamarin Designer
for Android
Fully integrated into
Xamarin Studio & Visual
Studio
Multi-resolution editing
Easy switch between design
and Android XML
Shipping for over 2 years
Xamarin Designer for iOS
Portable Class Libraries
Xamarin + Xamarin.Forms
With Xamarin.Forms:
more code-sharing, native controls
Traditional Xamarin approach
Shared UI Code
What’s Included
 40+ Pages, Layouts, and Controls
 Build from code behind or XAML
 Two-way Data Binding
 Navigation
 Animation API
 Dependency Service
 Messaging Center
Shared UI Code
Pages
Content MasterDetail Navigation Tabbed Carousel
Layouts
Stack Absolute Relative Grid ContentView ScrollView Frame
Controls
ActivityIndicator BoxView Button DatePicker Editor
Entry Image Label ListView Map
OpenGLView Picker ProgressBar SearchBar Slider
Stepper TableView TimePicker WebView EntryCell
ImageCell SwitchCell TextCell ViewCell
Quick MVVM Overview
Model-View-ViewModel
ModelView ViewModel
How to display
information
What to display
Flow of interaction
Business Logic
Data objects
Events
Data
Data
Model-View-ViewModel
ModelView ViewModel
Xamarin.Forms
Data Binding
Events
Data
Data Binding
Data Binding
Data Binding
Data Binding
Navigation
 Root Page:
 NavigationPage – Gives each page an INavigation
 Standard Navigation
 Navigation.PushAsync(page: nextPage);
 Navigation.PopAsync();
 Modal Navigation
 Navigation.PushModalAsync(page: modalPage);
 Navigation.PopModalAsync();
Animations API
www.github.com/JamesMontemagno/FormsAnimations
Pembuatan Aplikasi Multiplatform dengan Xamarin Forms
Pembuatan Aplikasi Multiplatform dengan Xamarin Forms
Pembuatan Aplikasi Multiplatform dengan Xamarin Forms
www.github.com/JamesMontemagno/FormsAnimations
Messaging Center
 MessagingCenter.Subscribe<T>(object subscriber, string message, Action<T> callback);
 MessagingCenter.Send(T item, string message);
Messaging Center
 Master Page:
 Detail Page:
Resources
 Documentation
 http://developer.xamarin.com/guides/cross-platform/xamarin-forms/
 XAML Documentation
 http://developer.xamarin.com/guides/cross-platform/xamarin-
forms/xaml-for-xamarin-forms/
 Samples
 https://github.com/xamarin/xamarin-forms-samples

More Related Content

PPTX
Introduction to xamarin.forms
PPT
Developing Cross-platform Native Apps with Xamarin
PPTX
Introducing Xamarin 3
PPTX
Getting Started with iOS & Android Development Using Xamarin & Visual Studio
PPTX
Xamarin cross platform
PDF
State of Union: Xamarin & Cross-Platform .NET in 2016 and Beyond
PDF
Cross Platform Development with Xamarin
PDF
Mobile Cross-Platform App Development in C# with Xamarin
Introduction to xamarin.forms
Developing Cross-platform Native Apps with Xamarin
Introducing Xamarin 3
Getting Started with iOS & Android Development Using Xamarin & Visual Studio
Xamarin cross platform
State of Union: Xamarin & Cross-Platform .NET in 2016 and Beyond
Cross Platform Development with Xamarin
Mobile Cross-Platform App Development in C# with Xamarin

What's hot (20)

PPTX
Xamarin overview droidcon.tn
PPTX
Introduction to Xamarin
PDF
Native i os, android, and windows development in c# with xamarin 4
PPTX
Xamarin Platform
PPTX
Highlights from the Xamarin Evolve 2016 conference
PPTX
Xamarin and SAP Mobile Platform for Mobile Enterprise Success
KEY
Cross-platform Mobile Development
PDF
TechEd Europe 2014 DEV-B217 Go Mobile with C#, Xamarin, and Visual STudio
PDF
Developing and Designing Native Mobile Apps in Visual Studio
PPTX
Xamarin Overview by Houssem Dellai
PPTX
Flying High with Xamarin
PDF
Xamarin University Presents: Building Your First Intelligent App with Xamarin...
PPTX
Mobile Development Simplified with Xamarin
PPTX
Say hello to Xamarin 3
PDF
Xamarin 4 - the future of apps
PDF
Dotnetconf - Introduction to Xamarin and Xamarin.Forms
PDF
Enterprise Mobile Success with Oracle and Xamarin
PPTX
Getting Started with Xamarin App Development
PDF
Developing and Designing Native Mobile Apps in Xamarin Studio
PPTX
Enterprise-grade mobile barcode scanning with Scandit and Xamarin
Xamarin overview droidcon.tn
Introduction to Xamarin
Native i os, android, and windows development in c# with xamarin 4
Xamarin Platform
Highlights from the Xamarin Evolve 2016 conference
Xamarin and SAP Mobile Platform for Mobile Enterprise Success
Cross-platform Mobile Development
TechEd Europe 2014 DEV-B217 Go Mobile with C#, Xamarin, and Visual STudio
Developing and Designing Native Mobile Apps in Visual Studio
Xamarin Overview by Houssem Dellai
Flying High with Xamarin
Xamarin University Presents: Building Your First Intelligent App with Xamarin...
Mobile Development Simplified with Xamarin
Say hello to Xamarin 3
Xamarin 4 - the future of apps
Dotnetconf - Introduction to Xamarin and Xamarin.Forms
Enterprise Mobile Success with Oracle and Xamarin
Getting Started with Xamarin App Development
Developing and Designing Native Mobile Apps in Xamarin Studio
Enterprise-grade mobile barcode scanning with Scandit and Xamarin
Ad

Similar to Pembuatan Aplikasi Multiplatform dengan Xamarin Forms (20)

PPTX
Xamarin.Forms - Building Cross Platform Mobile Apps
PPTX
Cross Platform Mobile Dev with C# and Xamarin 3 (RADNUG 8/19/14)
PDF
Xamarin.forms vs. xamarin native how to choose the one you need
PPTX
Introduction to Xamarin - Confoo 2015
PPTX
Os primeiros passos com Xamarin.Forms - TheDevConf
PPTX
Cross platform app dev with xamarin forms
PPTX
Introduction to xamarin
PPTX
Xamarin.Forms: a cross-platform mobile UI toolkit - ConFoo 2016
PDF
Intro to Xamarin
PDF
Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xam...
PPTX
PPTX
xamarin ppt m (1).pptx GENARAL SEMINAR TOPIC PPT
PDF
Xamarin.Forms - Your Complete Mobile Solution
PPTX
Xamarin.Forms (Northern VA Mobile C# Developers Group 8/13/14)
PDF
Introduction to Xamarin Philly Code Camp 2014
PDF
How Xamarin Is Revolutionizing Mobile Development
PDF
Couchbase Workshop - Introduction to Xamarin
PPTX
Techcamp xamarin 2014
PPTX
[MobConf] Go mobile with C#, Visual Studio & Xamarin
Xamarin.Forms - Building Cross Platform Mobile Apps
Cross Platform Mobile Dev with C# and Xamarin 3 (RADNUG 8/19/14)
Xamarin.forms vs. xamarin native how to choose the one you need
Introduction to Xamarin - Confoo 2015
Os primeiros passos com Xamarin.Forms - TheDevConf
Cross platform app dev with xamarin forms
Introduction to xamarin
Xamarin.Forms: a cross-platform mobile UI toolkit - ConFoo 2016
Intro to Xamarin
Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xam...
xamarin ppt m (1).pptx GENARAL SEMINAR TOPIC PPT
Xamarin.Forms - Your Complete Mobile Solution
Xamarin.Forms (Northern VA Mobile C# Developers Group 8/13/14)
Introduction to Xamarin Philly Code Camp 2014
How Xamarin Is Revolutionizing Mobile Development
Couchbase Workshop - Introduction to Xamarin
Techcamp xamarin 2014
[MobConf] Go mobile with C#, Visual Studio & Xamarin
Ad

More from Yoza Aprilio (20)

PPTX
IoT Platform with MQTT and Websocket
PPTX
Build Virtual Customer Service using IBM Watson
PPTX
Image Recognition service using IBM Watson made easy
PPTX
IoT Industry in Indonesia
DOCX
Game Tizen Unity
DOCX
Membuat Hello World Pada Tizen
PPTX
Introduction to Depedency Injection in Android
PDF
Memulai Pengembangan Game dengan Mudah
PPTX
Fast-track tips for Web Developer
PPTX
Firebase Cloud Functions
PPTX
Beginner's Guide to React & Redux Development
PPTX
Internet of Things 101
PPTX
IoT and Machine Learning
PPTX
Tantangan Produk IoT di Indonesia
PDF
Design, Launch and Fundraising
PDF
Product Development in Startup Environment : Build The Right Thing and Build ...
PPTX
Agile Development over Distributed Teams
PDF
Resep Memanfaatkan Hidden Resources
PPTX
Seni Membangun Startup
PPTX
Menjadi Tuan Rumah di Negeri Sendiri
IoT Platform with MQTT and Websocket
Build Virtual Customer Service using IBM Watson
Image Recognition service using IBM Watson made easy
IoT Industry in Indonesia
Game Tizen Unity
Membuat Hello World Pada Tizen
Introduction to Depedency Injection in Android
Memulai Pengembangan Game dengan Mudah
Fast-track tips for Web Developer
Firebase Cloud Functions
Beginner's Guide to React & Redux Development
Internet of Things 101
IoT and Machine Learning
Tantangan Produk IoT di Indonesia
Design, Launch and Fundraising
Product Development in Startup Environment : Build The Right Thing and Build ...
Agile Development over Distributed Teams
Resep Memanfaatkan Hidden Resources
Seni Membangun Startup
Menjadi Tuan Rumah di Negeri Sendiri

Recently uploaded (20)

PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
01-Introduction-to-Information-Management.pdf
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
PPTX
PPH.pptx obstetrics and gynecology in nursing
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PDF
Basic Mud Logging Guide for educational purpose
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
Classroom Observation Tools for Teachers
O5-L3 Freight Transport Ops (International) V1.pdf
STATICS OF THE RIGID BODIES Hibbelers.pdf
01-Introduction-to-Information-Management.pdf
Anesthesia in Laparoscopic Surgery in India
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
O7-L3 Supply Chain Operations - ICLT Program
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
2.FourierTransform-ShortQuestionswithAnswers.pdf
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Microbial disease of the cardiovascular and lymphatic systems
Final Presentation General Medicine 03-08-2024.pptx
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Module 4: Burden of Disease Tutorial Slides S2 2025
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
PPH.pptx obstetrics and gynecology in nursing
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
Basic Mud Logging Guide for educational purpose
VCE English Exam - Section C Student Revision Booklet
Classroom Observation Tools for Teachers

Pembuatan Aplikasi Multiplatform dengan Xamarin Forms

Editor's Notes

  • #7: Talk about what Xamarin offers (iOS, Android, Mac using Visual Studio and C#) If you are new to Xamarin you should know that Xamarin offers a few products. First is the Xamarin Platform. This is what we will be talking about to today and is where we will be creating native iOS, Android, and Windows apps all in C#. Second, is a new product called Xamarin Test Cloud. Test Cloud is a unique UI automated testing platform where you are able to create UI tests that run on hundred of physical iOS and Android devices in Xamarin’s test cloud. What is wonderful is that the Test Cloud is open to any iOS or Android mobile app regardless of what programming language or platform it was developed in.
  • #8: Xamarin’s unique approach enables developers to develop native iOS, Android, and Windows app while creating a shared C# backend (business logic). You are able to leverage all of your favorite C# features such as async/await, lambas, LINQ, events, delegates, and of course the great .NET Libraries. We are going to take a look at Xamarin.Forms today, which enables you to share more code, but let’s take a look at what Xamarin development looks like.
  • #9: If you have ever developed for a Windows Platform before these .NET namespaces might look familiar. However, if we go to a new platform such as Windows Phone or Store we have a new SDK to use and a new set of namespaces.
  • #10: You can think of iOS and Android development the same with Xamarin. You can see we have all of our .NET namespaces and libraries, but Xamarin give us 100% api coverage of each iOS API in it’s SDK that we access view C#.
  • #11: The same is true for Android as well.
  • #12: We’re going to show you both today
  • #13: If you didn’t know Xamarin has shipped an Android designer for over 2 years In both Visual Studio and Xamarin Studio Features multi-layout view editing to make it easy to design for phone, small tablet, and large tablets
  • #14: Short video of designer in action. You are able to use Xamarin Studio or Visual Studio for all of your development.
  • #15: Xamarin Forms is a new set of APIs allowing you to quickly and easily write shared User Interface code that is still rendered natively on each platform, while still providing direct access to the underlying SDKs if you need it.
  • #16: We see here the Xamarin approach we talked about earlier This enables you to be highly productive, share code, but build out UI on each platform and access platform APIs With Xamarin.Forms you now have a nice Shared UI Code layer, but still access to platform APIs You can start from native, pick a few screens, or start with forms, and replace with native later
  • #17: Dependency Service > give a good quick example
  • #18: First you have a set of pages for each screen of your application There are things like Content, and MasterDetail which gives you a nice flyout With a tabbed view you get the correct look on each platform iOS on bottom, Android on top, and on WP you have a Pivot control
  • #19: A lot of options from simple to complex
  • #20: You have more than 40 controls, layouts, and pages to mix and match from. These are all of the controls you have out of the box, you can of course create your own. What is unique is you get the native control and have access to it. Consider an Entry Field On iOS it is mapped to UITextField Android it is EditText Windows Phoneit is a TextBox
  • #21: Let’s take a look at getting started with Xamarin.Forms and displaying some data across all platforms.
  • #22: Xamarin.Forms was build with MVVM in mind. It is optional, but if you are used to an MVVM style of programming you are going to feel right at home. MVVM is an architectural pattern that is used to abstract our Views/Pages from our Business Logic Let’s look how it works. Our View just knows how to display Information It can pass data and event back and forth to the ViewModel The ViewModel simply tells the View what to display and can accept events. The model sits off to the side and only our ViewModel interact with it to gather data (maybe from the database or REST services)
  • #23: The “Magic” of MVVM is with a Data Binding framework. This allows us to change data in the ViewModel and our View automatically reacts. This is build into WPF/Windows Phone/Windows Store, but does not exist for Android or iOS. However, Xamarin.Forms has a full data binding framework built right in. Let’s take a look. ----- Meeting Notes (1/22/15 10:11) ----- Important to note here is that if you have a WPF application that is written in MVVM then you can bring in the ViewModel and Model directly into Xamarin.Forms for reuse. Powerful stuff. Should demo this.
  • #24: The core of data binding comes with “INotifyPropertyChanged” This allows any UI element to subscribe and “Bind” to a property and react when the “PropertyChanged” method is raised.
  • #25: When we update a field such as FirstName we trigger a property changed and anyone subscribed gets notified.
  • #26: Here we are creating a label and the “TextProperty” is being bound to the “FirstName” property in the ViewModel.
  • #27: We can also setup 2 way data binding so if our view update so does our ViewModel and vise versa.
  • #28: The extensibility framework in Xamarin.Forms enables us to 1.) Customize any of the built in controls 2.) Use any custom control that we might have developed
  • #30: First step for using the the Dependency service is to setup an Interface that is accessible from your shared code.
  • #31: For each platform we plan to support (iOS, Android, and Windows Phone), we will implement the native functionality. For instance here, we are using AVSpeechSynthesizer on iOS to perform TextToSpeech
  • #32: The built in dependency service uses an assembly attribute to know what class to use for the interface implementation.
  • #33: The dependency service allows you to easily resolve your interface for the platform specific implementation. Here we are playing back “Hello from Xamarin Forms” when we click a button.
  • #36: Xamarin.Forms has a complete cross platform animations api as well. It takes advantage of the underlying APIs on each platform such as CoreAnimation on iOS. Additionally, it is completely asynchronous with an async/await api.
  • #37: Here we can see we have our event for the button click. We first disable the button and set the box to Green. We save out the location and set a new location to drop to the bottom of the page and bounce.
  • #38: We await for that to finish and start to fade out the box, change the color to yellow. Then we scale the box up, wait for that to finish and scale it back down.
  • #39: After that is completed we move it back to the original position linearly. After that completes we set the box back to red and enable our button again. Let’s see what it looks like one more time.