dsuryd / dotNetify

Simple, lightweight, yet powerful way to build real-time web apps.
https://dotnetify.net
Other
1.17k stars 164 forks source link

Example of middleware to vm data #129

Closed larsbuch closed 5 years ago

larsbuch commented 6 years ago

It would be nice with an example of how to send data from middleware to vm.

I am using a cache object for it based on Identity UserName and VMId. It does not need to exist for that long. I am unsure if that is a halfbaked idea or the way to go.

dsuryd commented 6 years ago

Examples are here: https://github.com/dsuryd/dotNetify/tree/master/DevApp/server/ExamplePipelines Middlewares don't have direct access to VM instance, you need VM filters for that; but they can store any kind of data to hubContext.PipelineData dictionary that can be picked up by filters and passed on the VM instance.

larsbuch commented 6 years ago

Thank you. I have something to go forward with.

larsbuch commented 6 years ago

I have gotten a working system now. Basically what I was trying to do is to work with a legacy session handling with new code. Do you want it with explanation as an example as I think ExamplePipelines needs explanation ?

dsuryd commented 6 years ago

That would be great.

On Tue, Oct 16, 2018 at 6:02 AM Lars Shakya Buch-Jepsen < notifications@github.com> wrote:

I have gotten a working system now. Basically what I was trying to do is to work with a legacy session handling with new code. Do you want it with explanation as an example as I think ExamplePipelines needs explanation ?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/dsuryd/dotNetify/issues/129#issuecomment-430228421, or mute the thread https://github.com/notifications/unsubscribe-auth/AOS8khueIFKTkyMVxN5U9m-Fchq92Hulks5uldjcgaJpZM4XdepQ .

larsbuch commented 5 years ago

I am not finished with the example yet. My example I was thinking to be what I was struggling with in adding session handling for DotNetify where we add DotNetify in order to make future development faster. I do not know if that is more for a blog post than example as it is more where DotNetify is used in enhancing existing systems instead of new projects.

man. 12. nov. 2018 19.21 skrev Dicky Suryadi notifications@github.com:

Closed #129 https://github.com/dsuryd/dotNetify/issues/129.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dsuryd/dotNetify/issues/129#event-1961040648, or mute the thread https://github.com/notifications/unsubscribe-auth/AK-whwns53X_rfFohBvAFmN0YAZEFtgFks5uubw6gaJpZM4XdepQ .

dsuryd commented 5 years ago

Thank you for doing that. I recommend you write it as a blog post/whitepaper that can get published to Medium/reddit/hackernews, so it can be used to attract and grow dotNetify community.