SlideShare ist ein Scribd-Unternehmen logo
1 von 32
Downloaden Sie, um offline zu lesen
Making your native apps
even more cross-platform
using MVVM
Jim Bennett
Mobile Developer at EROAD
@JimBobBennett
https://JimBobBennett.io
https://github.com/jimbobbennett
Author of Xamarin in Action
Learn how to build production-quality Xamarin apps using MVVM
to increase the amount of cross-platform code
Now available as part of the Manning Early Access Program
http://xam.jbb.io
Why do we use Xamarin?
Common languages and
framework
Code can be shared across
platforms
Xamarin Cross-Platform apps
• Xamarin apps are native apps
• Code written using the core libraries
can be shared across all platforms
using PCLs
• Only the platform specific stuff is not
cross platform
MVVM increases the amount of
testable shared code in your apps
Example - TipCalc
Business logic - in shared
code in a PCL
public class TipCalculator

{

public decimal Calculate(decimal amount) !=> amount*0.15m;

}

UI - in platform-specific code
in iOS/Android app projects
UI is wired up to business
logic in platform-specific code
!// Android

Calculate.Click += (s, e) !=>

{

var amount = Convert.ToDecimal(BillAmount.Text);

TipAmount.Text = _tipCalculator.Calculate(amount).ToString("C2");

};



Calculate.Enabled = false;

BillAmount.TextChanged += (s, e) !=> Calculate.Enabled = !string.IsNullOrEmpty(BillAmount.Text);

!// iOS

Calculate.TouchUpInside += (s, e) !=>

{

var amount = Convert.ToDecimal(BillAmount.Text);

TipAmount.Text = _tipCalculator.Calculate(amount).ToString("C2");

};



Calculate.Enabled = false;

BillAmount.AddTarget((s, e) !=> Calculate.Enabled = !string.IsNullOrEmpty(BillAmount.Text), 

UIControlEvent.EditingChanged);

Only the business logic can
be unit tested
Only the business logic is
cross-platform
The more cross-platform
code the better
MVVM FTW!
What is MVVM?
• Design pattern used for building UI
based apps - originally invented by
Microsoft for WPF
• Model is business logic
• View is pure UI, no logic
• View Model is UI logic
• Binding wires up view to view model
Model layer is business logic
• Written using cross-platform code
• Can be unit tested
• TipCalculator would be part of the model layer
View layer is pure UI
• Written using platform-specific code
• Cannot be unit tested
• iOS ViewController/Storyboard and Android
Activity/layout would be part of the view layer
ViewModel layer and bindings
are where all the magic is
Each view is backed by a
view model
TipCalcView
public class TipCalcViewModel :
INotifyPropertyChanged

{

!!...

}
TipCalcViewModel
State comes from properties
• When these properties change an event is raised
• The binding layer listens to this event and updates
the UI
• Can be used for data, or properties that define the
UI
• Value converters can be used to change the type
Behaviour comes from
commands
• Commands are objects that wrap actions
• Commands can control if they can be executed
• The binding layer listens to UI events and executes
commands
• If the commands cannot be execute the binding
layer can update the UI to reflect this
View models can also handle
navigation
• Each view has one view model
• Navigation is from view model to view model
• The MVVM framework finds the right view for a
view model and shows it
Xamarin Cross-Platform apps
with MVVM
• Business logic and UI logic can be in
platform specific code
• Commands and property notifications
provide a cross-platform way to
interact with the UI
• Some application logic is shared
• Less platform specific code
Demo time!
MVVM Frameworks
What about Xamarin
Forms?
Xamarin Forms was
built for MVVM!
MVVM increases the amount of
testable shared code in your apps
Jim Bennett
Mobile Application Developer at EROAD
@JimBobBennett
https://JimBobBennett.io
Sample code at:
https://github.com/jimbobbennett/CrossPlatformSummit
Author of Xamarin in Action
Learn how to build production-quality Xamarin apps using MVVM
to increase the amount of cross-platform code
Now available as part of the Manning Early Access Program
http://xam.jbb.io

Weitere ähnliche Inhalte

Was ist angesagt?

Building hybrid apps with Xamarin, Ryan Paul
Building hybrid apps with Xamarin, Ryan PaulBuilding hybrid apps with Xamarin, Ryan Paul
Building hybrid apps with Xamarin, Ryan Paul
Xamarin
 

Was ist angesagt? (20)

Say hello to Xamarin 3
Say hello to Xamarin 3Say hello to Xamarin 3
Say hello to Xamarin 3
 
Native App Development for iOS, Android, and Windows with Visual Studio
Native App Development for iOS, Android, and Windows with Visual StudioNative App Development for iOS, Android, and Windows with Visual Studio
Native App Development for iOS, Android, and Windows with Visual Studio
 
Cross-platform Mobile Development
Cross-platform Mobile DevelopmentCross-platform Mobile Development
Cross-platform Mobile Development
 
C# everywhere: Xamarin and cross platform development
C# everywhere: Xamarin and cross platform developmentC# everywhere: Xamarin and cross platform development
C# everywhere: Xamarin and cross platform development
 
Universal Windows Platform
Universal Windows PlatformUniversal Windows Platform
Universal Windows Platform
 
Cross Platform Mobile Development
Cross Platform Mobile DevelopmentCross Platform Mobile Development
Cross Platform Mobile Development
 
Building hybrid apps with Xamarin, Ryan Paul
Building hybrid apps with Xamarin, Ryan PaulBuilding hybrid apps with Xamarin, Ryan Paul
Building hybrid apps with Xamarin, Ryan Paul
 
Cross Platform Development with Xamarin
Cross Platform Development with XamarinCross Platform Development with Xamarin
Cross Platform Development with Xamarin
 
Xamarin Platform
Xamarin PlatformXamarin Platform
Xamarin Platform
 
An introduction to Xamarin
An introduction to XamarinAn introduction to Xamarin
An introduction to Xamarin
 
Native i os, android, and windows development in c# with xamarin 4
Native i os, android, and windows development in c# with xamarin 4Native i os, android, and windows development in c# with xamarin 4
Native i os, android, and windows development in c# with xamarin 4
 
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
 
Developing and Designing Native Mobile Apps in Visual Studio
Developing and Designing Native Mobile Apps in Visual StudioDeveloping and Designing Native Mobile Apps in Visual Studio
Developing and Designing Native Mobile Apps in Visual Studio
 
Xamarin.Forms
Xamarin.FormsXamarin.Forms
Xamarin.Forms
 
Cross platform development with c# and xamarin
Cross platform development with c# and xamarinCross platform development with c# and xamarin
Cross platform development with c# and xamarin
 
Cross Platform Mobile Development with C# and Xamarin
Cross Platform Mobile Development with C# and XamarinCross Platform Mobile Development with C# and Xamarin
Cross Platform Mobile Development with C# and Xamarin
 
Hitchhicker's Guide to Using Xamarin Forms with RESTful Services
Hitchhicker's Guide to Using Xamarin Forms with RESTful ServicesHitchhicker's Guide to Using Xamarin Forms with RESTful Services
Hitchhicker's Guide to Using Xamarin Forms with RESTful Services
 
Hybrid Mobile Development
Hybrid Mobile DevelopmentHybrid Mobile Development
Hybrid Mobile Development
 
Smaller Not Taller: Defeating the mobile application architecture giant
Smaller Not Taller: Defeating the mobile application architecture giantSmaller Not Taller: Defeating the mobile application architecture giant
Smaller Not Taller: Defeating the mobile application architecture giant
 
Building Your First Android App with Xamarin
Building Your First Android App with XamarinBuilding Your First Android App with Xamarin
Building Your First Android App with Xamarin
 

Andere mochten auch

Cross platform mobile developement introduction
Cross platform mobile developement   introductionCross platform mobile developement   introduction
Cross platform mobile developement introduction
Marcel de Vries
 
Cross Platform Mobile Development with Xamarin
Cross Platform Mobile Development with XamarinCross Platform Mobile Development with Xamarin
Cross Platform Mobile Development with Xamarin
bryan costanich
 

Andere mochten auch (12)

Building Quality Cross-Platform Apps with Xamarin
Building Quality Cross-Platform Apps with XamarinBuilding Quality Cross-Platform Apps with Xamarin
Building Quality Cross-Platform Apps with Xamarin
 
CONCEPTO DE INFORMATICA
CONCEPTO DE INFORMATICACONCEPTO DE INFORMATICA
CONCEPTO DE INFORMATICA
 
Important Things Of Boot Camp
Important Things Of Boot CampImportant Things Of Boot Camp
Important Things Of Boot Camp
 
Mobile first ux
Mobile first uxMobile first ux
Mobile first ux
 
03 cross platform design
03 cross platform design03 cross platform design
03 cross platform design
 
IBM MobileFirst - Hybrid App Development
IBM MobileFirst - Hybrid App DevelopmentIBM MobileFirst - Hybrid App Development
IBM MobileFirst - Hybrid App Development
 
Cross platform mobile developement introduction
Cross platform mobile developement   introductionCross platform mobile developement   introduction
Cross platform mobile developement introduction
 
Most Popular Cross Platform Mobile Development Tools
Most Popular Cross Platform Mobile Development ToolsMost Popular Cross Platform Mobile Development Tools
Most Popular Cross Platform Mobile Development Tools
 
Synapse india reviews on mobile application development
Synapse india reviews on mobile application developmentSynapse india reviews on mobile application development
Synapse india reviews on mobile application development
 
Cross Platform Mobile Development with Xamarin
Cross Platform Mobile Development with XamarinCross Platform Mobile Development with Xamarin
Cross Platform Mobile Development with Xamarin
 
Cross Platform Mobile Application Development Using Xamarin and C#
Cross Platform Mobile Application Development Using Xamarin and C#Cross Platform Mobile Application Development Using Xamarin and C#
Cross Platform Mobile Application Development Using Xamarin and C#
 
360 Flex Atlanta
360 Flex Atlanta360 Flex Atlanta
360 Flex Atlanta
 

Ähnlich wie Cross platform Xamarin Apps With MVVM

Ähnlich wie Cross platform Xamarin Apps With MVVM (20)

Diving Into Xamarin.Forms
Diving Into Xamarin.Forms Diving Into Xamarin.Forms
Diving Into Xamarin.Forms
 
Getting started with Xamarin forms
Getting started with Xamarin formsGetting started with Xamarin forms
Getting started with Xamarin forms
 
Training: MVVM Pattern
Training: MVVM PatternTraining: MVVM Pattern
Training: MVVM Pattern
 
Xamarin.Forms Advanced Topics
Xamarin.Forms Advanced TopicsXamarin.Forms Advanced Topics
Xamarin.Forms Advanced Topics
 
Automatic code generation for cross platform, multi-device mobile apps. An in...
Automatic code generation for cross platform, multi-device mobile apps. An in...Automatic code generation for cross platform, multi-device mobile apps. An in...
Automatic code generation for cross platform, multi-device mobile apps. An in...
 
Building xamarin.forms apps with prism and mvvm
Building xamarin.forms apps with prism and mvvmBuilding xamarin.forms apps with prism and mvvm
Building xamarin.forms apps with prism and mvvm
 
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
 
Lecture 08 Xamarin
Lecture 08 XamarinLecture 08 Xamarin
Lecture 08 Xamarin
 
Xamarin介紹
Xamarin介紹Xamarin介紹
Xamarin介紹
 
Building databound JavaScript apps with Knockoutjs
Building databound JavaScript apps with KnockoutjsBuilding databound JavaScript apps with Knockoutjs
Building databound JavaScript apps with Knockoutjs
 
Dia 4.1 mvvm cross
Dia 4.1   mvvm crossDia 4.1   mvvm cross
Dia 4.1 mvvm cross
 
Building Cross-Platform JavaScript Apps using Cordova
Building Cross-Platform JavaScript Apps using CordovaBuilding Cross-Platform JavaScript Apps using Cordova
Building Cross-Platform JavaScript Apps using Cordova
 
C# everywhere - Building Cross-Platform Apps with Xamarin and MvvmCross
C# everywhere - Building Cross-Platform Apps with Xamarin and MvvmCrossC# everywhere - Building Cross-Platform Apps with Xamarin and MvvmCross
C# everywhere - Building Cross-Platform Apps with Xamarin and MvvmCross
 
Introduction to xamarin
Introduction to xamarinIntroduction to xamarin
Introduction to xamarin
 
Xamarin Technical Assessment Against Native for Cross Platform Mobile Develop...
Xamarin Technical Assessment Against Native for Cross Platform Mobile Develop...Xamarin Technical Assessment Against Native for Cross Platform Mobile Develop...
Xamarin Technical Assessment Against Native for Cross Platform Mobile Develop...
 
Xamarin Development
Xamarin DevelopmentXamarin Development
Xamarin Development
 
SpringCloudConfig.pptx.pdf
SpringCloudConfig.pptx.pdfSpringCloudConfig.pptx.pdf
SpringCloudConfig.pptx.pdf
 
Prism library and MVVM
Prism library and MVVMPrism library and MVVM
Prism library and MVVM
 
Xamarin in real life: our MVP approach - Daniele Leombruni Antonino Cacace - ...
Xamarin in real life: our MVP approach - Daniele Leombruni Antonino Cacace - ...Xamarin in real life: our MVP approach - Daniele Leombruni Antonino Cacace - ...
Xamarin in real life: our MVP approach - Daniele Leombruni Antonino Cacace - ...
 
C# everywhere - Building Cross-Platform Apps with Xamarin and MvvmCross
C# everywhere - Building Cross-Platform Apps with Xamarin and MvvmCrossC# everywhere - Building Cross-Platform Apps with Xamarin and MvvmCross
C# everywhere - Building Cross-Platform Apps with Xamarin and MvvmCross
 

Mehr von Jim Bennett

Mehr von Jim Bennett (10)

Intro to the Cloud from TeenHacks LI
Intro to the Cloud from TeenHacks LIIntro to the Cloud from TeenHacks LI
Intro to the Cloud from TeenHacks LI
 
WooHoo my app is on the store! Now what?
WooHoo my app is on the store! Now what?WooHoo my app is on the store! Now what?
WooHoo my app is on the store! Now what?
 
Building Fabulous mobile apps with F#
Building Fabulous mobile apps with F#Building Fabulous mobile apps with F#
Building Fabulous mobile apps with F#
 
Adding platform specific magic to cross-platform Xamarin Forms apps
Adding platform specific magic to cross-platform Xamarin Forms appsAdding platform specific magic to cross-platform Xamarin Forms apps
Adding platform specific magic to cross-platform Xamarin Forms apps
 
Learning to love f#
Learning to love f#Learning to love f#
Learning to love f#
 
App center - the gateway drug to mobile devops
App center -  the gateway drug to mobile devopsApp center -  the gateway drug to mobile devops
App center - the gateway drug to mobile devops
 
Adding platform specific magic to cross-platform Xamarin Forms apps
Adding platform specific magic to cross-platform Xamarin Forms appsAdding platform specific magic to cross-platform Xamarin Forms apps
Adding platform specific magic to cross-platform Xamarin Forms apps
 
Clicking on the real world with iBeacon and eddystone
Clicking on the real world with iBeacon and eddystoneClicking on the real world with iBeacon and eddystone
Clicking on the real world with iBeacon and eddystone
 
IBeacons and Eddystone
IBeacons and EddystoneIBeacons and Eddystone
IBeacons and Eddystone
 
Xamarin iBeacon Mini-hack using Estimote iBeacons
Xamarin iBeacon Mini-hack using Estimote iBeaconsXamarin iBeacon Mini-hack using Estimote iBeacons
Xamarin iBeacon Mini-hack using Estimote iBeacons
 

Kürzlich hochgeladen

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Kürzlich hochgeladen (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

Cross platform Xamarin Apps With MVVM

  • 1. Making your native apps even more cross-platform using MVVM
  • 2. Jim Bennett Mobile Developer at EROAD @JimBobBennett https://JimBobBennett.io https://github.com/jimbobbennett
  • 3. Author of Xamarin in Action Learn how to build production-quality Xamarin apps using MVVM to increase the amount of cross-platform code Now available as part of the Manning Early Access Program http://xam.jbb.io
  • 4. Why do we use Xamarin?
  • 6. Code can be shared across platforms
  • 7. Xamarin Cross-Platform apps • Xamarin apps are native apps • Code written using the core libraries can be shared across all platforms using PCLs • Only the platform specific stuff is not cross platform
  • 8. MVVM increases the amount of testable shared code in your apps
  • 10. Business logic - in shared code in a PCL public class TipCalculator
 {
 public decimal Calculate(decimal amount) !=> amount*0.15m;
 }

  • 11. UI - in platform-specific code in iOS/Android app projects
  • 12. UI is wired up to business logic in platform-specific code !// Android
 Calculate.Click += (s, e) !=>
 {
 var amount = Convert.ToDecimal(BillAmount.Text);
 TipAmount.Text = _tipCalculator.Calculate(amount).ToString("C2");
 };
 
 Calculate.Enabled = false;
 BillAmount.TextChanged += (s, e) !=> Calculate.Enabled = !string.IsNullOrEmpty(BillAmount.Text);
 !// iOS
 Calculate.TouchUpInside += (s, e) !=>
 {
 var amount = Convert.ToDecimal(BillAmount.Text);
 TipAmount.Text = _tipCalculator.Calculate(amount).ToString("C2");
 };
 
 Calculate.Enabled = false;
 BillAmount.AddTarget((s, e) !=> Calculate.Enabled = !string.IsNullOrEmpty(BillAmount.Text), 
 UIControlEvent.EditingChanged);

  • 13. Only the business logic can be unit tested
  • 14. Only the business logic is cross-platform
  • 17. What is MVVM? • Design pattern used for building UI based apps - originally invented by Microsoft for WPF • Model is business logic • View is pure UI, no logic • View Model is UI logic • Binding wires up view to view model
  • 18. Model layer is business logic • Written using cross-platform code • Can be unit tested • TipCalculator would be part of the model layer
  • 19. View layer is pure UI • Written using platform-specific code • Cannot be unit tested • iOS ViewController/Storyboard and Android Activity/layout would be part of the view layer
  • 20. ViewModel layer and bindings are where all the magic is
  • 21. Each view is backed by a view model TipCalcView public class TipCalcViewModel : INotifyPropertyChanged
 {
 !!...
 } TipCalcViewModel
  • 22. State comes from properties • When these properties change an event is raised • The binding layer listens to this event and updates the UI • Can be used for data, or properties that define the UI • Value converters can be used to change the type
  • 23. Behaviour comes from commands • Commands are objects that wrap actions • Commands can control if they can be executed • The binding layer listens to UI events and executes commands • If the commands cannot be execute the binding layer can update the UI to reflect this
  • 24. View models can also handle navigation • Each view has one view model • Navigation is from view model to view model • The MVVM framework finds the right view for a view model and shows it
  • 25. Xamarin Cross-Platform apps with MVVM • Business logic and UI logic can be in platform specific code • Commands and property notifications provide a cross-platform way to interact with the UI • Some application logic is shared • Less platform specific code
  • 30. MVVM increases the amount of testable shared code in your apps
  • 31. Jim Bennett Mobile Application Developer at EROAD @JimBobBennett https://JimBobBennett.io Sample code at: https://github.com/jimbobbennett/CrossPlatformSummit
  • 32. Author of Xamarin in Action Learn how to build production-quality Xamarin apps using MVVM to increase the amount of cross-platform code Now available as part of the Manning Early Access Program http://xam.jbb.io