Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: Improve UX #1

Open
jollen opened this issue Nov 16, 2014 · 0 comments
Open

Refactor: Improve UX #1

jollen opened this issue Nov 16, 2014 · 0 comments

Comments

@jollen
Copy link
Member

jollen commented Nov 16, 2014

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 %>)
  <% }); %>
@jollen jollen changed the title Refactor: reduce callings of REST API Refactor: Improve UX Nov 16, 2014
jollen added a commit that referenced this issue Nov 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant