[Request] Example of a "functional"-ish WebAPI leveraging language-ext #918
Replies: 11 comments
-
I'm really interested in this as well. I'm hoping to work on a sample asp net core API that uses ef core and language-ext this weekend. Worst case scenario at least it might serve as a starting point. |
Beta Was this translation helpful? Give feedback.
-
@ErikFeeley glad to know that I am not all alone :p |
Beta Was this translation helpful? Give feedback.
-
Have not had the time to get on this yet : / High level though I want to build a simple Todo api using pretty standard asp net core stuff. Except I want to remove the model binder validation and use language-ext for that. Then also use language-ext for the actual meat of the api and working with EF Core. |
Beta Was this translation helpful? Give feedback.
-
Actually, I have some plans to achieve something similar with a relatively simple kata project following DDD. I drafted the requirements for a full-stack application below (bigger than a todo api tho):
|
Beta Was this translation helpful? Give feedback.
-
I built the start of the example you're describing for a talk I gave a few
months ago. I didn't use language-ext but it shouldn't be a problem to
port the code to use those primitives.
https://github.com/sdedalus/FPTalk1
…On Sun, Mar 10, 2019 at 8:19 AM Ehouarn Perret ***@***.***> wrote:
Actually, I have some plans to achieve something similar with a relatively
simple kata project following DDD.
I drafted the requirements for a full-stack application below (bigger than
a todo api tho):
Write (little) program that shows how you handle the full stack from
front-end to back-end.
- A user should be able to enter a new flight which has a departure
airport and a destination airport.
- This new flight should be persisted into the system so that it can
be retrieved later on.
- Business logic should be able to calculate the distance between the
two aiports their GPS positions and to calculate the fuel needed for this
flight, given the aircraft fuel consumption per distance / flight time +
takeoff effort.
- The program should be able to list the different flights which are
loaded from a persistence medium, technology for this can be chosen freely.
- It should also be possible to edit a flight and persist these
changes.
A report page should be included that shows a summary of all entered data,
including calculated data.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#556 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABk1CtIJTiOiGln8oKRrL1W56Yp5F7kdks5vVQZ1gaJpZM4bJCEk>
.
|
Beta Was this translation helpful? Give feedback.
-
This application has been created by @blakeSaucier #637 I believe it has been inspired by Clean Architecture (see this https://paulovich.net/clean-architecture-essentials/ or this https://youtu.be/5OtUm1BLmG0 |
Beta Was this translation helpful? Give feedback.
-
If anyone is interested, I started a Todo Web Api with LanguageExt. I'd like to make it as good as possible so feel free to come and contribute 🙂 |
Beta Was this translation helpful? Give feedback.
-
@KiritchoukC Why everyone is so in love with MediatR? |
Beta Was this translation helpful? Give feedback.
-
@Lonli-Lokli I'm not, It's the first time I use it. |
Beta Was this translation helpful? Give feedback.
-
@KiritchoukC First of all it's not too fast in prod as it used Activator. Second, it leads to a lot of boilerplate (while of course gives clear vision on what dependencies are required for action). |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
That would be great if the wiki provides a series of article about to build a project like WebAPI using C# and functional approach with language-ext (eg. about handling errors).
I am sure this could help a lot of folks to get their hands on this library.
Beta Was this translation helpful? Give feedback.
All reactions