D
D
Dmitry Fedorenko2014-10-23 14:14:20
JavaScript
Dmitry Fedorenko, 2014-10-23 14:14:20

What to use for two way mapping javascript ajax(json) response to form fields?

Good afternoon, dear experts and just interested.
I am a Java developer and have tried a lot of interesting mvc frameworks with which it is convenient to transfer and receive data to the form/server.

Now I decided to try to write only the server part in java and send it to pages using json services.
Given
Form fields: colorPicker and 3 text input fields and a radiobutton.
After building the tree, the web service twitches and in response we get a json set from someone with identifiers the same as the identifiers of the fields on the form.
Question
How, with the help of which framework, you can bind the response from the service (json object) to the form fields - so that when the form fields change, the object also changes? Also in reverse.

Options such as throwing hands around the switchcase, writing your own framework or using a bulky framework in which you still map everything with your hands, please do not offer. (I watched matryoshka and dot.js and some other things didn’t work yet)
----------UPDATE------
The list turned out:

  • Knockout.js
  • rivets.js
  • ractive.js
  • angular
  • angular light
  • https://github.com/gwendall/way.js


I myself looked at Knockout then looked at a bit of AngularJS then
read AngularJS vs. KnockoutJS and Key difference between AngularJS and Knockout .
As a result, the choice fell on AngularJS.
Despite the fact that in AngularJS the entry threshold is higher.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
M
mayorovp, 2014-10-23
@mayorovp

Add to the list: angular, angular light

B
bromzh, 2014-10-23
@bromzh

I did this through Knockout.js. Ajax requests themselves through jquery.

K
Konstantin Kitmanov, 2014-10-23
@k12th

rivets.js, ractive.js, the above knockout... Keyword is 2-way binding.

A
Alexander Taratin, 2014-10-23
@Taraflex

https://github.com/gwendall/way.js

R
Rustamka Vorontsov, 2014-10-23
@rmfordev

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question