Skip to content

Refactor: Improve UX #1

@jollen

Description

@jollen

Agenda

  • 採取預先下載(Pre-fetch)機制
  • 減少不必要的 REST API 呼叫

Legacy

  • Step 1: User presses one data filter button
  • Step 2: Backbone invokes REST API
  • Step 3: Backbone updates model state
  • Step 4: Backbone updates view
  • Goto Step 1

Optimized Scenario

  • Pre-fetch all (or partial) data and store data in-browser
  • Filter data by CSS (hide and unhide)

Use data-* attribute

ul
  <% _.each(users, function(user) { %>
  li(data-tag='user', data-age!='<%= user.Age %>') <%= user.Name %> (Age: <%= user.Age %>)
  <% }); %>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions