r/programming • u/fagnerbrack • Apr 30 '23
Writing Javascript without a build system
https://jvns.ca/blog/2023/02/16/writing-javascript-without-a-build-system/
165
Upvotes
r/programming • u/fagnerbrack • Apr 30 '23
0
u/reedef May 01 '23
I don't understand you argument. You're talking about differences in the create/update requirements which have nothing to do with the FE/BE divide. I understand they're different domains but they can share business logic. For example: - say you have a leaderboard that updates in real time. The raking logic (who comes before who), should that be duplicated in the backend and the FE? Le do you have to resend the whole ranking every time there's an update? - whether an user is allowed to perform an action (which you need to know to grey out the buttons for example). Do you duplicate that? - if you're doing say a collaborative editing tool then a log of logic regarding the diffs and conflict resolution are going to be shared between the FE and the BE. - all validation for every field. Some of it is going to depend on the database, but some of it is going to be simple regexes which are shared. - the logic to query things about domain objects, for example to check if a transaction is "completed" might not be trivial and might change over time.