Kris Jenkins - Types All The Way Down

preview_player
Показать описание
Kris Jenkins' talk at Compose :: Conference in Melbourne, 2016.

--
In web development, a great deal of effort is spent on consistency. The frontend, backend and database must all agree on a data-model, and if they don't, the system crashes spectacularly.

The default solutions are either to invest heavily in hand-written integration tests, or use JavaScript everywhere. Neither of these are ideal. However there is a compelling alternative - use the same types everywhere.

By reusing strong, static types across tiers, we can make guarantees about the consistency of the entire system, and dramatically lower the cost of change.

We present one approach that uses Haskell data types to drive a both a PostgreSQL database schema and a frontend system written in Elm. With one set of types to rule them all, whole system consistency is automatic and reliable, and the cost of changing types - and hence evolving the whole system's data model - is dramatically reduced.
--

Рекомендации по теме