Xsnkccgujskgdgi999bt
SkillsCast

Easy and Efficient Data Validation with Cats - Beginner

8th December 2016 in London at Business Design Centre

There are 57 other SkillsCasts available from Scala eXchange 2016

Please log in to watch this conference skillscast.

607066480 640

Often when you create a client/server application, you need to validate the requests: can the user associated to the request perform this operation? Can they access or modify the data? Is the input well-formed?

When the data validation component in your application is not well designed, the code can quickly become not expressive enough and probably difficult to maintain. Business rules don't help, adding more and more requirements to add in our validation, making it more and more complex to clearly represent and maintain. At the same time when the validation fails, it should be fairly straight forward to understand why the request was rejected, so that actions can be taken accordingly.

This talk introduces Cats, a Scala library based on category theory, and some of its most interesting components for data validation. In particular, Daniela will share some options to achieve efficient and expressive data validation. You will also discover that, compared to other options in the language, Cats is particularly suited for the task thanks to its easy-to-use data types and more approachable syntax.

Throughout the talk, you will see numerous examples on how data validation can be achieved in a clean and robust way, and how you can easily integrate it in your code, without any specific knowledge of category theory.

YOU MAY ALSO LIKE:

Easy and Efficient Data Validation with Cats - Beginner

Daniela Sfregola

Daniela Sfregola is a Software Consultant based in London, UK. She has worked as Java developer before moving towards Scala.