Stateless 3.0 – A State Machine Library for .NET Core(hanselman.com)
hanselman.com
Stateless 3.0 – A State Machine Library for .NET Core
http://www.hanselman.com/blog/Stateless30AStateMachineLibraryForNETCore.aspx
10 コメント
While the title of the blog post says "for .net core", it is much more than that. The blog post clarifies it is actually targeting the new .net standard so it works on all platforms including .net core (Windows, Mac, Linux), .net framework on Windows, Windows UWP and Xamarin (iOS, Android).
Looks ok, but why not lift states to the type level and define transitions as extension methods? Then attempts to make an invalid transition are compile-time type errors.
Edit: ha, just noticed a comment on the blog saying the same thing. The example can be encoding C# too using extension methods and generic parameters.
Edit: ha, just noticed a comment on the blog saying the same thing. The example can be encoding C# too using extension methods and generic parameters.
Any alternatives for state machine/business flow in other languages/platforms worth to take a look at? I was actually looking for something more or less like this and I was thinking about python, but I'm open to evaluate Stateless or other solutions in other languages too...
I outlined an alternative on that post, have a look http://www.hanselman.com/blog/CommentView.aspx?guid=A642B575...
This looks very interesting. I've been thinking about replacing an increasingly complicated home-grown state machine in something I'm working on with this. Anybody have any experiences working with it?
I played around with it, seems to do exactly what it says on the tin and is super easy to start with.
Saw Hanselman post this and took a look. I think it perfectly fits the bill for a number of our systems and hope to stop using our old hand-crafted solution instead.
Related: https://github.com/p-org/P
I found Stateless a few weeks ago and it came in super handy for a project. Definitely plan to use it more often.
Great library and have used it on a few production systems.