Pipeline-oriented programming - Scott Wlaschin - NDC Porto 2023

Discover the benefits and limitations of pipeline-oriented programming, a game-changing approach to coding that promotes composable, testable, and scalable systems.

Key takeaways
  • Pros of pipeline-oriented programming:
    • Composability: small, single-responsibility components can be easily connected to form larger systems
    • Easy to test: each component can be tested in isolation, making it much simpler to identify and debug issues
    • Flexible: pipelines can be extended or modified without touching the underlying code
    • Scalable: large systems can be built by combining multiple pipeline components
    • Extensible: new components can be easily added to the pipeline to provide new functionality
    • Easy to understand: the order and structure of components can be easily visualized and understood
    • Encourages good architecture: pipelines promote a clean, modular architecture
    • Encourages reuse: components can be reused across different pipelines and projects
    • Not limited to specific languages or frameworks: pipeline-oriented programming can be applied to any programming language or framework
    • Easy to learn: pipelines can be learned by anyone familiar with programming concepts
  • Key benefits of pipeline-oriented programming:
    • Code is easier to understand and maintain because components are simple and self-contained
    • Code is easier to test because each component can be tested in isolation
    • Code is more flexible and extensible because new components can be easily added
    • Code is more scalable because large systems can be built by combining multiple pipeline components
    • Code is easier to debug because issues can be isolated to specific components
    • Code is easier to extend because new components can be easily added
  • Cons of pipeline-oriented programming:
    • Can be difficult to learn: new concepts and techniques are required
    • Requires a different mindset: thinking in terms of pipelines requires a different way of approaching programming problems
    • Can be difficult to apply: pipeline-oriented programming may not be suitable for every problem or project
  • Examples of pipeline-oriented programming in action:
    • FizzBuzz algorithm: a simple example of a pipeline-based solution
    • Web development: a pipeline-based approach to building web applications
    • Database access: a pipeline-based approach to accessing a database