Angular Reactive Form or Template Driven Form for simple form but simultaneous users of same data?

127 Views Asked by At

I need a simple form but with 2+ users viewing the same form and altering the data. E.g., multiple users can pick items from a list of 100 fixed items. The item will no longer be available to other users once any user chooses that item and all users should be able to see which items have already been chosen.

The result will have all items assigned to the individual users such that items 1, 3, & 4 may belong to User1 and Items 2, 9, & 20 may belong to User 2, etc. until all items are chosen.

The reality of course may be that most of the time only one user is accessing the data form at a time and only for a short period of time since the users choices will be simple and fast and the choices get narrowed down to the remaining items.

Different user groups will be using the form with their specific items only. I.e., Group A has a form of 100 items to choose, Group B has a form of 100 items to choose, etc.

I'm learning Angular 7 and plan to use that version.

It appears to me that immutability and observable streams are important and therefore Reactive may be the best choice. Is that correct?

1

There are 1 best solutions below

0
On

Template Driven Forms Features

  1. Easy to use
  2. Suitable for simple scenarios and fails for complex scenarios
  3. Two-way data binding(using [(NgModel)] syntax)

Reactive Forms Features

  1. More flexible, but needs a lot of practice
  2. Handles any complex scenarios
  3. No data binding is done (immutable data model preferred by most developers)
  4. Easier unit testing

I have used both, personally, I prefer Reactive forms over template driven forms.