Wednesday, May 22, 2013

Awesome-F# + Awesome-Xamarin.iOS + Awesome-JMGomez

I have to admit.... I don't really understand what I'm talking about here.... But just look at the beauty:


open System
open System.Drawing
open MonoTouch.UIKit
open MonoTouch.Foundation
open ReachingNirvana.Core
open Cirrious.MvvmCross.Binding
open Cirrious.MvvmCross.Binding.BindingContext
open Cirrious.MvvmCross.Touch.Views
[<Register ("FirstView")>]
type FirstView () =
inherit MvxViewController ()
let label = new UILabel()
let textBox = new UITextField()
override this.ViewDidLoad () =
base.ViewDidLoad ()
label.Frame <- new RectangleF((float32)0,(float32)0,(float32)320,(float32)50)
this.Add(label)
textBox.Frame <- new RectangleF((float32)0,(float32)70,(float32)320,(float32)50)
this.Add(textBox)
let set = MvxBindingContextOwnerExtensions.CreateBindingSet<FirstView,FirstViewModel>(this)
set.Bind(label).To("Hello") |> ignore
set.Bind(textBox).To("Hello") |> ignore
set.Apply()
view raw FirstView hosted with ❤ by GitHub


It's awesome ... and I reckon it might be what the future looks like :)


If you want to learn more:



Juan M Gomez - @_jmgomez_ - thanks hugely for pulling us closer towards the f#uture - I'm so looking forwards to using this. I can sense the hoverboards getting closer! Badge of awesomeness #2


1 comment:

  1. I would really be glad to see new technologies and practices development era, but F# looks similar to Visual Basic.NET for me. :)
    ... Meaning, that Microsoft "dragging" it for so long, spending so much time for compilers etc, but whithout giving any definite understanding why are those for at all as there are no so many advantages in their practical use! Possibly, really only some time in far future. )

    ReplyDelete