Хабр Курсы для всех
РЕКЛАМА
Практикум, Хекслет, SkyPro, авторские курсы — собрали всех и попросили скидки. Осталось выбрать!
Different implementations of the Model-View-Controller pattern tend to disagree about the definition of a controller. If it helps any, in Backbone, the View class can also be thought of as a kind of controller, dispatching events that originate from the UI, with the HTML template serving as the true view. We call it a View because it represents a logical chunk of UI, responsible for the contents of a single DOM element.
Если статья окажется интересной сообществу, напишу продолжение, с примерами
Модели будут знать URL, куда слать GET, POST, PUT и DELETE
# PATCH/PUT /posts/1
def update
if @post.update(post_params)
redirect_to @post, notice: 'Post was successfully updated.'
else
render action: 'edit'
end
end
Для сущностей с действительно большими полями (сотни кб текста) лучше будет отправлять дельту изменений, хотя это то еще специфичное и на любителя решение.
Я думаю, что этот индикатор работает так: в document.ready() вы сделали таймер и раз в 60 секунд запрашиваете адрес вроде /api/v1/kolichestvo_zakazov.
O Backbone.js очень просто и кратко для любителей MVC-фреймворков