dotnet / try

Try .NET provides developers and content authors with tools to create interactive experiences.
MIT License
2.89k stars 522 forks source link

Add instructions on how to integrate into web application #675

Open mcintyre321 opened 4 years ago

mcintyre321 commented 4 years ago

I have always really wanted to make a git-backed wiki engine with c# powered pages, with a nice intellisense ready editor. It strikes me that this is the project to help with that.

Are there instructions on how I could integrate this project into a web app somewhere? I've had a look but haven't found anything which expressly guides me on how to do so.

jonsequitur commented 4 years ago

Which features are you thinking of? Local (dotnet-try) versus web-based (e.g. https://dotnet.microsoft.com/learn/dotnet/in-browser-tutorial/1) have a number of differences in capabilities.

mcintyre321 commented 4 years ago

Are you talking about server-side execution vs webassembly? If so server side.

I think server-side execution, the idea would be for it to be edited by trusted users. Are the codeexecutions run inside a container, or under some other kind of sandbox? I

jonsequitur commented 4 years ago

Prior to our move to web assembly, server-side execution took place in transient containers because all users were anonymous. The infrastructure to manage these containers is not part of this repo. Web assembly offers improved scale, cost, and privacy, but limits you to netstandard2.0.

mcintyre321 commented 4 years ago

And also limits you to web requests issued from the browser sandbox, right? Server side would allow for more powerful (and of course more dangerous) scripts.

jonsequitur commented 4 years ago

Right. The security boundary is the user's browser in the case of our web assembly implementation. In the server-based implementation, the security boundary is the machine with whatever limitations are placed on the account it runs under.

mcintyre321 commented 4 years ago

It'd be great to have the option of runner. I'm more interested in the server side model, however.

On Thu, 12 Dec 2019, 21:11 Jon Sequeira, notifications@github.com wrote:

Right. The security boundary is the user's browser in the case of our web assembly implementation. In the server-based implementation, the security boundary is the machine with whatever limitations are placed on the account it runs under.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dotnet/try/issues/675?email_source=notifications&email_token=AACDJ6QTG5CJSXSGWEQ6TP3QYKSHNA5CNFSM4JTANXN2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGYBPBA#issuecomment-565188484, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACDJ6USFGZW5KOQZEULSWLQYKSHNANCNFSM4JTANXNQ .