← Back to context

Comment by xutopia

4 years ago

I don't get that push to put so much logic in the frontend. Connections are getting faster and if we load only smaller amounts of data in each request we can have a really great experience without the hassle of all this complexity.

A couple reasons I can think of: - The less logic you do on the client means more data required to be sent over the wire. - Connections are getting faster but we aren't at the point where they're negligible.

For example, if I need to do complex form validation in real time I could send the form value to the backend, have it validate, and receive a response which introduces a lot potential of failure points. Alternatively I could write some logic on the frontend to validate, and this problem expands as the amount of fields in your form increases.

  • I'm just starting out in the journey of front-end development as a hobby and have been doing server-side infrastructure automation for my career for almost a decade now - so please bear that in mind with might seem like an ignorant question.

    Let's say I have the client-side pick up the bill for logic/computing for form validation. Now for security reasons would I also want validation on the server-side as well due to the fact that client-side JavaScript can be manipulated? Or am I totally off-base in this line of thinking.

    I'm personally opposed to how much logic happens on the client-side but I'm open to having conversation and changing my opinion on that.

  • I distinctly recall using a vendor's demo in a no-nonsense show-me-the-money kind of industry, about 4 years back. It was something that would definitely have been built as a "web app" at most shops I've known since, oh, 2012 or 2013.

    It was remarkably responsive, fast, and light. Everyone who used it commented on how snappy it was.

    It was PHP, doing full-page reloads on damn near every interaction, with minimal Javascript.