Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.
Xamarin   Seminar       19th April 2012    Copyright 2012 © Xamarin Inc. All rights reserved
AgendaCross-Platform Mobile Development                            Greg Shackles                            Senior Softwar...
IntroductionThis session will discuss how to use C# to developiOS, Android and Windows Phone applications.We’ll cover: •Wh...
Native Platform Languages                                                            Xamarin        Copyright 2012 © Xamar...
Write Once, Run Anywhere?    !=                                                       !=                                  ...
C# to the Rescue!                                                        Xamarin    Copyright 2012 © Xamarin Inc. All righ...
Benefits•C# and .NET are mature and powerful•Skill reuse on all platforms•Apps are still completely native•Code can be reus...
Architecture                                                                         Mono#for#  UI#      Silverlight#     ...
What Code Can Be Shared?•Most non-UI or platform code•Core application logic•Entities•LINQ (objects, XML)•Network access (...
Requirements•MonoTouch  •Mac OS X  •MonoDevelop•Mono for Android  •Mac OS X or Windows  •MonoDevelop or Visual Studio 2010...
File Linking•All profiles are not created equal•Single copy of file•Compile-time verification•Project Linker extension for VS...
Abstraction•Separate common logic from UI•Interfaces, base classes, etc.public interface IContactManager{  IList<Person> G...
Library: Xamarin.Mobile•Abstraction layer over platform APIs  •Contacts  •Geolocation  •Camera  •...          http://xamar...
Observer Pattern•Decouple UI from business logic•Business layer can publish updates•UI layer subscribes to updatespublic E...
Library: TinyMessenger•Event aggregator/messenger•Publish/subscribe•Single file•Supports iOS, Android, Windows Phone   http...
Partial Classes and                  Methodspublic partial class MyClass{   // partial methods are private, and must retur...
Conditional Compilation#if __ANDROID__   Console.Write(“Only on Android”);#elif WINDOWS_PHONE   Console.Write(“Only on Win...
Conditional Compilation•MonoTouch  •No default symbols•Mono for Android                              •Windows Phone  •__AN...
File Access•Direct file access    •System.IO    •Works on iOS and Android    •Not supported by Windows Phone    •Paths are ...
File Access•Isolated Storage    •Works on iOS, Android, and Windows Phone    •Higher level API    •Don’t need to worry abo...
Database Access•iOS and Android  •SQLite  •Native APIs or ADO.NET•Windows Phone  •SQL Server CE  •LINQ to SQL             ...
Library: C#-SQLite•C# port of SQLite database•File based•Useful for Windows Phone, Silverlight     http://code.google.com/...
Library: sqlite-net•Layer over SQLite database•Strongly-typed queries•Single file•Supports iOS, Android, Windows Phone     ...
Library: TinyIoC•Inversion of Control container•Single file•Supports iOS, Android, Windows Phone     https://github.com/gru...
Library: MonoCross•Cross-platform MVC framework•Shared models and controllers•Views specific to platforms•Supports iOS, And...
More LinksMWC 2012 Apphttps://github.com/xamarin/mobile-samples/tree/master/MWCNYC Code Camp 6 Apphttps://github.com/gshac...
Xamarin    Seminar   Please give us your feedback  http://bit.ly/xamfeedback      Follow us on Twitter        @XamarinHQ  ...
Prochain SlideShare
Chargement dans…5
×

Cross-platform Mobile Development

33 135 vues

Publié le

Learn about cross-platform approaches to developing native applications using C# and .NET for iOS, Android and Windows Phone 7.

Publié dans : Technologie
  • I'll tell you right now (and I've got proof), that anyone who tells you "size doesn't matter to women" is flat out lying to your face and trying to make you feel better... Heck, just recently I asked a focus group of women via an anonymous online survey if size matters, and again and again they said "Oh my god, I HATE IT when it's SMALL." For a long time I didn't know what to tell the guys who'd write in to me and ask how to get "bigger." I'd say something lame like "Women actually like guys who are smaller... you just have to get good with your hands." Then I found "THE BIBLE of Penis Enlargement" by this guy named John Collins ➤➤ http://ishbv.com/pebible/pdf
       Répondre 
    Voulez-vous vraiment ?  Oui  Non
    Votre message apparaîtra ici
  • Discover a WEIRD trick I use to make over $3500 per month taking paid surveys online. read more... ◆◆◆ https://tinyurl.com/make2793amonth
       Répondre 
    Voulez-vous vraiment ?  Oui  Non
    Votre message apparaîtra ici
  • DOWNLOAD FULL BOOKS INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL PDF EBOOK here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL EPUB Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL doc Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL PDF EBOOK here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL EPUB Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL doc Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Répondre 
    Voulez-vous vraiment ?  Oui  Non
    Votre message apparaîtra ici
  • ★★ How Long Does She Want You to Last? ★★ A recent study proved that the average man lasts just 2-5 minutes in bed (during intercourse). The study also showed that many women need at least 7-10 minutes of intercourse to reach "The Big O" - and, worse still... 30% of women never get there during intercourse. Clearly, most men are NOT fulfilling there women's needs in bed. Now, as I've said many times - how long you can last is no guarantee of being a GREAT LOVER. But, not being able to last 20, 30 minutes or more, is definitely a sign that you're not going to "set your woman's world on fire" between the sheets. Question is: "What can you do to last longer?" Well, one of the best recommendations I can give you today is to read THIS report. In it, you'll discover a detailed guide to an Ancient Taoist Thrusting Technique that can help any man to last much longer in bed. I can vouch 100% for the technique because my husband has been using it for years :) Here's the link to the report ★★★ http://ishbv.com/rockhardx/pdf
       Répondre 
    Voulez-vous vraiment ?  Oui  Non
    Votre message apparaîtra ici
  • Get BIGGER and LONGER Without Surgery, Forget Surgery, Pills And Extenders, DON'T Do This To Make It Bigger. ♣♣♣ http://ishbv.com/pebible/pdf
       Répondre 
    Voulez-vous vraiment ?  Oui  Non
    Votre message apparaîtra ici

Cross-platform Mobile Development

  1. 1. Xamarin Seminar 19th April 2012 Copyright 2012 © Xamarin Inc. All rights reserved
  2. 2. AgendaCross-Platform Mobile Development Greg Shackles Senior Software Engineer OLO Online Ordering greg@gregshackles.com gregshackles.com @gshackles github.com/gshackles Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  3. 3. IntroductionThis session will discuss how to use C# to developiOS, Android and Windows Phone applications.We’ll cover: •Why use C#? •Code sharing techniques and patterns •Useful libraries Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  4. 4. Native Platform Languages Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  5. 5. Write Once, Run Anywhere? != != Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  6. 6. C# to the Rescue! Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  7. 7. Benefits•C# and .NET are mature and powerful•Skill reuse on all platforms•Apps are still completely native•Code can be reused across platforms (even non-mobile platforms!) Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  8. 8. Architecture Mono#for# UI# Silverlight# MonoTouch# Android# C## Business#Logic#Run)me# .NET# Mono#Pla/orm# WP7# iOS# Android# Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  9. 9. What Code Can Be Shared?•Most non-UI or platform code•Core application logic•Entities•LINQ (objects, XML)•Network access (System.Net) Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  10. 10. Requirements•MonoTouch •Mac OS X •MonoDevelop•Mono for Android •Mac OS X or Windows •MonoDevelop or Visual Studio 2010•Windows Phone •Windows •Visual Studio 2010 Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  11. 11. File Linking•All profiles are not created equal•Single copy of file•Compile-time verification•Project Linker extension for VS2010 http://msdn.microsoft.com/en-us/library/ff648745 Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  12. 12. Abstraction•Separate common logic from UI•Interfaces, base classes, etc.public interface IContactManager{ IList<Person> GetContacts();}public class AndroidContactManager : IContactManager{ public IList<Person> GetContacts() { return null; }} Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  13. 13. Library: Xamarin.Mobile•Abstraction layer over platform APIs •Contacts •Geolocation •Camera •... http://xamarin.com/mobileapi Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  14. 14. Observer Pattern•Decouple UI from business logic•Business layer can publish updates•UI layer subscribes to updatespublic EventHandler<EventArgs> MessageReceived;MessageReceived += (sender, args) =>{ Console.WriteLine("Message received");}; Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  15. 15. Library: TinyMessenger•Event aggregator/messenger•Publish/subscribe•Single file•Supports iOS, Android, Windows Phone https://github.com/grumpydev/TinyMessenger Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  16. 16. Partial Classes and Methodspublic partial class MyClass{ // partial methods are private, and must return void partial void Foo(); public void Bar() { Foo(); }}public partial class MyClass{ partial void Foo() { Console.WriteLine("Foo"); }} Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  17. 17. Conditional Compilation#if __ANDROID__ Console.Write(“Only on Android”);#elif WINDOWS_PHONE Console.Write(“Only on Windows Phone”);#else Console.Write(“Everything else”);#endif Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  18. 18. Conditional Compilation•MonoTouch •No default symbols•Mono for Android •Windows Phone •__ANDROID__ •WINDOWS_PHONE •__ANDROID_1__ •SILVERLIGHT •__ANDROID_2__ •... Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  19. 19. File Access•Direct file access •System.IO •Works on iOS and Android •Not supported by Windows Phone •Paths are different on iOS and AndroidFile.WriteAllText( Environment.GetFolderPath(Environment.SpecialFolder.Personal), "Writing directly to a file"); Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  20. 20. File Access•Isolated Storage •Works on iOS, Android, and Windows Phone •Higher level API •Don’t need to worry about file pathsusing (var store = IsolatedStorageFile.GetUserStoreForApplication())using (var writer = store.OpenFile("MyFile", FileMode.Create)){ // write to the file} Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  21. 21. Database Access•iOS and Android •SQLite •Native APIs or ADO.NET•Windows Phone •SQL Server CE •LINQ to SQL Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  22. 22. Library: C#-SQLite•C# port of SQLite database•File based•Useful for Windows Phone, Silverlight http://code.google.com/p/csharp-sqlite Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  23. 23. Library: sqlite-net•Layer over SQLite database•Strongly-typed queries•Single file•Supports iOS, Android, Windows Phone http://code.google.com/p/sqlite-net Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  24. 24. Library: TinyIoC•Inversion of Control container•Single file•Supports iOS, Android, Windows Phone https://github.com/grumpydev/TinyIoC Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  25. 25. Library: MonoCross•Cross-platform MVC framework•Shared models and controllers•Views specific to platforms•Supports iOS, Android, Windows Phone•Sits atop MonoTouch, Mono for Android http://code.google.com/p/monocross/ Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  26. 26. More LinksMWC 2012 Apphttps://github.com/xamarin/mobile-samples/tree/master/MWCNYC Code Camp 6 Apphttps://github.com/gshackles/NycCodeCamp6Mobile Development in C#http://amzn.com/1449320236 Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  27. 27. Xamarin Seminar Please give us your feedback http://bit.ly/xamfeedback Follow us on Twitter @XamarinHQ 19th April 2012 Copyright 2012 © Xamarin Inc. All rights reserved

×