“Using Functional Programming Patterns..."
summary
Shows a functional design that replaces regex-and-if routing with pure functions: paths as URI→optional<params>, handlers as (request, params)→response, routes as request→optional<response>, and middleware as handler→handler. Built on C++ with examples referencing Boost/Asio + Beast or CppRestSdk, the prototype keeps type information (no erasure), generates docs and sample routes, and is decoupled from transport and testable without DI. Four-route demo compares manual 30-line/8-branch code to a 29-line, composable routes design with type-safety that demonstrably works.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 1:45Manual implementation challenges
- 6:34Aspect-oriented approach
- 16:13Functional programming concepts
- 19:37Defining the path
- 22:36The router concept
- 26:57Middleware implementation
- 29:36API benefits and design
- 32:30Testing and composition
- 35:44The DRY principle
- 41:30Key takeaways and conclusion
- 44:48Q&A session
related talks
28mHTTP through Functional Programming
51mFun with the Functional Web Framework
30mThe Power of Middleware - Building Your Own Mini Web Framework on Rack
54mNew in Spring 5: Functional Web Framework
01h 07mComposing (Clojure) Web Stacks using Functional First Principles
58mGoodbye Regex. Hello Parsers!
25mHow I Write HTTP Web Services After 8 Years
56mBeyond URL Matching: Mastering the Spray/Akka-Http Routing DSL
