These are chat archives for ThoughtWorksInc/Binding.scala

27th
Apr 2016
Justin Maat
@jxm262
Apr 27 2016 16:56
Hi :) Sorry for the very noob question, I’m still learning Scala.js
From what I can tell, I should be able to integrate this Binding.scala project into Diode as the view layer, correct? https://github.com/ochrons/diode
杨博 (Yang Bo)
@Atry
Apr 27 2016 16:58
I don't know.
Maybe
Justin Maat
@jxm262
Apr 27 2016 17:00
yeah, i’m trying to figure out how to connect the views. Ok i’ll give it a shot and try to make a sample repo
Do you have any advice on how to implement a router for this? Say as an SPA application?
Similar to how react has react-router?
杨博 (Yang Bo)
@Atry
Apr 27 2016 17:01
What I can tell is that Binding.scala is designed to work with mutable model and mutable mount point (e.g. DOM)
While the calculation between model and mount point shoul
should be pure
No need for a router library. Instead, simply matching the hash should work
Justin Maat
@jxm262
Apr 27 2016 17:04
Ok sure, I’ll give this a try. I think it should work out nicely from what I can tell. I like this implementation more than react , at least that’s my initial thought
杨博 (Yang Bo)
@Atry
Apr 27 2016 17:05
See the Binding.scala's todomvc example
Justin Maat
@jxm262
Apr 27 2016 17:05
yes, but typically their is considerations like browser history, etc..
ok i see the section now your’re referring to.
thanks!
杨博 (Yang Bo)
@Atry
Apr 27 2016 17:06
A very thin layer(no more than 20 loc) for HTML 5 URL rewritting maybe useful
Justin Maat
@jxm262
Apr 27 2016 17:07
yeah, let me fully grok this project first :) I’m sure i’ll have more questions and possibly contributions.
this library seems very simple , unlike some of the others
杨博 (Yang Bo)
@Atry
Apr 27 2016 17:08
Enjoy it!