ProductPromotion
Logo

Elm

made by https://0x3d.site

GitHub - ThomasWeiser/todomvc-elmfire: TodoMVC+Firebase in Elm+ElmFire
TodoMVC+Firebase  in  Elm+ElmFire. Contribute to ThomasWeiser/todomvc-elmfire development by creating an account on GitHub.
Visit Site

GitHub - ThomasWeiser/todomvc-elmfire: TodoMVC+Firebase  in  Elm+ElmFire

GitHub - ThomasWeiser/todomvc-elmfire: TodoMVC+Firebase in Elm+ElmFire

TodoMVC in Elm + ElmFire โ€ข Demo

TodoMVC implemented in Elm, extending Evan Czaplicki's version, using Firebase via ElmFire and elmfire-extra for storage and real-time collaboration.

Build Instructions

This app needs the Elm plattform version 0.16. Compile with:

elm make --yes --output js/elm.js src/TodoMVC.elm

Then open index.html in your browser. The app should connect to the shared Firebase and retrieve the current list of items.

Alternatively use the enclosed Makefile on Unix-like machines:

make all open

Architectural Overview

The app complies with The Elm Architecture, using evancz/start-app and evancz/elm-effects.

A sketch of the data flow:

  • Inputs are coming from
    • Firebase changes
    • user interaction
  • The model comprises two parts
    • shared persistent state, mirrored from Firebase by means of ElmFire.Dict
    • local state (filter settings, intermediate edit state)
  • An update function takes an input event and the current model, returning a new model and possibly an effect, i.e. a task to change the Firebase data (using ElmFire.Op).
  • A view function renders the current model as HTML

Please note that content changes made by the user always flow through the Firebase layer. From there they a passed down to the new model. This utilizes the fact that the Firebase library immediately reflects local writes without waiting for a server round trip.

Firebase queues up write operations during a network outage. So the app will work offline and will catch up after going online again.

For adding new items the app uses Firebase's push operation, which generates chronologically sorted unique ids. The model uses a dictionary to map these ids to the items' payload.

Future Work

  • Explore architectural variations
    • Componentize the model: split it into a shared part and a local part where the local part depends on the shared part but not the other way round.
  • Possibly structure the code into components, as outlined in The Elm Architecture.

More Resources
to explore the angular.

mail [email protected] to add your project or resources here ๐Ÿ”ฅ.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here ๐Ÿ”.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory