• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
C# rocks

C# rocks






Total Views
Views on SlideShare
Embed Views



1 Embed 5

https://twitter.com 5



Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

    C# rocks C# rocks Presentation Transcript

    • Xamarin C# Rocks. Mobile Rocks.You Rock.
    • bryan costanich em: bryanc@xamarin.com tw: @bryancostanich slides: slideshare.net/bryancostanich
    • Sample Code Agent Watch - blog.xamarin.com Tasky - github.com/xamarin/mobilesamples/TaskyPro
    • DEMO Agent Watch + Xamarin.Android
    • C# is Everywhere.
    • Xamarin Platform (The Pitch)
    • Two Languages, One Framework. .NET Framework + BCL Managed Runtime/Garbage Collection LINQ Lambdas Async/Await + Task Parallel Lib. Compile-Time Checks C F # #
    • Native Performance Native UX Compiles Down to Native Code, Not Interpreted All Native UX Controls Full Platform SDK Access iOS: Selectors/Obj-C Runtime Android: JNI Fast Enough for Games
    • Massive Code Reuse Share C# Code Across Platforms C# Libraries Obj-C Bindings + Binding Projects .jar Bindings + Binding Projects C via pInvoke C++ via CPPSharp (github.com/mono/CppSharp)
    • Component Store Create Sophisticated Applications Quickly High Quality Cross-Platform Components First Class, in-IDE Experience (VS + XS)
    • Other Platforms Windows - via .NET Mac - via Xamarin.Mac Linux - via Mono Ouya, XBOX, PSP, etc. Etc.
    • Xamarin + C# Community is Awesome Huge C# Community StackOverflow.com forums.xamarin.com IRC + chat.xamarin.com Great Support
    • Amazing IDEs Visual Studio or Xamarin Studio Android + iOS Designer Debugging, Autocomplete, Refactoring Integrated Source Control
    • Component Store Tons of Components Cross-Platform IDE-Integration - drop-in! Revenue Model for User Submitted
    • Xamarin is Awesome.
    • Building Xplat Mobile Apps
    • General Xplat Considerations
    • Design PlatformSpecific UX UX in iOS != Android != Windows Phone UX Metaphors are Different: Navigation Controller vs. Back Button Write-Once, Run-Anywhere is Problematic Users Expect Native UX
    • Choose Device Targets iPhone != iPad Beware Android Fragmentation Form Factor + Capability Differences Inform UX Pro-Tip: Minimize Targets
    • Test on All Targeted Devices! Device != Emulator/Simulator Xamarin Test Cloud Hundreds of Actual Devices Integrates into your CI Workflow
    • Xplat Architectural Recommendations
    • Architecture Good Architecture == Good Architecture Layers Separation of Responsibility Encapsulation Enables Core Code Sharing
    • Code Sharing PCL vs. File Linking PCL Libraries - Great for Components File Linking - Better for Apps PLP - Take a Lot of Architectural Work, Linking is Easy Our Recommendation: File Linking for Projects Both VS and XS have Project Linker Add-ins
    • Project Setup New Blank Solution: "[AppName]" New C# Lib Project: "[AppName].Core" Test Project: “[AppName].Core.Tests” New Xamarin.iOS: “[AppName].iOS” New Xamarin.Android: “[AppName].Droid” New Windows Project "[AppName].WinStore"
    • Demo Creating a Cross Platform Mobile Solution
    • Shared Data + Data Access Layer SQLite on iOS + Android, C# SQLIte on Windows Market Apps: http://code.google.com/p/csharp-sqlite/ SQLite.NET ORM Use Generics for CRUD Convenience Methods: TaskDatabase.cs
    • Platform Divergence Handling Divergence + Taking Advantage of Platform Features
    • Conditional Compilation Pre-Defined Symbols: #if __MOBILE__ #if __ANDROID__ #if __IOS__ #if WINDOWS_PHONE #if SILVERLIGHT Can Add Additional in Build Settings
    • Architectural Abstraction Different Implementation using Architecture Interfaces IoC/Provider Pattern
    • Xamarin.* Libraries XPlat API Abstractions Open Source Github.com/Xamarin/Xamarin.* Mobile Social Auth
    • Other Xplat Libs MonoCross http://code.google.com/p/monocross/ MvvmCross https://github.com/slodge/MvvmCross Vernacular - https://github.com/rdio/vernacular MonoGame - http://monogame.net Cocos2D - http://cocos2DXNA.net Many, many, many more!!!
    • Get Building. :)
    • Q+A