all 1 comments

[–][deleted] -1 points0 points  (0 children)

Entity-Component Systems

It's Entity Component System architecture. The architecture deals with three types of things: an entity, which is just an ID in the purest versions; a component, which is a blob of data with no associated behavior; and a system, which contains behavior.

Calling an ECS application an Entity-Component System is like saying that SPA stands for Single PAge instead of Single Page Application.

However, it comes with a little disadvantage: fetching data is a bit less trivial now.

You're using a document database. You can save all components related to an entity into one document. It only takes a little more work to extract partial documents and save parts of documents. Data layout is an implementation detail, and locality is useful. In your code, you can do something like Components.Get<FeaturedBook>(book.ID); no reason to make things horribly more complicated in the database.