paint-brush
Do We Really Need to Separate the Model from the UI? TLDR: No.by@mvila
674 reads
674 reads

Do We Really Need to Separate the Model from the UI? TLDR: No.

by Manuel Vila4mNovember 22nd, 2019
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Typically, domain models and UI views are completely separated. But now that we have functional UI libraries (e.g., React with hooks), wouldn't it be possible to gather everything together, and implement the views as methods of the models they represent? We would separate the view from the model like the following: To render a UserView, we would do: The more verbose approach brings benefits? No matter how much I scratch my head, I don't see any. The code is just more scattered, but logically, it is not.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - Do We Really Need to Separate the Model from the UI? TLDR: No.
Manuel Vila HackerNoon profile picture
Manuel Vila

Manuel Vila

@mvila

Peace, Love & Software

About @mvila
LEARN MORE ABOUT @MVILA'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Manuel Vila HackerNoon profile picture
Manuel Vila@mvila
Peace, Love & Software

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite