logo
episode-header-image
Nov 2020
21m 25s

Hasty Treat - Client vs Server Data Vali...

Wes Bos & Scott Tolinski - Full Stack Javascript Web Developers
About this episode

In this Hasty Treat, Scott and Wes talk about client- and server-side validation, and what each is used for!

Netlify - Sponsor

Netlify is the best way to deploy and host a front-end website. All the features developers need right out of the box: Global CDN, Continuous Deployment, one click HTTPS and more. Hit up netlify.com/syntax for more info.

Show Notes

02:49 - Wes’ story

06:28 - What is the role of client-side validation?

  • Help the user input the correct data as they type it.
  • Show correct data in UI.
  • Show correct UI.
  • Just about all of these things are for the user’s benefit, and how they feel when using the site.

11:10 - What is the role of server-side validation?

  • Validate that all the data is correct before it’s saved to the database
  • Security first and foremost

15:03 - What process should a store follow to validate on the server?

  1. Check that correct types are coming in. Very easy with Graphql.
  2. Get current stock and price information from unique ids from the database.
  3. Confirm that this information is what the user is expecting — if the UI said the user will be charged $40, don’t charge them $50 just because of the updated info. In that case, send back to the user.

17:17 - What do you do if you don’t want people messing with your React state?

  • @fvilers/disable-react-devtools
  • if (process.env.NODE_ENV === 'production') disableReactDevTools()
  • We do this on LUT. Why? Because it’s a deterrent.

Links

Tweet us your tasty treats!

Up next
Jul 9
918: Extreme Native Perf on the Web with Superhuman
Wes and Scott talk with Loïc Houssier about how Superhuman builds lightning-fast, delightfully-designed email software. They dig into engineering philosophy, offline-first architecture, local databases, AI-powered productivity, and what it takes to create tools that people love. ... Show More
48m 54s
Jul 7
917: AI Tools You Should Know
Scott and Wes round up the hottest AI tools you should have on your radar; from text-to-speech wizards to self-hosted image generators. They break down what they’re using, what’s worth paying for, and which tools are changing their workflows. Show Notes 00:00 Welcome to Syntax! 0 ... Show More
37m 48s
Jul 2
916: I got fired, what should I focus on?
In this potluck episode of Syntax, Wes and Scott answer your questions about maintaining popular open-source projects, where to start after a layoff, impostor syndrome, Scott’s recording setup, whether a computer science degree is still worth it in the age of AI, and more! Show N ... Show More
58m 24s
Recommended Episodes
Aug 2022
Tech job interview support group
Struggling through the tech job interview process? We feel you! On this episode, Amal, Nick & Amelia get together to discuss the various ways the interview process disappoints, share their own interview stories, and suggest ways we can improve the process for everyone. Discuss on ... Show More
1h 4m
Apr 2018
The state of Node security (JS Party #23)
Suz Hinton, Christopher Hiller, and Jerod Santo talk with Adam Baldwin about his company being acquired by NPM, the security of Node, best practices, and more. Discuss on Changelog News Changelog++ members support our work, get closer to the metal, and make the ads disappear. Joi ... Show More
54m 51s
Sep 2022
The spicy React debate show 🌶️
We’re back with another spicy YepNope debate! This time, Amelia and KBall are arguing that there’s real value to (continue) using React in 2022, while Amal and special guest (and author of the post which stemmed the whole debate) Josh Collinsworth argue that React’s time leading ... Show More
1h 3m
May 2022
Unlocking The Value Of Data Across The Organization Through User Friendly Data Tools With Prophecy
Summary The interfaces and design cues that a tool offers can have a massive impact on who is able to use it and the tasks that they are able to perform. With an eye to making data workflows more accessible to everyone in an organization Raj Bains and his team at Prophecy designe ... Show More
1h 10m
Jun 2022
Simplify Data Security For Sensitive Information With The Skyflow Data Privacy Vault
Summary The best way to make sure that you don’t leak sensitive data is to never have it in the first place. The team at Skyflow decided that the second best way is to build a storage system dedicated to securely managing your sensitive information and making it easy to integrate ... Show More
54m 5s
Aug 2022
Qwik is a new kind of web framework
AngularJS creator Miško Hevery has a new web framework he wants to tell us about, but he’s not pitching just another framework, but with different DX. He says that Qwik is a fundamental rethinking of how a web application should work. And he’s here to convince Jerod & KBall that ... Show More
1h 2m
Apr 2022
Postgres.js (JS Party #221)
Rasmus Porsager created Postgres.js –the fastest full-featured PostgreSQL client for Node.js and Deno. Today he joins Jerod for a deep-dive on Postgres, why he created this open source library, and how you can use it to build pg-backed JavaScript applications. Discuss on Changelo ... Show More
50m 6s
Sep 2023
Episode 486: High Performance PostgreSQL for Rails with Andrew Atkinson
If you love taking about databases, this is the episode for you. Ahead of the launch of his new book, High Performance PostgreSQL for Rails, Andrew Atkinson joined the show with special guest co-host, Pat Bair, to talk about why he wrote a book, why he focused on PostgreSQL and h ... Show More
31m 29s
Jun 2022
ESLint and TypeScript
Josh Goldberg joins Nick, Chris & a very nasally-sounding KBall for a fun conversation around TypeScript ESLint. They discuss why we need ESLint when we have TypeScript, some useful rules in typescript-eslint, how it works, and a few hot takes along the way! Discuss on Changelog ... Show More
1h 3m
Oct 2021
Do you know the muffin fairy? (JS Party #195)
Muffin fairies, thumb wars, and fruit transit can only mean one thing: Explain it Like I’m 5! We’re also covering the news, discussing the effects of remote work, and agreeing it’s OK to ignore the frontend dev scene for awhile. Discuss on Changelog News Changelog++ members save ... Show More
58m 18s