Re:A set of best practices for JavaScript projects
by Illniyar on Wednesday July 05, 2017 @08:56AM
(#14701988)
It's not a black and white thing, you can have a feature structure for your UI and services, and one folder with just the data models.
Sometimes your frameworks kinda force it on you too.
Re:A set of best practices for JavaScript projects
by nickthemagicman on Wednesday July 05, 2017 @11:47AM
(#14703364)
Wow. Came here to make this comment. It seems like the whole point of a model layer is to decouple it from the UI and the Controllers.
Colocating data logic together makes it easier to build a data model that is logical and consistent, rather than one that is coupled to UI decisions.