All workshops will be held on the first day from 9:30am to about 5pm.
- Beginner Reason & ReasonReact Workshop
- Advanced ReasonReact Workshop
- Reason & GraphQL Workshop
- OCaml Workshop
Beginner Reason & ReasonReact Workshop hosted by Reason Association
In this workshop, attendees will first of all learn how to setup and use ReasonML with React and find explanations on how to find relevant information for their coding problems (navigating the docs, leverage the community).
In more detail, the workshop will cover the following topics:
- Why ReasonML?
- Introduction to the platform / tech stack (OCaml, BuckleScript, Tooling, ReasonML)
- Dev-Setup / Editor integration
- Basic language features (data types, pattern-matching, Collection APIs)
- BuckleScript related topics (JS-compilation)
- React related topics (stateless / reducer components, JSX, CSS etc.)
In the end, ambitious attendees will be able to integrate Reason React components in their existing React codebase without interrupting the existing development workflows.
Advanced ReasonReact Workshop hosted by Ricky Vetter
ReasonReact is the default set of bindings to ReactJS in Reason. The bindings have popularized the concept of reducers for controlling local state as well as pushing functional approches to ReactJS design patterns.
In this workshop, attendees will learn about the design tradeoffs made in the building of ReasonReact and what capabilities these tradeoffs give you. Attendees will be working with different approaches for creating higher order components and managing complex state.
Later, we will use React Hooks to solve many of the same problems in a way that is closer to ReactJS and provides some distinct advantages.
- ReasonReact vs ReactJS
- Reducers, retainedProps, weird APIs
- Functional components, partial application of components
- Functor components, polymorphic state/props
- React Hooks in Reason
Before this workshop, attendees are expected to have good working familiarity with ReactJS and Reason. Experience with ReasonReact is not required, but definitely recommended.
Reason & GraphQL Workshop hosted by Sean Grove
Let’s explore the benefits and tradeoffs when pairing GraphQL and Reason, both from a server’s and a client’s point-of-view. We’ll build a small but realistic full-stack app together that you can take away and tweak for real-work projects afterwards.
We’ll start with a quick overview of GraphQL’s properties, how the system works, and what the overall ecosystem looks like.
From there, we’ll use GraphQL + ReasonReact on the frontend to build a client for a small app against OneGraph, so we have a sense of what consuming GraphQL is like in a day-to-day context.
Next, we’ll move on to building a fully-native Reason GraphQL server. We’ll take an existing project that uses a high-performance http server (
httpaf), Reason’s GraphQL server (
ocaml-graphql-server), and a PostgreSQL-compatible model library (
oneSql) to quickly iterate and build a custom GraphQL application for our client.
Once we have our application running locally, we’ll set up continuous deployment via CircleCI and push our app to production, where anyone can hit it! The CD process will include automated tests that will fail if we attempt to push breaking changes to our GraphQL schema, unless we manually override it. This is a great way to combine the speed of CD with the comfort of knowing you’re (likely!) not breaking any clients.
Towards the end of the day, we’ll see what it’s like to consume another GraphQL service from the server, while still retaining the type safety and convenience that we enjoyed earlier in the day on the client.
Finally, we’ll explore what schema stitching might look like, so that we can enjoy all the existing work that’s gone into the GraphQL SaaS ecosystem, while still providing our own custom data.
Topics & Schedule (subject to change)
- Introduction to GraphQL
Using GraphQL on the client
Building your own GraphQL server in Reason
- esy - bullet-proof dependency management
- dune - project management
- oneSql - database interactions
- Canonicalizing and documenting your universe of errors
- User authentication
- Schema permissions
- Deploy to “production”
- ReasonML server as a client of a GraphQL service
- Dataloader pattern: Avoiding the N+1 problem
- Schema stitching
- Thoughts on overall GraphQL server design, security and permissions, etc.
OCaml Workshop hosted by OCaml Labs
Note: Please prepare an AWS account setup for the Serverless function exercise!
Ecosystem (slides/interactive presentation)
- About OCaml and some major projects using it (Jane Street, Docker, Facebook, Mirage, Coq, …)
- Package management. We will lead with Esy for this, since it wraps opam very effectively.
- Common tools: VS Code, Dune, Merlin, utop setup. (10 minutes to get everyone setup)
- Start with the guided tour in RWO chapter 1 (dev.realworldocaml.org) to get users familar with basic syntax. (leave around 20-30 minutes and walk around showing users how things work)
- Httpaf + websocket server
- Command line tool to query GitHub REST API
- Serverless function using OCaml.
- It’s always fun to end up with a unikernel build. I’ll save this for the “advanced topic” for users that really want to try it.
- An interactive demo of a real world system with Owl
- How to contribute to the OCaml ecosystem. GitHub, common licenses, tools that need help.
- The roadmap for the OCaml Platform in 2019.