Hacker News new | ask | show | jobs
by vortico 3814 days ago
Keep doing what you're doing with the frontend. (Although you're free to use modern backends.) The web today is a horrible mess of slow garbage expanding around the content that matters. Forms should POST directly to a URL when submitted, all content should be generated by the backend and served upon a GET request. Javascript should be used for form validation, interactive elements like OpenStreetMaps, but nothing else. Modern CSS is great, but designers abuse heavy features when they lose track of the purpose of a website: to serve content to your eyes and to allow the user to navigate with hyperlinks.
2 comments

"Javascript should be used for form validation, interactive elements like OpenStreetMaps, but nothing else"

Not if you want to get hired. We've moved on from that simple model. I don't like it either but ignoring the fact that things are changing is a good way to end up unemployed.

That's true I suppose, since I develop primarily for fun. But promoting this minimal/ideal state of web development can only improve the experience of users. The excitement of using bloated web frameworks might help your startup, but when it seeps into well-designed free software made by the consumer for the consumer, it hurts the product.
"Javascript should be used for form validation."

Just to be clear and ensure everyone else understands. Javascript should validate input syntax and make decisions that don't need to be forced onto users. As an example, validate a credit-card matches mod 10 and automatically recognize if it's Visa, Mastercard, etc. Nothing drives me nuts like messing up my card-number only to have to go through an entire HTTP request & response cycle to find out.

What we don't want developers to do is ONLY validate client-side lest they open their back-end to injection vulnerabilities like XSS, SQLi, and CMDi or even name your own price vulnerabilities like we saw early on in the ecommerce space.

Right, actual form validation for security should of course be done on the server to clear up potential confusion.

Form check-pointing is another good example of Javascript use. It has never bothered anyone that a webpage is saving your form on the client or server in the background.