Разработка мобильных приложений для iOS и Android на C#

  • Published on
    04-Jun-2015

  • View
    11.205

  • Download
    0

Embed Size (px)

DESCRIPTION

Application Developer Days 2012.

Transcript

  • 1. iOS Android C# , Touch Instinct

2. C#? ? ! ( ) -, , LINQ Properties Generics dynamic # 5 async/await ( ) 3. MyApi.OnSomeMethod += () => {InvokeOnMainThread( (result) => {textView.Text = result;});}MyApi.SomeMethodAsync(); 4. async/awaitvar content = awaitMyApi.GetUrlAsync(http://touchin.ru);textView.Text = content; 5. # vs Objective-CObjective-C:// [button addTarget:selfaction:@selector(touchHandler:) forControlEvents:UIControlEventTouchUpInside];// -(void) touchHandler:(id)sender {textView.text = @"some text";} 6. # vs Objective-CC#:btn.TouchUpInside += (sender, e) => { textView.Text = "Clicked!";}; 7. C# vs JavaJava:button.setOnClickListener( new View.OnClickListener() { public void onClick(View v) { textView.setText(Clicked); } }); 8. C# vs JavaC#:button.Click += (sender, e) { textView.Text = Clicked!;}; 9. C# vs {0} ( Ruby/Python) Java [[[[ Objective-C] : ]:] : ]; 10. , ! 11. Mono ECMA-334(C#) ECMA-335 (CLI) 2004 Miguel de Icaza(GNOME, Ximian, MidnightCommander, WINE) , , C# 4.0 BCL 12. Xamarin Ximian -> Novell -> Attachmate -> Xamarin Monotouch + Mono forAndroid 399$ , , 4 https://github.com/xamarin/monotouch-samples 13. , , 1.5 Monotouch iOS, Android, WP7 Monotouch, Mono forAndroid, Mono showcase Xamarin () , , 15, Kinect, , , 14. Monotouch Mono framework AOT ARM Bindings API C# UI , C# C#- API (, ,) Monodevelop + XCode 15. , , BCL, IL (F#, IronPython, IronRuby, Nemerle, VB ) IL AOT Mono Runtime Garbage Collector 16. AOT vs JIT .Net Mono Just InTime iOS , (ARM) Ahead Of Time 17. AOT Emit, Reflection , .. Generic Virtual Methods P/Invokes in Generic Types LINQ expressions 18. Linking IL BCL , 19. C#- API var btn = new UIButton(new RectangleF(0, 0, 200, 80));btn.Enabled = true;btn.SetTitleColor(UIColor.FromRGB(255, 255, 0),UIControlState.Selected);btn.TouchUpInside += delegate {// your code};window.Add(btn); 20. Monotouch: P/Invoke objc_msgSend c Monotouch.ObjcRuntime.MessagingMono for Android: JNI (Java Native Interface) 21. public virtual bool Enabled{ [Export("isEnabled")] get { // return Messaging.bool_objc_msgSend(base.Handle, UIControl.selIsEnabled); } [Export("setEnabled:")] set { // Messaging.void_objc_msgSend_bool(base.Handle, UIControl.selSetEnabled_, value); }} 22. AppDelegate, UIWindows, ViewControllers UI nib 23. + Wi-Fi USB() breakpointwatch 24. Garbage Collector , , ( Unity ) 25. - Monodevelop 26. UI - XCode 27. P/Invoke btouch Objective-C Bindings , :Google Analytics, Flurry . 28. ( 2-3) ( ) UIKit/Android UI 29. ( WP7) Objective-C ( ) ( ) 30. CoinKeeper (iOS + Android + ) - , , , [SecretProject] - Omlet.ru 2 iPad Android, , 31. Mono for Android , : JIT , EMIT ( , , , ) Mono VM Dalvik VM GREFs Android 1.6 UI Monodevelop (alpha) 32. 30-60 c , , UI Xamarin.Mobile (, ) MVC 33. ! UI Unit test ( TouchUnit) , (Alert, InvokeOnMainThread ) 34. Xobot OS Android # - C# 35. 36. Appcelerator PhoneGap Unity ( Mono ) 37. ! , ! ! Twitter: @AndreyBaskovEmail: ab@touchin.ruSite: touchin.ru

Recommended

View more >