R
R
r1ch2016-02-05 15:04:05
JavaScript
r1ch, 2016-02-05 15:04:05

Process of writing custom UI components with Backbone.js?

App Type: SPA
Libraries: RequireJS, RequireJS text plugin, backbone, jquery, bootstrap, backgrid.
REST API: django-rest-framework
Authentication: JWT token, which is added to headers in Backbone.sync and stored in a cookie.
Task access point:
GET POST /api/task
PUT PATCH DELETE /api/task/{id}

{
    "id": 54,
    "url": "http://localhost:8000/api/task/54",
    "base_task": null,
    "title": "At vero eos et accusamus",
    "text": "iusto odio dignissimos ducimus qui blanditiis praesentium ",
    "created_date": "2016-01-19T09:55:21.207730",
    "priority": 0,
    "status": 0,
    "project": 2,
    "owner": 8,
    "responsible": 1,
    "project_name": "Проект 1",
    "owner_name": "user5",
    "responsible_name": "admin",
    "base_task_name": null,
    "put_method_allowed": true,
    "delete_method_allowed": true,
    "status_type": true
}

Now there is already a working version on the client, but without validation, normal structure.
The status, priority, base_task, responsible fields are presented as a select tag, but the number of these objects can be large (I thought to use select2 plus filters in get parameters), how best to pack them into views and use them in the task view.
Preferably without backbone plugins.

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