Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
hat's a function? A function is a black box that takes an input and returns an output. Similarly, from the outside, HTTP requests take some request data to give it back as a response. Functions may compose if the output of one matches the input of the next one. web_pipe helps you build rack applications by plugging small process units that progressively create a response from a given request.
Date
Summarized using AI?
If this talk's summary was generated by AI, please check this box. A "Summarized using AI" badge will be displayed in the summary tab to indicate that the summary was generated using AI.
Show "Summarized using AI" badge on summary page
Summary
Markdown supported
In this RubyConf 2021 talk titled "Harness the Power of Functions to Build Composable Rack Applications," Marc Busqué explores the concept of functional programming through the lens of building web applications using the Rack framework and a new abstraction called Web Pipe. The key points of the discussion include: - **Understanding Functions**: The talk begins with an explanation of functions as black boxes, which take inputs and return outputs, referencing both mathematical and programming contexts. The concept of pure functions is introduced, along with challenges such as hidden preconditions and side effects in real-world applications. - **Rack Framework**: The presentation transitions into the Rack framework, explaining how Rack applications respond to HTTP calls. The distinction is made between modifying requests before they reach the application and altering responses afterward, illustrating the middleware concept. - **Introduction to Web Pipe**: Web Pipe is introduced as a thin layer on top of Rack, allowing the construction of web applications using function composition. Here, each function operates as a complete Rack application, leading to a more streamlined and efficient design. - **Key Features of Web Pipe**: Busqué discusses how Web Pipe's structure allows for the creation of modular applications by defining functions that take and return the same data type. The importance of immutability and extensibility is emphasized, allowing developers to easily create new features or adapt existing ones. - **Integration and Application**: The talk exemplifies how Web Pipe can be integrated within frameworks like Hanami, showcasing its capability to manage complex application architecture while remaining flexible. It highlights the use of dependency injection, session management, and middleware integration within the larger context of a web application. - **Real-world Usage**: Several examples demonstrate the practical application of Web Pipe, such as configuring sessions, handling user inputs, and performing actions based on specific user authentication logic. The presentation concludes with an overview of how Web Pipe fits within various frameworks and its potential for improving Ruby application architecture. Overall, the talk emphasizes the power of functional programming principles in enhancing the composition and modularity of web applications built with Ruby and Rack. The practical implications of adopting these principles in application design are highlighted as significant advancements for Ruby developers.
Suggest modifications
Cancel