|
Frontend data validation for a clean architectureA hands-on workshop for developers and architectsWednesday 3rd May 2023, 6:30 - 8:30 pm. Speaker: Nicole Rauch Venue: Skyscanner Limited, Quartermile One, 15 Lauriston Place, Edinburgh, EH3 9EN Refreshments and networking from 6:00 pm. Refreshments kindly provided by Skyscanner. This event is free of charge and open to all, though registration is required. SynopsisWhen data is transferred to a JavaScript-frontend, it's not immediately clear how the correctness of the data structures can be established. Even using TypeScript does not help because those types don't exist at runtime. If we load the data into the frontend without checking its correctness, we risk errors due to incorrect data structures. Even worse, those errors can happen at any time! To avoid these errors, "defensive" programming is often applied. This means that the code is full of null-pointer checks and the like, which reduces readability and maintainability. To improve this situation, we should check the data as soon as it arrives at the frontend, and we should reject it if it doesn't match our expectations. This leads to a clean and slim architecture for the whole frontend. This workshop introduces the philosophy of frontend validation and gives you a step-by-step, hands-on experience of using a popular validation library called ZOD. You will learn how it helps you work with valid data in the frontend, including the automatic generation of TypeScript types. Prerequisites and practicalitiesFor the practical elements of the workshop, participants will ideally have had some exposure to TypeScript or JavaScript. However, knowledge of a similar language that has Generics (e.g. Java, C#, C++) should be sufficient. We will pair those that have actual TS/JS knowledge with less experienced participants. Bring a laptop with a recent version of Docker, and an IDE (recommended are IntelliJ/WebStorm or VSCode).
A docker image will be provided that contains everything that's required - from Nicole's server (https://www.nicole-rauch.de/files/validation.tar.gz) from May 1st OR on a USB stick on the day. About the speaker
|