Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Website as a Function from URL to HTML [video] (youtube.com)
2 points by markusschlegel 2 days ago | hide | past | favorite | 2 comments




Building websites seems straightforward. You pick a static site generator and start writing content. However, these websites quickly grow into full-blown software projects. Suddenly, your SSG – its rigid template system, scattered configuration and ad-hoc Markdown – is holding you back for its lack of proper abstraction mechanisms.

In this talk, we start fresh. Our design approach is driven by one simple insight: Static websites are just functions mapping URLs to HTML. This marks the beginning of our journey in developing our own SSG. In the end we arrive at a bespoke domain-specific language in OCaml.

While this exploration may sound theoretical – or even playful – it has substantial practical implications. By treating our website as a function, we can embrace robust engineering practices: clearly separating domain logic from presentation, following the single-responsibility principle, reducing coupling, and ensuring cohesion.


"Diversity & inclusion sponsor"? What is that?



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: