How atomic * should * create an Ajax form?

I have some web forms that I encounter with AJAX, and when I was dealing with the database on the back panel, I thought it would be easier to just process each input in the form atomically using AJAX, keeping the form real-time time when the user edits it. Forms are 20 fields of administrative settings.

Could this create massive overhead with the application, make it prone to errors, or is this an acceptable idea? Of course, contingent operations (for example, a flag that requires a text entry) will be held until the text field receives and loses focus.

Comments?

+4
source share
2 answers

Obviously, this would lead to a lot more HTTP requests that were made to save user data, as well as a lot more updates to your database. Thus, this approach is definitely more expensive than one gift. Regardless of whether it is overly related to the loading of your server.

The biggest difficulty for me is that users are trained to expect forms to save data only when they click submit. There will be certain work that you will need to do to make it obvious to them that you automatically keep your input. Some users may be concerned about the lack of a “save” button, while others may complain that they started editing their data, but then changed their minds and now their partially complete data inexplicably overwritten their old data.

I tend to see it as a bigger problem than it costs. But others may weigh these things differently.

+2
source

Too complicated. A well-located Save button will work great for all users and will be more convenient. Not to mention that it will save you (coding) and your server (bandwidth) most of the work.

+1
source

Source: https://habr.com/ru/post/1307729/


All Articles