Hacker News new | past | comments | ask | show | jobs | submit login

Templates need some level of logic, yes. Putting the entirety of the business logic in your templates is not only bad, but dangerous. Because unless you're replicating your business logic in your non-template code, I can change things in the DOM, and potentially corrupt the system.

Unless I completely miss the boat about how Angular/React/Vue/etc are supposed to be used. I only know from my previous years of seeing it done in the way I mentioned above, and every time, the work always ended up duplicated in the non-template code.




What's your definition of business logic?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: