Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 00:18
    Onesimu opened #216
  • Sep 21 08:55
    scala-steward opened #215
  • Sep 20 11:11
    scala-steward opened #214
  • Sep 18 00:38
    scala-steward opened #213
  • Sep 15 22:41
    scala-steward opened #212
  • Sep 11 13:07
    scala-steward opened #211
  • Sep 09 16:41
    Atry added as member
  • Sep 09 16:41
    Atry added as member
  • Sep 07 08:34
    scala-steward opened #210
  • Sep 06 16:11
    tw-data-china-go-cd removed as member
  • Sep 06 16:10
    kugua456 removed as member
  • Sep 06 16:08
    Atry removed as member
  • Sep 06 16:08
    Atry removed as member
  • Sep 04 09:16

    Atry on master

    Update sbt-sonatype to 2.6 Merge pull request #209 from sc… (compare)

  • Sep 04 09:16
    Atry closed #209
  • Sep 04 09:15

    Atry on master

    Update sbt to 1.3.0 Merge pull request #208 from sc… (compare)

  • Sep 04 09:15
    Atry closed #208
  • Sep 04 06:51
    scala-steward opened #209
  • Sep 04 06:50
    scala-steward opened #208
  • Sep 01 07:21

    Atry on master

    Support xmlns Merge pull request #207 from At… (compare)

ritschwumm
@ritschwumm
@mcku i wouldn't use it - way too complicated for something you can do better in 30 lines of JS yourself.
Mustafa Kuscu
@mcku
Yes, i agree it is way too complicated. Switching to scalajs + binding.scala. Had to use typescript for client code, but can't make it fully typed without cumbersome efforts. So still runtime debugging it. Hope the new environment will help. I didn't want to go through the scalajs-react option, as react won't be necessary at all. :)
And i didn't like the paradigm to test if a button will render or not :)
Mustafa Kuscu
@mcku
Robustness is a valuable thing. I expect to become happier in the end of the day.
Mustafa Kuscu
@mcku
杨博 (Yang Bo)
@Atry
All properties defined in scala-js-dom is automatically available for XHTML literal in Binding.scala.
Other attributes can be handled in the data:prefix
@mcku If it's a missing feature in Binding.scala, feel free to create issue. If it's about the general usage of Binding.scala, feel free to ask on StackOverflow.
Mustafa Kuscu
@mcku
@mcku actually, i am not sure. i was looking at the dom.scala code at https://github.com/ThoughtWorksInc/Binding.scala/blob/11.0.x/dom/src/main/scala/com/thoughtworks/binding/dom.scala#L143. There TagsAndTags2 has the generic attributes and jsDom.Cap covers it right? but i get value aria-checked is not a member of org.scalajs.dom.html.Div error on
<div role="option" aria-checked="false"/>
tell me, issue or SO?
杨博 (Yang Bo)
@Atry
Why not both?
Mustafa Kuscu
@mcku
all right
anyway, xhtml defines the scope already :)
Mustafa Kuscu
@mcku
which excludes html5 specific stuff :/
杨博 (Yang Bo)
@Atry
Not really, there is XHTML5
Mustafa Kuscu
@mcku
is there? i thought it never existed
杨博 (Yang Bo)
@Atry
Try googling it
Mustafa Kuscu
@mcku
OK, there is XHTML5: "HTML5 and XHTML5 have identical vocabulary but different parsing rules"
Mustafa Kuscu
@mcku
ok. looks good now
杨博 (Yang Bo)
@Atry
StackOverflow + Google is brilliant. It is available to search immediately https://www.google.com/search?q=aria+binding.scala
Mustafa Kuscu
@mcku
i agree. very quick
杨博 (Yang Bo)
@Atry
Other users will benifit from that
Pascal Mengelt
@pme123
@mcku I used also in a Typescript project Redux - I created a blog with my findings - trying to adapt redux principles and ideas to the world of scala.js and Binding.scala - maybe you have some ideas;) https://pme123.github.io/scala-adapters/development/binding-scala-redux/
杨博 (Yang Bo)
@Atry

ensure that the components cannot modify the state

@pme123 What is the purpose of this rule?

杨博 (Yang Bo)
@Atry

Suppose you are creating an application for both desktop and web. You can share the same store (aka View Model) and external web services for both applications, and create different FXML template / HTML template.

However the two GUIs need some slightly different operations on View Model. Is it really necessary to share all those operations even when some of them are platform-specific?

I want to share some words from ESR's TAOUP
http://www.catb.org/esr/writings/taoup/html/ch01s06.html#id2878263

Rule of Representation: Fold knowledge into data, so program logic can be stupid and robust.

Mustafa Kuscu
@mcku
This makes me think about platforms other than HTML once again. React has React Native complement, suitable for devices implementation. I suppose FXML is for certain Java desktops. Any ideas on how to reuse the binding.scala app on the mobile in a native way?
杨博 (Yang Bo)
@Atry
The current FXML syntax shoud apply for Android as well, since Android components are JavaBeans. But I did not test it yet.
Mustafa Kuscu
@mcku
@pme123 I liked the idea of such a blog. I don't think many people are aware of such a facilitation provided by binding.scala. People still think they are type safe in typescript but the need to put extra effort to keep it type safe given the huge variety of emerging rival untyped javascript paradigms. At some point you give up type safety, at least i have that feeling.
@atry that sounds very interesting and of good utility
杨博 (Yang Bo)
@Atry
I thought it would be great to create some complex actions on stores for reusing. But I personally will not forbid to access stores directly.
杨博 (Yang Bo)
@Atry
Seperate of View Model and View could be useful or not, depends on which part tends to be changed frequently.
杨博 (Yang Bo)
@Atry

@pme123 If you like Redux's immutable store, and still want partial rendering. you can create some intermediate Bindings, which can prevent unchanged value from re-rendering

An example is here:
https://scalafiddle.io/sf/o5fWdS3/2

render2 is not triggered because store2 is unchanged.

Open your browser's inspector to see if it is re-rendered.

Mustafa Kuscu
@mcku
will look at the fxml example hopefully some day. wondering about how the dev workflow looks like. scenebuilder comes into the scene too?
杨博 (Yang Bo)
@Atry
I'm not familiar with Android. But the @fxml can mount your bindable data onto any JavaBeans.
Pascal Mengelt
@pme123
@Atry thanks for your feedback and ScalaFiddle
杨博 (Yang Bo)
@Atry
Feel free to take the fiddle to your blog
An updated version is https://scalafiddle.io/sf/o5fWdS3/3
Pascal Mengelt
@pme123
@Atry - thanks - the comments work now;) could you add your input as a comment - would be great! https://pme123.github.io/scala-adapters/development/binding-scala-redux/
Mustafa Kuscu
@mcku
What if a store has an optional substore? See: https://scalafiddle.io/sf/goKYlDa/0
杨博 (Yang Bo)
@Atry
Check your browser's inspector
Mustafa Kuscu
@mcku
isn't it working?
Kahli Burke
@kahliburke
Check the stackoverflow
Pascal Mengelt
@pme123
@kahliburke thanks - that helps - I updated the ScalaFiddle to see the effect.
Leonid Turnaev
@glmars
@Atry do you have any plans to migrate Binding.scala to Dsl.scala and Cats?
Do I understand correctly what it is possible? How hard is it in you opinion (may be PR can help)?
杨博 (Yang Bo)
@Atry

It could be.

But I did not see enough benifits.

Lorenzo Gabriele
@lolgab
There are ways to get the value of an input (like the inputId.value thing ) for dynamic elements (like a Seq of inputs) ? (The id is not fixed at compile time)
If it is a interesting question I can post it on StackOverflow.