All Projects → ThomasWeiser → todomvc-elmfire

ThomasWeiser / todomvc-elmfire

Licence: BSD-3-Clause license
TodoMVC+Firebase in Elm+ElmFire

Programming Languages

elm
856 projects
CSS
56736 projects
Makefile
30231 projects
HTML
75241 projects

Projects that are alternatives of or similar to todomvc-elmfire

Deep Microservices Todomvc
Todo Microservice is built on top of DEEP Framework using Microservices Architecture
Stars: ✭ 44 (-25.42%)
Mutual labels:  todomvc
Angular2 Esnext Todomvc
Angular TodoMVC application in Javascript (ES6/ES7).
Stars: ✭ 132 (+123.73%)
Mutual labels:  todomvc
Javascript Todo List Tutorial
✅ A step-by-step complete beginner example/tutorial for building a Todo List App (TodoMVC) from scratch in JavaScript following Test Driven Development (TDD) best practice. 🌱
Stars: ✭ 212 (+259.32%)
Mutual labels:  todomvc
React Redux Typescript Boilerplate
A bare minimum frontend boilerplate with React 16, Typescript 3 and Webpack 4
Stars: ✭ 1,100 (+1764.41%)
Mutual labels:  todomvc
Preact Todomvc
💣 TodoMVC done in Preact. Under 6kb and fast.
Stars: ✭ 88 (+49.15%)
Mutual labels:  todomvc
Todomvc
Nuxt.js TodoMVC Example
Stars: ✭ 136 (+130.51%)
Mutual labels:  todomvc
Simple Todo With React And
📝 a simple react demo to learn flux/reflux/redux
Stars: ✭ 29 (-50.85%)
Mutual labels:  todomvc
todomvc-nix
Example on how to nixify a project [maintainer=@Rizary]
Stars: ✭ 138 (+133.9%)
Mutual labels:  todomvc
Golang Gin Realworld Example App
Exemplary real world application built with Golang + Gin
Stars: ✭ 1,780 (+2916.95%)
Mutual labels:  todomvc
React Cordova Boilerplate
TodoMVC example for react with development tools to build a cordova application
Stars: ✭ 206 (+249.15%)
Mutual labels:  todomvc
Egghead react todo app course
Source code for eggheadio Build Your First Production Quality React App course
Stars: ✭ 64 (+8.47%)
Mutual labels:  todomvc
Elmctron
Elm meets Electron
Stars: ✭ 86 (+45.76%)
Mutual labels:  todomvc
Cypress Example Todomvc
The official TodoMVC tests written in Cypress.
Stars: ✭ 143 (+142.37%)
Mutual labels:  todomvc
Purescript React Basic Todomvc
TodoMVC with purescript-react-basic
Stars: ✭ 47 (-20.34%)
Mutual labels:  todomvc
todomvc-vue
TodoMVC built with Vue and Vuex
Stars: ✭ 28 (-52.54%)
Mutual labels:  todomvc
Todomvc Wasm
A TODO MVC implementation using web-sys to make WASM
Stars: ✭ 44 (-25.42%)
Mutual labels:  todomvc
Todomvc Ddd Cqrs Eventsourcing
Implementation of basic Todo app via tastejs/todomvc in C#/Typescript with eventsourcing, cqrs, and domain driven design
Stars: ✭ 134 (+127.12%)
Mutual labels:  todomvc
stimulus reflex todomvc
An implementation of TodoMVC using Ruby on Rails, StimulusJS, and StimulusReflex
Stars: ✭ 50 (-15.25%)
Mutual labels:  todomvc
mvc-todo
A haskell implementation of todoMVC
Stars: ✭ 26 (-55.93%)
Mutual labels:  todomvc
Todomvc App Css
CSS for TodoMVC apps
Stars: ✭ 160 (+171.19%)
Mutual labels:  todomvc

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.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].