FastUI icon indicating copy to clipboard operation
FastUI copied to clipboard

View models vs Data models best practices and features

Open jimkring opened this issue 1 year ago • 0 comments

I think there’s a tension right now between a custom RowModel to serve as a view in tables/lists and using the columns: list[DisplayModel] to select which data to display.

(See #86 for a good example of this tension)

From a maintainability perspective, I find that having a “View” Model for each type of view into my DataModel works very well (e.g. RowView and DetailView).

Conversely, I have found the columns: list[DisplayModel] approach feels like a lot of boilerplate and harder to maintain.

I’m not sure the best answer/approach, yet it seems there’s room for enhancements to FastUIs components, base classes, and/or documented best practices.

jimkring avatar Jun 01 '24 04:06 jimkring