Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
A LapAroundMonoTouch<br />Bringing .NET to Apple iOS<br />
A Lap Around MonoTouch<br /><ul><li>Joey Filichia
Research and Development @ Denver Public Schools
Email:
mjfilichia@gmail.com
joey@filichia.com
joey_filichia@dpsk12.org
Twitter:
@mecurioJ
On the interwebs:
http://www.filichia.com
Note:</li></ul>The opinions expressed today are my own and do not represent my employer’s views in any way. Nothing discus...
What is Mono?<br />Open Source Project that provides a CLR compiler for .NET on non-Windows OS<br />Web Site: http://www.m...
What is MonoTouch?<br />Funded and managed by Novell<br />Allows .Net Developers to create native applications using C# th...
Upcoming SlideShare
Loading in …5
×

A lap around monotouch

1,991 views

Published on

Objective-C, CocoaTouch oh my! MonoTouch is an innovative platform that allows the C# developer to write applications for the iPhone and iPad using a subset of Mono, the open source implementation of the .Net Framework. In this talk, we will look at MonoTouch, what you need to work on MonoTouch and explore a simple application created using MonoTouch. If you are curious about MonoTouch, curious about how to get started with MonoTouch or simply curious about how .Net plays with Apple technologies, this is the lap for you.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

A lap around monotouch

  1. 1. A LapAroundMonoTouch<br />Bringing .NET to Apple iOS<br />
  2. 2. A Lap Around MonoTouch<br /><ul><li>Joey Filichia
  3. 3. Research and Development @ Denver Public Schools
  4. 4. Email:
  5. 5. mjfilichia@gmail.com
  6. 6. joey@filichia.com
  7. 7. joey_filichia@dpsk12.org
  8. 8. Twitter:
  9. 9. @mecurioJ
  10. 10. On the interwebs:
  11. 11. http://www.filichia.com
  12. 12. Note:</li></ul>The opinions expressed today are my own and do not represent my employer’s views in any way. Nothing discussed should be considered official or sanctioned by my employer or any other organization I’m affiliated with.<br />Joey Filichia has been writing code since 1982, turning a hobby into a career in 1997. Over the course of his career, Joey has worked as a systems administrator, web developer, architect, database administrator and developer. Although "Innovative and Creative" are sometimes negative when applied to programmers, over time Joey has made those traits work for his career. Currently, he is Lead of Research and Development for Denver Public Schools. His current passion is trying to find new ways to use technology as a tool to help students improve their learning skills. Currently, Joey is developing applications for the iPad, iPhone and Windows Phone 7. <br />
  13. 13. What is Mono?<br />Open Source Project that provides a CLR compiler for .NET on non-Windows OS<br />Web Site: http://www.mono-project.com/Main_Page<br />Most of the.NET framework exists in Mono<br />Here’s what doesn’t exist: <br />System.Management does not map to Linux<br />There are no plans to implement WPF<br />Windows Workflow is a future enhancement<br />Entity Framework isn’t available<br />Server-SideOData is not available, because it depends on the Entity Framework<br />CodeContracts have been implemented in an API, but only partial tooling exists.<br />
  14. 14. What is MonoTouch?<br />Funded and managed by Novell<br />Allows .Net Developers to create native applications using C# that can compile and run on iOS devices (iPhone, iPod, iPad)<br />In essence, it compiles .Net code into Objective-C compatible code.<br />
  15. 15. How does it do it without violating the Apple Licensing Agreement?<br />But it still won’t run Adobe Flash…<br />April 2010 : “Third Party Tools are prohibited”<br />Tech Republic’s Justin James said “…I believe that signing this agreement is about equal to selling your soul for a grilled cheese sandwich.”<br />September 2010 : “Third Party Tools are not prohibited”<br />
  16. 16. How much of MonoTouch matches .NET Framework?<br />Most of the .NET 2.0 Core<br />LINQ<br />Generics<br />WCF<br />ADO.NET wrappers for SQLite<br />Silverlight 2.0 API<br />Wraps iOS APIs<br />
  17. 17. What doesn’t exist?<br />JIT-less environment is restricted by the kernel<br />Eliminates CodeDom<br />DRL<br />Reflection<br />Memory Management<br />P/Invoke methods<br />
  18. 18. Just-In-Time versus Ahead-Of-Time<br />Apple DOES NOT allow Just-In-time Compiling (JIT)<br />.NET uses Just-In-Time Compiling (JIT)<br /> MonoTouch uses Ahead-of-Time Compiling (AOT)<br />Ahead of Time Compiling is also known as Static Compilation<br />AOT Compiling creates all the native code that JIT would normally generate<br />Links to runtime to create a single ARM processor capable native binary<br />IL code is stripped from the managed assemblies, leaving just metadata<br />
  19. 19. Garbage Collection<br />Managed Code handles garbage collections<br />Objective-C for iOS uses Retain Counts<br />Retain Counts : Reference Counts : Memory Pointers != Dealloc Pointers<br />MonoTouch handles garbage collection <br />Creates an “AutoRelease” pool for anything that exists on the main thread and any child threads<br />
  20. 20. What do I need to do to get started with MonoTouch?<br />Intel Based Genuine Macintosh<br />“… MonoTouch is not supported when running on non-genuine Apple hardware (Hackintsoshes) or other OS X installations virtualized in violation of Apple's license agreement, as we're unable to perform any kind of quality assurance testing for these systems, or otherwise diagnose issues that might occur in these scenarios.” – www.monotouch.net<br />Latest iOS SDK<br />Currently at 4.02 (as of March 2011)<br />Apple Developer’s Account ($99 a Year)<br />Familiarity with Apple’s Development Restrictions<br />
  21. 21. Installing MonoTouch<br />Installation order is VERY IMPORTANT!<br />Remember, RTFI!!!!<br />http://monotouch.net/Documentation/Installation<br />at least OSX version 10.5.7 Leopard (OSX 10.6.6 Snow Leopard needed for iOS 4)<br />Install iOS SDK <br />Install Mono Framework <br />(MonoDevelop is installed by default when Mono is installed)<br />Install MonoTouch<br />iPhone Configuration Utility from Apple<br />Developer Certificates for testing on devices (simulator comes default)<br />
  22. 22. Now is the time we Demo and Code!<br />Getting Started <br />You can’t escape the xibs!<br />Drop controls on the Interface Builder<br />Wire up the outlets in the AppDelegate<br />Access them from the C# Code Behind…<br />Must use delegates, models and views…it’s the Objective C way.<br />Virtual Machines…Visual Studio (20082010) via a VM (Virtual Box is free…) means you can use Visual Studio to handle coding using a familiar environment.<br />Just make sure to map a reference path within the project to the directory that holds the Mono dll’s<br />
  23. 23. References and Resources<br />Mono Project Main Page : http://mono-project.com/Main_Page<br />Mono Develop : http://monodevelop.com/<br />MonoTouch : http://monotouch.net/<br />MonoTouch Pricing and Trials : http://monotouch.net/Store<br />Reference Book “Professional iPhone Programming with MonoTouch and .NET/C#:” : http://www.softpro.com/0-470-63782-x.html<br />MonoTouch Tutorials : http://monotouch.net/Tutorials<br />
  24. 24. References and Resources<br />Inside Apple's insane developer agreement<br />http://www.techrepublic.com/blog/programming-and-development/inside-apples-insane-developer-agreement/2486<br />New iPhone Developer Agreement Bans the Use of Adobe’s Flash-to-iPhone Compiler<br />http://daringfireball.net/2010/04/iphone_agreement_bans_flash_compiler<br />

×