Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pferreirafabricio/simple-railway

🚉 A simple application of the Railway Oriented Programming (ROP) in C#
https://github.com/pferreirafabricio/simple-railway

csharp dotnet railway-oriented-programming rop

Last synced: about 2 months ago
JSON representation

🚉 A simple application of the Railway Oriented Programming (ROP) in C#

Awesome Lists containing this project

README

        

# 🚉 Simple Railway

A simple application of the Railway Oriented Programming (ROP) in C#

license url

## 📖 About

Simple Railway is a C# application that demonstrates the use of Railway Oriented Programming (ROP) to handle errors in a functional programming style. This project is designed to showcase how ROP can simplify error handling by structuring functions and methods to pass errors along a "railway" of function calls, making the code more readable, maintainable, and less prone to runtime errors.

This project is part of a series of studies about error handling and classification. Check out the other projects:

- [handling-errors](https://github.com/pferreirafabricio/handling-errors)
- [classify-error-messages](https://github.com/pferreirafabricio/classify-error-messages)

## 🏄‍♂️ Quick Start

1. Clone this repository `git clone https://github.com/pferreirafabricio/simple-railway.git`
2. Enter in the project's folder: `cd simple-railway`
3. Enter in the console app: `cd SimpleRailway`
4. Run: `dotnet run`

## 🧱 This project was built with

- [.NET 8](https://dotnet.microsoft.com/pt-br/download/dotnet/8.0)

## 📚 References

- [Railway oriented programming - A recipe for a functional app, part 2](https://fsharpforfunandprofit.com/posts/recipe-part2/)
- [Functional Error Handling in .NET With the Result Pattern](https://www.milanjovanovic.tech/blog/functional-error-handling-in-dotnet-with-the-result-pattern)
- [Completely Get Rid of Exceptions Using This Technique](https://www.youtube.com/watch?v=C1oGnDEnS14)