GithubHelp home page GithubHelp logo

csoren / elmish-xamarin-forms Goto Github PK

View Code? Open in Web Editor NEW
11.0 5.0 1.0 24 KB

Elmish architecture for Xamarin.Forms

License: Other

F# 100.00%
elmish fsharp elm-architecture xamarin-forms xamarin

elmish-xamarin-forms's Introduction

Elmish.Xamarin.Forms

Elmish architecture for Xamarin.Forms

WARNING

This should very much be considered a draft and at the PoC stage. It is not ready for production yet. The DSL is likely to change substantially. Actual performance at scale is unknown.

Obvious issues

No structural equality for events. When an event handler is present in the tree, it is always considered changed, as there's no structural equality for functions. This means pretty much the whole tree is traversed on every update, even when not strictly necessary. There needs to be a way to determine whether an event handler has changed.

Hacky setting of events. Setting an event on the Xanarin.Forms object is extremely hacky as there's no way for a client to clear the collection of subscribed listeners. Plus it is probably pretty slow, but is easily fixed with memoization.

DSL is clunky. Specifying callbacks is ugly. Due to many views having properties with the same name, it is often necessary to qualify with the discriminated union's name.

Writing bindings is repetitive and tedious. An obvious next step is auto-generating bindings from the Xamarin.Forms assembly. This would facilitate a better DSL and it would be much easier to keep up with Xamarin.Forms features.

elmish-xamarin-forms's People

Contributors

csoren avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

ramonesteban78

elmish-xamarin-forms's Issues

Events Suggestion

I came across this old article about the react diff algorithm. It seems like they had some trouble with DOM events and instead of attaching events at each level they attach a top level event and manually route the event to the right handler from the virtual tree. I don't know a lot about Xamarin forms but I think this would work in WPF.

https://calendar.perfplanet.com/2013/diff/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.