{"id":19733236,"url":"https://github.com/thoughtworksinc/todo","last_synced_at":"2025-07-16T14:34:40.795Z","repository":{"id":7061366,"uuid":"55963500","full_name":"ThoughtWorksInc/todo","owner":"ThoughtWorksInc","description":"Binding.scala • TodoMVC","archived":false,"fork":false,"pushed_at":"2025-04-06T00:29:20.000Z","size":21260,"stargazers_count":60,"open_issues_count":2,"forks_count":8,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-09T07:41:48.737Z","etag":null,"topics":["dom","reactive-programming","scala","scalajs","starter-kit"],"latest_commit_sha":null,"homepage":"https://thoughtworksinc.github.io/todo/","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ThoughtWorksInc.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-11T10:34:20.000Z","updated_at":"2025-03-31T00:17:05.000Z","dependencies_parsed_at":"2024-11-12T00:30:48.418Z","dependency_job_id":"1bd86769-f477-4d90-8b71-f3729ca59a11","html_url":"https://github.com/ThoughtWorksInc/todo","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/ThoughtWorksInc/todo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThoughtWorksInc%2Ftodo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThoughtWorksInc%2Ftodo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThoughtWorksInc%2Ftodo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThoughtWorksInc%2Ftodo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ThoughtWorksInc","download_url":"https://codeload.github.com/ThoughtWorksInc/todo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThoughtWorksInc%2Ftodo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265518475,"owners_count":23780967,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dom","reactive-programming","scala","scalajs","starter-kit"],"created_at":"2024-11-12T00:29:44.752Z","updated_at":"2025-07-16T14:34:40.505Z","avatar_url":"https://github.com/ThoughtWorksInc.png","language":"Scala","readme":"# Binding.scala • TodoMVC \u003ca href=\"http://thoughtworks.com/\"\u003e\u003cimg align=\"right\" src=\"https://www.thoughtworks.com/imgs/tw-logo.png\" title=\"ThoughtWorks\" height=\"15\"/\u003e\u003c/a\u003e\n\n[Binding.scala](https://github.com/ThoughtWorksInc/Binding.scala) is a data-binding framework for [Scala](http://www.scala-lang.org/), running on both JVM and [Scala.js](http://www.scala-js.org/).\n\nWhen combining with [html.scala](https://github.com/Atry/html.scala), Binding.scala can be used as a **[reactive](https://en.wikipedia.org/wiki/Reactive_programming) web framework**.\nIt enables you use native XML literal syntax to create reactive DOM nodes,\nwhich are able to automatically change whenever the data source changes.\n\nBinding.scala's TodoMVC application has the tiniest code size among all the TodoMVC implementations,\nonly one source file, 154 lines of code!\n\n## Getting Started\n\n``` scala\n/**\n * Returns a bindable HTML DOM tree.\n *\n * The `html\"\"\"...\"\"\"` interpolation enables two magics:\n *  1. HTML literals to create DOM nodes\n *  2. `xxx.bind` syntax, which makes this DOM tree keep updated whenever `xxx` changes.\n */\ndef rootView = {\n  val value = Var(\"\")\n  html\"\"\"\u003cdiv\u003e\n    \u003cinput onchange=${ (event: Event) =\u003e event.currentTarget.asInstanceOf[HTMLInputElement].value }/\u003e\n    Your input value is ${ value.bind }\n  \u003c/div\u003e\"\"\"\n}\n\n/**\n * Renders a bindable HTML DOM node into the body of current web page.\n */\n@JSExport def main(): Unit = {\n  render(document.body, rootView)\n}\n```\n\n## Instructions to build this application\n\n1. Download and install [sbt](http://www.scala-sbt.org/)\n2. Clone this repository `git clone https://github.com/ThoughtWorksInc/todo.git`\n3. Execute the shell command `sbt indexHtml` at the base directory of this code base.\n4. Open the generated `index.html` in your browser. Enjoy it! 😋\n\n## Links\n\n* [The Binding.scala Project Page](https://github.com/ThoughtWorksInc/Binding.scala)\n* [This “Binding.scala • TodoMVC” Project Page](https://github.com/ThoughtWorksInc/todo)\n* [This “Binding.scala • TodoMVC” DEMO](https://thoughtworksinc.github.io/todo)\n* [API documentation](https://javadoc.io/page/com.thoughtworks.binding/unidoc_2.11/latest/com/thoughtworks/binding/package.html)\n* [Other live DEMOs](https://thoughtworksinc.github.io/Binding.scala/)\n* [Chat on Gitter](https://gitter.im/ThoughtWorksInc/Binding.scala)\n* [html.scala](https://github.com/Atry/html.scala)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthoughtworksinc%2Ftodo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthoughtworksinc%2Ftodo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthoughtworksinc%2Ftodo/lists"}