SlideShare a Scribd company logo
1 of 20
Xamarin
ALPER EBİÇOĞLU / VOLOSOFT / 2018
Introduction
 Build C# apps on Android, iOS, Windows, and Mac with Xamarin
 Xamarin is unique in this space by offering a single language – C#, class
library, and runtime that works across all three mobile platforms of iOS,
Android, and Windows Phone (Windows Phone’s native language is already
C#), while still compiling native (non-interpreted) applications that are
performant enough even for demanding games.
https://store.xamarin.com/
Hello, Mac
 Xamarin.Mac allows for the development of fully native Mac apps in C# and
.NET using the same OS X libraries and interface controls that are used when
developing in Objective-C and Xcode. Because Xamarin.Mac integrates
directly with Xcode, the developer can use Xcode's Interface Builder to create
an app's User Interfaces (or optionally create them directly in C# code).
 Additionally, since Xamarin.Mac application are written in C# and .NET,
common, backend code can be shared with Xamarin.iOS and Xamarin.Android
mobile apps; all while delivering a native experience on each platform.
How Xamarin Works?
 On iOS, Xamarin’s Ahead-of-Time (AOT) Compiler compiles Xamarin.iOS
applications directly to native ARM assembly code. On Android, Xamarin’s
compiler compiles down to Intermediate Language ( IL), which is then Just-in-
Time (JIT) compiled to native assembly when the application launches.
 They’re both built on top of Mono, an open-source version of the .NET
Framework based on the published .NET ECMA standards
 When Xamarin applications are compiled, the result is an Application Package,
either an .app file in iOS, or .apk file in Android. These files are indistinguishable
from application packages built with the platform's default IDEs and are
deployable in the exact same way.
Native Performance
Platforms
 The Xamarin platform includes Xamarin.Forms, Xamarin.iOS, and Xamarin.Android.
Xamarin.Forms is an all encompassing mechanism for using C# and XAML to write
mobile apps for many platforms, while Xamarin.iOS and Xamarin.Android allow
you to use C# with finer platform touches.
 The Xamarin.Forms allows users to write code in one shared project that will map
to multiple platforms when you compile the application. The actual application
design is centered on the notion of pages which represent individual screens
within the deployed application. Pages use XAML to define the UI (though it can be
done in C# code behind if preferred), and allow for a MVVM approach to
application development where all of the UI is defined in XAML (your view) and
everything data related (which is your view model) in code (C#).
 Reasons to use: familiar C# and Xaml languages, develop for 3 platforms at once (iOS,
Android, and Windows Phone), use Visual Studio or Xamarin Studio as your IDE, develop
UI’s quickly without worrying about platform differences
Xamarin.iOS and Xamarin.Android
 The main distinction here is that these allow a higher level of customization.
In a sense they’re almost a step in between Xamarin.Forms and native
development. You still get to use C#, but your project construction starts to
look much closer to the native platforms where items like ViewControllers,
Activities, Storyboards, and the native API’s become much more visible, and
are something the developer is directly interacting with.
 Reasons to use: familiar C# language, create applications with a more
specific look and feel for that platform, develop using Visual Studio or
Xamarin Studio, use Xamarin’s visual designer, you want to invest time more
specifically for one platform.
Pure Native Platforms
(iOS and Android)
 The pure native platforms require that you use the language and tools specific to
each platform, but tend to have the best look and feel.
 The native platforms potentially offer the best experience, but often require the
most specific skills. Xamarin goes to great length to ensure that you only need to
know C# and some XAML for markup, but iOS and Android both utilize separate
languages, use their own IDE’s, and require that your project is specifically
targeting their market. There is a large upside to native development though: it
generally has the highest ceiling for performance, it will generally have the most
correct look and feel (though the Xamarin platforms are extremely close), and
allows you to directly use the tools that are made available from the platform
vendor. Some developers may also prefer using XCode, Android Studio, or Eclipse
for development which is something only native development can offer.
 Reasons to use: highest ceiling for performance, potentially best look and feel,
use tools, samples, and documentation directly from Apple or Google, no .NET
background, you're most interested in one platform and you want to know
everything about it.
Sharing Code Options
.NET Standard Libraries *Allows you to share code across multiple
projects.*Refactoring operations always update all affected references.*A larger
surface area of the .NET Base Class Library (BCL) is available than PCL profiles.
*Cannot use compiler directives
Portable Class Libraries (DLL) *Allows you to share code
across multiple projects. *Refactoring operations always
update all affected references. *Cannot use compiler
directives. *Only a subset of the .NET framework is
available to use, determined by the profile selected.
Shared Projects (Part of each platform) *Allows you to share code across multiple projects.
*Shared code can be branched based on the platform using compiler directives (eg.
using #if __ANDROID__ ). *Application projects can include platform-specific
references that the shared code can utilize *Unlike most other project types, a
Shared Project has no 'output' assembly. During compilation, the files are treated as
part of the referencing project and compiled into that assembly. If you wish to share
your code as a assembly then Portable Class Libraries or .NET Standard are a better
solution. *Refactorings that affect code inside 'inactive' compiler directives will not
update the code.
Project Starting Points
 IOS
 AppDelegate.cs > FinishedLaunching() > LoadApplication(new App());
 Android
 MainActivity.cs > OnCreate() > LoadApplication(new App());
 You can set any activity as startup activity.
 Shared
 App.xaml.cs > OnStart()
 Navigate to any xaml page with MainPage = new NavigationPage(page);
[Activity(Theme = "@style/MyTheme.Splash",
MainLauncher = true,
NoHistory = true)]
public class SplashActivity : AppCompatActivity
{
…
}
Symbols
 Allows your shared code files to run platform-specific code or access
platform-specific classes, including classes in the individual platform projects.
You can also define your own conditional compilation symbols if you’d like
Application Lifecycle
 The most important is the OnSleep() call. An application goes into
sleep mode when it no longer commands the screen and has become
inactive. Or pressing Home button. Or using application switcher.
 From this sleep mode, an application can be resumed or terminated.
 After the OnSleep(), there is no further notification that an application
is being terminated. The OnSleep() is as close as you get to a
termination notification.
 For example, if your application is running and the user turns off the
phone, the application gets an OnSleep() call as the phone is shutting
down.
 A program that crashes does not get an OnSleep() first but you probably
expect that.
 When you are debugging a Xamarin.Forms application,and use Visual
Studio or Xamarin Studio to stop debugging, the program is terminated
without a preceding OnSleep call.
 Bringing the program back to the foreground and trigger an
OnResume().
 Swiping the application’s image upward on iOS devices or by tapping
the X on the upper-right corner of the application’s image on Android
the program stops executing with no further notification.
 When your program gets an OnResume call, the operating system has
already automatically restored the program contents and state.
XAML Structure
Markup Extensions
 Allows properties to be set to objects or values that are referenced
indirectly from other sources
Data Binding
 Allows properties of two objects to be linked so that a change in one causes
a change in the other
MVVM
 The XAML user interface, called the View; the underlying data, called the Model;
and an intermediary between the View and the Model, called the ViewModel.
 ViewModels generally implement the INotifyPropertyChanged interface, which
means that the class fires a PropertyChanged event whenever one of its
properties changes. The data binding mechanism in Xamarin.Forms attaches a
handler to this PropertyChanged event so it can be notified when a property
changes and keep the target updated with the new value.
Binding Modes
OneWay Indicates that the binding should only propagate changes
from source (usually the View Model) to target (the
BindableObject). This is the default. It only displays the
value on target.
OneWayToSource Indicates that the binding should only propagate changes
from target (the BindableObject) to source (usually the View
Model). This is mainly used for read-only BindableProperty
values.
TwoWay Indicates that the binding should propagates changes
from source to target in both directions.
Command
Behaviors
 Behaviors lets you add functionality to user interface controls without having
to subclass them. Behaviors are written in code and added to controls in XAML
or code.
 Adding an email validator to an Entry.
 Creating a rating control using a tap gesture recognizer.
 Controlling an animation.
 Adding an effect to a control.

More Related Content

What's hot

Vb6.0 Introduction
Vb6.0 IntroductionVb6.0 Introduction
Vb6.0 IntroductionTennyson
 
Visual basic ppt for tutorials computer
Visual basic ppt for tutorials computerVisual basic ppt for tutorials computer
Visual basic ppt for tutorials computersimran153
 
MSDN Unleashed: WPF Demystified
MSDN Unleashed: WPF DemystifiedMSDN Unleashed: WPF Demystified
MSDN Unleashed: WPF DemystifiedDave Bost
 
Visual basic
Visual basicVisual basic
Visual basicDharmik
 
Windows Presentation Foundation & XAML
Windows Presentation Foundation & XAMLWindows Presentation Foundation & XAML
Windows Presentation Foundation & XAMLAlex Sooraj
 
Visual programming lecture
Visual programming lecture Visual programming lecture
Visual programming lecture AqsaHayat3
 
AIR Mobile Application Development: Package, Building, Design & Skinning
AIR Mobile Application Development: Package, Building, Design & SkinningAIR Mobile Application Development: Package, Building, Design & Skinning
AIR Mobile Application Development: Package, Building, Design & SkinningRenaun Erickson
 
introduction to_mfc
 introduction to_mfc introduction to_mfc
introduction to_mfctuttukuttu
 
Apress.migrating.to.windows.phone.dec.2011
Apress.migrating.to.windows.phone.dec.2011Apress.migrating.to.windows.phone.dec.2011
Apress.migrating.to.windows.phone.dec.2011gautamkumar048
 
Windows Presentation Foundation
Windows Presentation FoundationWindows Presentation Foundation
Windows Presentation FoundationTran Ngoc Son
 
Introduction to visual basic
Introduction to visual basicIntroduction to visual basic
Introduction to visual basicManav Khandelwal
 
Supplement J Eclipse
Supplement J EclipseSupplement J Eclipse
Supplement J Eclipsenga
 

What's hot (20)

Vb6.0 Introduction
Vb6.0 IntroductionVb6.0 Introduction
Vb6.0 Introduction
 
Visual basic ppt for tutorials computer
Visual basic ppt for tutorials computerVisual basic ppt for tutorials computer
Visual basic ppt for tutorials computer
 
MSDN Unleashed: WPF Demystified
MSDN Unleashed: WPF DemystifiedMSDN Unleashed: WPF Demystified
MSDN Unleashed: WPF Demystified
 
Visusual basic
Visusual basicVisusual basic
Visusual basic
 
Meaning Of VB
Meaning Of VBMeaning Of VB
Meaning Of VB
 
Visual basic
Visual basicVisual basic
Visual basic
 
Windows Presentation Foundation & XAML
Windows Presentation Foundation & XAMLWindows Presentation Foundation & XAML
Windows Presentation Foundation & XAML
 
Chapter03 Ppt
Chapter03 PptChapter03 Ppt
Chapter03 Ppt
 
Vb tutorial
Vb tutorialVb tutorial
Vb tutorial
 
Visual programming lecture
Visual programming lecture Visual programming lecture
Visual programming lecture
 
AIR Mobile Application Development: Package, Building, Design & Skinning
AIR Mobile Application Development: Package, Building, Design & SkinningAIR Mobile Application Development: Package, Building, Design & Skinning
AIR Mobile Application Development: Package, Building, Design & Skinning
 
introduction to_mfc
 introduction to_mfc introduction to_mfc
introduction to_mfc
 
Apress.migrating.to.windows.phone.dec.2011
Apress.migrating.to.windows.phone.dec.2011Apress.migrating.to.windows.phone.dec.2011
Apress.migrating.to.windows.phone.dec.2011
 
Windows Presentation Foundation
Windows Presentation FoundationWindows Presentation Foundation
Windows Presentation Foundation
 
VB.Net GUI Unit_01
VB.Net GUI Unit_01VB.Net GUI Unit_01
VB.Net GUI Unit_01
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
 
Vbasic
VbasicVbasic
Vbasic
 
Visual programming
Visual programmingVisual programming
Visual programming
 
Introduction to visual basic
Introduction to visual basicIntroduction to visual basic
Introduction to visual basic
 
Supplement J Eclipse
Supplement J EclipseSupplement J Eclipse
Supplement J Eclipse
 

Similar to Xamarin Development

Xamarin Open House talk - Sela Group - Ofir Makmal
Xamarin Open House talk - Sela Group - Ofir MakmalXamarin Open House talk - Sela Group - Ofir Makmal
Xamarin Open House talk - Sela Group - Ofir MakmalOfir Makmal
 
Intro to Building Mobile Apps with Xamarin
Intro to Building Mobile Apps with XamarinIntro to Building Mobile Apps with Xamarin
Intro to Building Mobile Apps with XamarinHeather Downing
 
Designing mobile applications with xamarin
Designing mobile applications with xamarinDesigning mobile applications with xamarin
Designing mobile applications with xamarinJerel Hass
 
Why Xamarin is the Best to Build Cost-Effective Mobile Apps
Why Xamarin is the Best to Build Cost-Effective Mobile AppsWhy Xamarin is the Best to Build Cost-Effective Mobile Apps
Why Xamarin is the Best to Build Cost-Effective Mobile AppsRosalie Lauren
 
Benefits of xamarin
Benefits of xamarinBenefits of xamarin
Benefits of xamarinMindfire LLC
 
Cross-Platform Mobile Development using Visual Studio and Xamarin
Cross-Platform Mobile Development using Visual Studio and XamarinCross-Platform Mobile Development using Visual Studio and Xamarin
Cross-Platform Mobile Development using Visual Studio and XamarinShravan Kumar Kasagoni
 
Top reasons why to choose xamarin for mobile app development
Top reasons why to choose xamarin for mobile app developmentTop reasons why to choose xamarin for mobile app development
Top reasons why to choose xamarin for mobile app developmentFugenX
 
Why does .net maui deserve your attention if you’re planning to use xamarin
Why does .net maui deserve your attention if you’re planning to use xamarin  Why does .net maui deserve your attention if you’re planning to use xamarin
Why does .net maui deserve your attention if you’re planning to use xamarin Moon Technolabs Pvt. Ltd.
 
Dia 1 intro to mobile and xamarin
Dia 1   intro to mobile and xamarinDia 1   intro to mobile and xamarin
Dia 1 intro to mobile and xamarinHernan Zaldivar
 
How To Hire A Team To Develop WebRTC Based Applications_.pdf
How To Hire A Team To Develop WebRTC Based Applications_.pdfHow To Hire A Team To Develop WebRTC Based Applications_.pdf
How To Hire A Team To Develop WebRTC Based Applications_.pdfMoon Technolabs Pvt. Ltd.
 
Xamarin.forms vs. xamarin native how to choose the one you need
Xamarin.forms vs. xamarin native  how to choose the one you need Xamarin.forms vs. xamarin native  how to choose the one you need
Xamarin.forms vs. xamarin native how to choose the one you need MoonTechnolabsPvtLtd
 
How Xamarin Is Revolutionizing Mobile Development
How Xamarin Is Revolutionizing Mobile DevelopmentHow Xamarin Is Revolutionizing Mobile Development
How Xamarin Is Revolutionizing Mobile DevelopmentMentorMate
 
Apps development for mobile devices
Apps development for mobile devicesApps development for mobile devices
Apps development for mobile devicesrdresler
 
Xamarin.Forms (Northern VA Mobile C# Developers Group 8/13/14)
Xamarin.Forms (Northern VA Mobile C# Developers Group 8/13/14)Xamarin.Forms (Northern VA Mobile C# Developers Group 8/13/14)
Xamarin.Forms (Northern VA Mobile C# Developers Group 8/13/14)Ed Snider
 
Xamarin Mobile App Development Features & Benefits.pdf
Xamarin Mobile App Development Features & Benefits.pdfXamarin Mobile App Development Features & Benefits.pdf
Xamarin Mobile App Development Features & Benefits.pdfFuGenx Technologies
 
Why is xamarin the preferred app development platform among app developers
Why is xamarin the preferred app development platform among app developersWhy is xamarin the preferred app development platform among app developers
Why is xamarin the preferred app development platform among app developersFullestop
 

Similar to Xamarin Development (20)

Xamarin Open House talk - Sela Group - Ofir Makmal
Xamarin Open House talk - Sela Group - Ofir MakmalXamarin Open House talk - Sela Group - Ofir Makmal
Xamarin Open House talk - Sela Group - Ofir Makmal
 
Intro to Building Mobile Apps with Xamarin
Intro to Building Mobile Apps with XamarinIntro to Building Mobile Apps with Xamarin
Intro to Building Mobile Apps with Xamarin
 
Designing mobile applications with xamarin
Designing mobile applications with xamarinDesigning mobile applications with xamarin
Designing mobile applications with xamarin
 
Xamarin the good, the bad and the ugly
Xamarin  the good, the bad and the uglyXamarin  the good, the bad and the ugly
Xamarin the good, the bad and the ugly
 
Top 8 Alternatives Of Xamarin.pdf
Top 8 Alternatives Of Xamarin.pdfTop 8 Alternatives Of Xamarin.pdf
Top 8 Alternatives Of Xamarin.pdf
 
Why Xamarin is the Best to Build Cost-Effective Mobile Apps
Why Xamarin is the Best to Build Cost-Effective Mobile AppsWhy Xamarin is the Best to Build Cost-Effective Mobile Apps
Why Xamarin is the Best to Build Cost-Effective Mobile Apps
 
Benefits of xamarin
Benefits of xamarinBenefits of xamarin
Benefits of xamarin
 
Cross-Platform Mobile Development using Visual Studio and Xamarin
Cross-Platform Mobile Development using Visual Studio and XamarinCross-Platform Mobile Development using Visual Studio and Xamarin
Cross-Platform Mobile Development using Visual Studio and Xamarin
 
Top reasons why to choose xamarin for mobile app development
Top reasons why to choose xamarin for mobile app developmentTop reasons why to choose xamarin for mobile app development
Top reasons why to choose xamarin for mobile app development
 
Why does .net maui deserve your attention if you’re planning to use xamarin
Why does .net maui deserve your attention if you’re planning to use xamarin  Why does .net maui deserve your attention if you’re planning to use xamarin
Why does .net maui deserve your attention if you’re planning to use xamarin
 
CS732-SE750-Part2-Lecture05-Xamarin.pptx
CS732-SE750-Part2-Lecture05-Xamarin.pptxCS732-SE750-Part2-Lecture05-Xamarin.pptx
CS732-SE750-Part2-Lecture05-Xamarin.pptx
 
Dia 1 intro to mobile and xamarin
Dia 1   intro to mobile and xamarinDia 1   intro to mobile and xamarin
Dia 1 intro to mobile and xamarin
 
How To Hire A Team To Develop WebRTC Based Applications_.pdf
How To Hire A Team To Develop WebRTC Based Applications_.pdfHow To Hire A Team To Develop WebRTC Based Applications_.pdf
How To Hire A Team To Develop WebRTC Based Applications_.pdf
 
Xamarin.docx
Xamarin.docxXamarin.docx
Xamarin.docx
 
Xamarin.forms vs. xamarin native how to choose the one you need
Xamarin.forms vs. xamarin native  how to choose the one you need Xamarin.forms vs. xamarin native  how to choose the one you need
Xamarin.forms vs. xamarin native how to choose the one you need
 
How Xamarin Is Revolutionizing Mobile Development
How Xamarin Is Revolutionizing Mobile DevelopmentHow Xamarin Is Revolutionizing Mobile Development
How Xamarin Is Revolutionizing Mobile Development
 
Apps development for mobile devices
Apps development for mobile devicesApps development for mobile devices
Apps development for mobile devices
 
Xamarin.Forms (Northern VA Mobile C# Developers Group 8/13/14)
Xamarin.Forms (Northern VA Mobile C# Developers Group 8/13/14)Xamarin.Forms (Northern VA Mobile C# Developers Group 8/13/14)
Xamarin.Forms (Northern VA Mobile C# Developers Group 8/13/14)
 
Xamarin Mobile App Development Features & Benefits.pdf
Xamarin Mobile App Development Features & Benefits.pdfXamarin Mobile App Development Features & Benefits.pdf
Xamarin Mobile App Development Features & Benefits.pdf
 
Why is xamarin the preferred app development platform among app developers
Why is xamarin the preferred app development platform among app developersWhy is xamarin the preferred app development platform among app developers
Why is xamarin the preferred app development platform among app developers
 

Recently uploaded

SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 

Recently uploaded (20)

SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 

Xamarin Development

  • 1. Xamarin ALPER EBİÇOĞLU / VOLOSOFT / 2018
  • 2. Introduction  Build C# apps on Android, iOS, Windows, and Mac with Xamarin  Xamarin is unique in this space by offering a single language – C#, class library, and runtime that works across all three mobile platforms of iOS, Android, and Windows Phone (Windows Phone’s native language is already C#), while still compiling native (non-interpreted) applications that are performant enough even for demanding games. https://store.xamarin.com/
  • 3.
  • 4. Hello, Mac  Xamarin.Mac allows for the development of fully native Mac apps in C# and .NET using the same OS X libraries and interface controls that are used when developing in Objective-C and Xcode. Because Xamarin.Mac integrates directly with Xcode, the developer can use Xcode's Interface Builder to create an app's User Interfaces (or optionally create them directly in C# code).  Additionally, since Xamarin.Mac application are written in C# and .NET, common, backend code can be shared with Xamarin.iOS and Xamarin.Android mobile apps; all while delivering a native experience on each platform.
  • 5. How Xamarin Works?  On iOS, Xamarin’s Ahead-of-Time (AOT) Compiler compiles Xamarin.iOS applications directly to native ARM assembly code. On Android, Xamarin’s compiler compiles down to Intermediate Language ( IL), which is then Just-in- Time (JIT) compiled to native assembly when the application launches.  They’re both built on top of Mono, an open-source version of the .NET Framework based on the published .NET ECMA standards  When Xamarin applications are compiled, the result is an Application Package, either an .app file in iOS, or .apk file in Android. These files are indistinguishable from application packages built with the platform's default IDEs and are deployable in the exact same way.
  • 7. Platforms  The Xamarin platform includes Xamarin.Forms, Xamarin.iOS, and Xamarin.Android. Xamarin.Forms is an all encompassing mechanism for using C# and XAML to write mobile apps for many platforms, while Xamarin.iOS and Xamarin.Android allow you to use C# with finer platform touches.  The Xamarin.Forms allows users to write code in one shared project that will map to multiple platforms when you compile the application. The actual application design is centered on the notion of pages which represent individual screens within the deployed application. Pages use XAML to define the UI (though it can be done in C# code behind if preferred), and allow for a MVVM approach to application development where all of the UI is defined in XAML (your view) and everything data related (which is your view model) in code (C#).  Reasons to use: familiar C# and Xaml languages, develop for 3 platforms at once (iOS, Android, and Windows Phone), use Visual Studio or Xamarin Studio as your IDE, develop UI’s quickly without worrying about platform differences
  • 8. Xamarin.iOS and Xamarin.Android  The main distinction here is that these allow a higher level of customization. In a sense they’re almost a step in between Xamarin.Forms and native development. You still get to use C#, but your project construction starts to look much closer to the native platforms where items like ViewControllers, Activities, Storyboards, and the native API’s become much more visible, and are something the developer is directly interacting with.  Reasons to use: familiar C# language, create applications with a more specific look and feel for that platform, develop using Visual Studio or Xamarin Studio, use Xamarin’s visual designer, you want to invest time more specifically for one platform.
  • 9. Pure Native Platforms (iOS and Android)  The pure native platforms require that you use the language and tools specific to each platform, but tend to have the best look and feel.  The native platforms potentially offer the best experience, but often require the most specific skills. Xamarin goes to great length to ensure that you only need to know C# and some XAML for markup, but iOS and Android both utilize separate languages, use their own IDE’s, and require that your project is specifically targeting their market. There is a large upside to native development though: it generally has the highest ceiling for performance, it will generally have the most correct look and feel (though the Xamarin platforms are extremely close), and allows you to directly use the tools that are made available from the platform vendor. Some developers may also prefer using XCode, Android Studio, or Eclipse for development which is something only native development can offer.  Reasons to use: highest ceiling for performance, potentially best look and feel, use tools, samples, and documentation directly from Apple or Google, no .NET background, you're most interested in one platform and you want to know everything about it.
  • 10. Sharing Code Options .NET Standard Libraries *Allows you to share code across multiple projects.*Refactoring operations always update all affected references.*A larger surface area of the .NET Base Class Library (BCL) is available than PCL profiles. *Cannot use compiler directives Portable Class Libraries (DLL) *Allows you to share code across multiple projects. *Refactoring operations always update all affected references. *Cannot use compiler directives. *Only a subset of the .NET framework is available to use, determined by the profile selected. Shared Projects (Part of each platform) *Allows you to share code across multiple projects. *Shared code can be branched based on the platform using compiler directives (eg. using #if __ANDROID__ ). *Application projects can include platform-specific references that the shared code can utilize *Unlike most other project types, a Shared Project has no 'output' assembly. During compilation, the files are treated as part of the referencing project and compiled into that assembly. If you wish to share your code as a assembly then Portable Class Libraries or .NET Standard are a better solution. *Refactorings that affect code inside 'inactive' compiler directives will not update the code.
  • 11. Project Starting Points  IOS  AppDelegate.cs > FinishedLaunching() > LoadApplication(new App());  Android  MainActivity.cs > OnCreate() > LoadApplication(new App());  You can set any activity as startup activity.  Shared  App.xaml.cs > OnStart()  Navigate to any xaml page with MainPage = new NavigationPage(page); [Activity(Theme = "@style/MyTheme.Splash", MainLauncher = true, NoHistory = true)] public class SplashActivity : AppCompatActivity { … }
  • 12. Symbols  Allows your shared code files to run platform-specific code or access platform-specific classes, including classes in the individual platform projects. You can also define your own conditional compilation symbols if you’d like
  • 13. Application Lifecycle  The most important is the OnSleep() call. An application goes into sleep mode when it no longer commands the screen and has become inactive. Or pressing Home button. Or using application switcher.  From this sleep mode, an application can be resumed or terminated.  After the OnSleep(), there is no further notification that an application is being terminated. The OnSleep() is as close as you get to a termination notification.  For example, if your application is running and the user turns off the phone, the application gets an OnSleep() call as the phone is shutting down.  A program that crashes does not get an OnSleep() first but you probably expect that.  When you are debugging a Xamarin.Forms application,and use Visual Studio or Xamarin Studio to stop debugging, the program is terminated without a preceding OnSleep call.  Bringing the program back to the foreground and trigger an OnResume().  Swiping the application’s image upward on iOS devices or by tapping the X on the upper-right corner of the application’s image on Android the program stops executing with no further notification.  When your program gets an OnResume call, the operating system has already automatically restored the program contents and state.
  • 15. Markup Extensions  Allows properties to be set to objects or values that are referenced indirectly from other sources
  • 16. Data Binding  Allows properties of two objects to be linked so that a change in one causes a change in the other
  • 17. MVVM  The XAML user interface, called the View; the underlying data, called the Model; and an intermediary between the View and the Model, called the ViewModel.  ViewModels generally implement the INotifyPropertyChanged interface, which means that the class fires a PropertyChanged event whenever one of its properties changes. The data binding mechanism in Xamarin.Forms attaches a handler to this PropertyChanged event so it can be notified when a property changes and keep the target updated with the new value.
  • 18. Binding Modes OneWay Indicates that the binding should only propagate changes from source (usually the View Model) to target (the BindableObject). This is the default. It only displays the value on target. OneWayToSource Indicates that the binding should only propagate changes from target (the BindableObject) to source (usually the View Model). This is mainly used for read-only BindableProperty values. TwoWay Indicates that the binding should propagates changes from source to target in both directions.
  • 20. Behaviors  Behaviors lets you add functionality to user interface controls without having to subclass them. Behaviors are written in code and added to controls in XAML or code.  Adding an email validator to an Entry.  Creating a rating control using a tap gesture recognizer.  Controlling an animation.  Adding an effect to a control.