# Binding.scala [![Production Ready](https://img.shields.io/badge/%F0%9F%91%8C-Production%20Ready-00ddcc.svg)](https://github.com/search?l=Scala&o=desc&q="com.thoughtworks.binding"&s=indexed&type=Code&utf8=✓) [![Extremely Lightweight](https://img.shields.io/badge/%F0%9F%A6%8B-Extremely%20Lightweight-7799cc.svg)](http://todomvc.com/examples/binding-scala/) [![Join the chat at https://gitter.im/ThoughtWorksInc/Binding.scala](https://badges.gitter.im/ThoughtWorksInc/Binding.scala.svg)](https://gitter.im/ThoughtWorksInc/Binding.scala?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![StackOverflow](https://img.shields.io/stackexchange/stackoverflow/t/binding.scala.svg?label=StackOverflow+questions)](https://stackoverflow.com/questions/tagged/binding.scala?sort=votes) [![Scala CI](https://github.com/ThoughtWorksInc/Binding.scala/actions/workflows/scala.yml/badge.svg)](https://github.com/ThoughtWorksInc/Binding.scala/actions/workflows/scala.yml) [![Scaladoc](https://javadoc.io/badge/com.thoughtworks.binding/binding_2.13.svg?label=scaladoc)](https://javadoc.io/page/com.thoughtworks.binding/binding_2.13/latest/com/thoughtworks/binding/index.html) [![Latest version](https://index.scala-lang.org/thoughtworksinc/Binding.scala/latest.svg)](https://index.scala-lang.org/thoughtworksinc/binding.scala) *Binding.scala** is a data-binding library for [Scala](http://www.scala-lang.org/), running on both JVM and [Scala.js](http://www.scala-js.org/). Binding.scala can be used as the basis of UI frameworks, however latest Binding.scala 12.x does not contain any build-in UI frameworks any more. For creating reactive HTML UI, you may want to check out [html.scala](https://github.com/Atry/html.scala), which is an UI framework based on Binding.scala, and it is also the successor of previously built-in [dom](https://javadoc.io/page/com.thoughtworks.binding/dom_sjs0.6_2.12/latest/com/thoughtworks/binding/dom.html) library. See [Binding.scala • TodoMVC](http://todomvc.com/examples/binding-scala/) or [ScalaFiddle DEMOs](https://github.com/ThoughtWorksInc/Binding.scala/wiki/ScalaFiddle-DEMOs) as examples for common tasks when working with Binding.scala. ## Comparison to other reactive web frameworks Binding.scala and html.scala has more features and less concepts than other reactive web frameworks like [ReactJS](https://facebook.github.io/react/).
Binding.scala | ReactJS | |
---|---|---|
Support HTML literal? | Yes | Partially supported. Regular HTML does not compile, unless developers manually replaces class and for attributes to className and htmlFor , and manually converts inline style s from CSS syntax to JSON syntax. |
Algorithm to update DOM | Precise data-binding, which is faster than virtual DOM | Virtual DOM differentiation, which requires manually managed key attributes for complicated DOM. |
Lifecycle management for data-binding expressions | Automatically | N/A |
Statically type checking | Yes, even for HTML tags and attribues | No |
Learning curve | Always easy | Easy to start. Requires much more efforts to understand its corner cases. |
# Binding.scala [![Production Ready](https://img.shields.io/badge/%F0%9F%91%8C-Production%20Ready-00ddcc.svg)](https://github.com/search?l=Scala&o=desc&q="com.thoughtworks.binding"&s=indexed&type=Code&utf8=✓) [![Extremely Lightweight](https://img.shields.io/badge/%F0%9F%A6%8B-Extremely%20Lightweight-7799cc.svg)](http://todomvc.com/examples/binding-scala/) [![Join the chat at https://gitter.im/ThoughtWorksInc/Binding.scala](https://badges.gitter.im/ThoughtWorksInc/Binding.scala.svg)](https://gitter.im/ThoughtWorksInc/Binding.scala?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![StackOverflow](https://img.shields.io/stackexchange/stackoverflow/t/binding.scala.svg?label=StackOverflow+questions)](https://stackoverflow.com/questions/tagged/binding.scala?sort=votes) [![Scala CI](https://github.com/ThoughtWorksInc/Binding.scala/actions/workflows/scala.yml/badge.svg)](https://github.com/ThoughtWorksInc/Binding.scala/actions/workflows/scala.yml) [![Scaladoc](https://javadoc.io/badge/com.thoughtworks.binding/binding_2.13.svg?label=scaladoc)](https://javadoc.io/page/com.thoughtworks.binding/binding_2.13/latest/com/thoughtworks/binding/index.html) [![Latest version](https://index.scala-lang.org/thoughtworksinc/Binding.scala/latest.svg)](https://index.scala-lang.org/thoughtworksinc/binding.scala) *Binding.scala** is a data-binding library for [Scala](http://www.scala-lang.org/), running on both JVM and [Scala.js](http://www.scala-js.org/). Binding.scala can be used as the basis of UI frameworks, however latest Binding.scala 12.x does not contain any build-in UI frameworks any more. For creating reactive HTML UI, you may want to check out [html.scala](https://github.com/Atry/html.scala), which is an UI framework based on Binding.scala, and it is also the successor of previously built-in [dom](https://javadoc.io/page/com.thoughtworks.binding/dom_sjs0.6_2.12/latest/com/thoughtworks/binding/dom.html) library. See [Binding.scala • TodoMVC](http://todomvc.com/examples/binding-scala/) or [ScalaFiddle DEMOs](https://github.com/ThoughtWorksInc/Binding.scala/wiki/ScalaFiddle-DEMOs) as examples for common tasks when working with Binding.scala. ## Comparison to other reactive web frameworks Binding.scala and html.scala has more features and less concepts than other reactive web frameworks like [ReactJS](https://facebook.github.io/react/).
class
andfor
attributes toclassName
andhtmlFor
, and manually converts inlinestyle
s from CSS syntax to JSON syntax.key
attributes for complicated DOM.