M
M
Mikhail2017-02-09 12:00:44
JavaScript
Mikhail, 2017-02-09 12:00:44

How and where is it better to store the behavior of objects in a js (jquery) web application?

Good day. There is a form with several objects on it, each object has its own default behavior. Tell me the correct architecture of such an application, where there are "modals", "submodals" in submission and "defaults" with objects (html5 components in emulation).
It is necessary that each object knows what to do, for example: The table
[a] object (table) has the following behavior by default:
its data (table redrawing).
You can do this in the form of events, but unfortunately you need to parse the "habits" of objects in the form of object functions.
For the first time I am doing such a complex (for me) architecture in understanding, I sit at night and rack my brains, I ask the bright minds of Toaster for help in my question.

Now I store data in a temporary object, but the most important issue is the distribution of events.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question