The replacement of the old MVC system was started. Progress can be checked on feat/mvc-replace-dsl branch.
Blockages
While its technicaly very possibe to replace all old functionality with the new Binding DSL it is very cumbersome.
The amount of code needed to do binder.biBind("property",component::setVal,component::getVal) is like ~3 times the characters.
Before the whole MVC system is replaced a solution should be found so that the MVC system doesn't needs to be rewritten a seccond time.
TODO
Replacement
[x] Remove old MVC components
[x] Remove unneeded examples
[x] Update usefull examples
[x] Add DSL components as replacement
[x] Test components
General Improvements
[x] offer common conversions (String,Int,Byte etc.) -> .withInt() (or possibly even withInt().fromString(source))
[x] remove unneded .on(modelChange)/.from(modelChange in createBindings
[x] (optional) shorten / add short wrapper for binder.newBinding
Or
[x] Add overall optional shorthand (binder.bind(Person::getAge,ageInput::setText,Integer::toString)) - optional in the sense that the DSL should still be fully accessible
Progress
The replacement of the old MVC system was started. Progress can be checked on
feat/mvc-replace-dsl
branch.Blockages
While its technicaly very possibe to replace all old functionality with the new Binding DSL it is very cumbersome. The amount of code needed to do
binder.biBind("property",component::setVal,component::getVal)
is like ~3 times the characters.Before the whole MVC system is replaced a solution should be found so that the MVC system doesn't needs to be rewritten a seccond time.
TODO
Replacement
General Improvements
.withInt()
(or possibly evenwithInt().fromString(source)
)call(Person::setGender).withCasted(comboBox::getSelectedItem)
)Minification
.on(modelChange)
/.from(modelChange
increateBindings
binder.newBinding
Or
binder.bind(Person::getAge,ageInput::setText,Integer::toString)
) - optional in the sense that the DSL should still be fully accessibleOriginally posted by @nbrugger-tgm in https://github.com/nbrugger-tgm/reactj/issues/49#issuecomment-945280768