↓ Ir para o conteúdo principal

← todas as notas

📎 Webclip

How to build complex user interfaces without going completely insane

The article argues that complex UIs become easier to manage when temporary edits stay in component state until the user saves them, so the application state only changes after confirmation. It also says business data and UI state should remain separate, with validation logic living in the model rather than in view code.

Reading notes
#

  • Keep temporary edits in a component’s internal state and update the application state only when the user presses Save.
  • This approach lets the dialog be discarded without changing the stored record and can avoid exposing temporary values to other users.
  • Keep model data and UI-related data separate instead of mixing business logic into view components.
  • Put rules such as whether a task can be saved into the model, then use that model method in the view.
  • Prefer integration testing over unit testing when choosing how to test features in a complex web app.
  • For bugs, write a failing test first, fix the code, and then verify that the test no longer fails.