Sending Only the Data a Component Needs

A narrow interface can pass the fields needed for a feature without copying unrelated personal data or internal state.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. Trace a public index
  2. Check future schema changes

Trace a public index

A list of articles needs titles, summaries, and public routes. It may have no need for internal review notes. Record fields let each representation declare what it carries.

Check future schema changes

A serializer that sends all model fields can inadvertently include a new field when the model expands. Define the output explicitly and test its postconditions with invented data.[1]

References

  1. NIST SP 800-218, Secure Software Development Framework ↩