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

>front-end features like form generation and HTML templating were really important, but now they're arguably better to avoid.

Why is that?




It's the DRY principle. If you have a single-page app, the frontend needs to know how to render everything (using JS), so rendering on your backend as well is, at best, duplicated work. There may also be complications at the boundary of those regimes, like how your frontend initializes on top of server-rendered HTML.


At most 5% of apps should be a SPA. Seems rash to pick your only web framework on 5% of apps.


Not OP but I feel like it's because JavaScript has evolved enough that some of the niceties they offered before doesn't make sense. I like using Ember.js and doing client-side validations is pretty darn easy without complicated JS. Additionally, having inherited a legacy Rails project that uses `remote: true` in it's forms, it is causing more of a headache to fix these legacy issues.


Validating data should always be done on the server. You should never, ever, trust the client.

That's not to say you can't do (or shouldn't do) form rendering, processing, error/success handling, etc. on the client-side, but the server should always have the last word on the validity of what you send.




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

Search: