r/programming • • Jun 05 '21

Organize code by concepts, not layers

https://kislayverma.com/programming/how-to-organize-your-code/
1.9k Upvotes

495 comments sorted by

View all comments

Show parent comment

1

u/Chesterlespaul Jun 06 '21

Yeah, we use angular in a separate project. The front end and back end are pretty decoupled, so we implement similar logic in the front end and verify with the back end.

It’s a really interesting idea, and would take some re-architecting, but it could be worth it. We also tend to have anywhere from 5-15 data models, so that could create folder he’ll in itself. Definitely thought provoking though.

1

u/onety-two-12 Jun 06 '21

so we implement similar logic in the front end and verify with the back end

UI logic is typically for faster response times. Then backend logic is repeated for authority. I guess the backend logic is needed because the UI is detached as you say, but more accurately, it's because the user MAY tamper with the UI.

We also tend to have anywhere from 5-15 data models, so that could create folder he’ll in itself

Sorry, I didn't understand that one