EPISODE · Jun 29, 2020 · 58 MIN
007: Extending Elm
from Elm Radio · host Dillon Kearns
Platform.workerWhat can you do with Elm?HtmlHttpPortsWeb ComponentsDifferent techniques for extending elmelm-pages StaticHttp APIElm radio episode 1 on elm pageselm-graphqlCodegenMacrosElixir exunitWrapper elm appsCan emulate effect managersPlatform.workerIntrospectionelm-typescript-interopPorts and flagsWeb ComponentsCode transformationElm asset loader webpackHacking JS to get FFIDepending on internal details could end up with broken codeelm-hot and elm-hot-webpack-loaderPitfalls and considerationsCodegenHave a single clear source of truth for codegenPrevent bad states with airtight abstractions, rather than having lots of caveatsMake sure public APIs for generated code look niceUse doc commentsMacrosElm code that doesn’t look like elm codeTooling doesn’t work then - see Babel ecosystemViolates Open close principle - you’re modifying the language, not extending itProvide a platform with extensions in mind when you build tools so you don’t require users to hackWhen you build a tool, think about the mental model for uses, let that guide you. Avoid leaky abstractionsBe opinionated about the core things, and unopionated about what’s not essential to the tool[elm-spa](https://github.com/ryannhg/elm-spa)
What this episode covers
We discuss what Elm is intended for, techniques for going beyond that, and how to make tools nice to use when you do.
NOW PLAYING
007: Extending Elm
No transcript for this episode yet