Example Design of a Feature

Learn about the design feature of editing the widget in our Rails application.

Requirements for editing a widget

Suppose we are building a feature to edit widgets. Here is a rough outline of the requirements around how it should work:

  1. A user views a form where they can edit a widget’s metadata.
  2. The user submits the form with a validation error.
  3. The form is rerendered, showing their errors.
  4. The user corrects the error and submits the edit again.
  5. The system then updates the database.
  6. When the widget is updated, two things have to happen:
    • Depending on the widget’s manufacturer, we need to notify an admin to approve the changes.
    • If the widget is of a particular type, we must update an inventory table used for reporting.
  7. The user sees a result
...

Get hands-on with 1400+ tech skills courses.