↓ Ir para o conteúdo principal

← todas as notas

📎 Webclip

How to write a login form that doesn't suck, using Ember.js

The post argues that Ember.js should be used to improve user experience, not because it is trendy or fast for its own sake. It uses a login form to show how the interface can communicate failure, processing, and slow network requests.

Reading notes
#

  • Ember makes it easy to build a login form, but the point is to improve UX rather than chase the framework itself.
  • A simple flash message can show invalid username or password when the login request fails.
  • The controller should clear the error state and mark the form as processing when a new login request starts.
  • The submit button is disabled while the request is being processed.
  • If the request takes more than five seconds, the controller sets a slow-connection flag and the template shows an informational message.
  • The code is refactored into separate success, failure, slowConnection, and reset methods.
  • The article says these indicators matter because AJAX removes the normal page-submission progress feedback users would otherwise see.
  • It argues against showing a loading indicator for every request, because that can distract from a single-page application.