3 ms·
> Consider for example needing to make a change to a view but your existing view has tons of data access logic embedded right in it. You can separate these out
by kfajdsl 5y ago
> Consider for example needing to make a change to a view but your existing view has tons of data access logic embedded right in it.
You can separate these out. Treat public functions from your data/business logic layer as if they were an API in terms of organization. Your views shouldn't be doing any logic, they should be dumb. Overall, we've found switching to a MVC framework for new applications (React/Express -> Phoenix) has increased productivity a lot, especially with a tiny team.
Then again, I'm pretty green, so if there are cases where that kind of separation isn't possible, please let me know!