Git Product home page Git Product logo

.net-fiddle-language-template's Introduction

.NET Fiddle - Language Template

Use this template to extend .NET Fiddle with support for .NET Languages like Nemerle and .NET Web frameworks like NancyFX into .NET Fiddle.

Template includes basic .NET Fiddle infrastructure and sample implementation of "CSharp Console".

The preliminary process is:

  1. Fork this repo to something like ".NET Fiddle ". Like ".NET Fiddle Nemerle"
  2. Add new projects specific to the language/.NET Web framework. See Solution Structure section below.
  3. When you finished implementing Custom CodeHelper, Automated Tests and Web (CodeMirror), send an email to dotnetfiddle at entechsolutions dot com and someone will pull your code and test it. We will communicate any issues through GitHub.
  4. After all the issues have been resolved we will let you know when your language/web framework will be rolled.
  5. After rollout keep us posted when there is a big update to language/web framework by updating your fork and sending us an email

We will keep improving this process every time we add new language / web framework.

Solution Structure

Infrastructure

  • DotNetFiddle.Infrastructure - all bases classes and helpers
  • DotNetFiddle.RunContainer - assembly used to execute fiddles in controlled sanbax - AppDomain
  • DotNetFiddle.RunContainer.Helpers - implements Dump() method

CSharp Console implementation

  • DotNetFiddle.CSharpConsole - has CSharpConsoleCodeHelper which implements compiliaton, intellisence, validation and execution of CSharp Console fiddles
  • DotNetFiddle.CSharpConsole.Tests - unit tests for CSharpConsoleCodeHelper being called directly as well as hosted within RunContainer
  • DotNetFiddle.CSharpConsole.Web - CodeMirror template supporting CSharp

For .NET Language like Nemerle you would add

  • DotNetFiddle.NemerleScript - NemerleScriptCodeHelper.cs and supporting classes
  • DotNetFiddle.NemerleScript.Tests - all tests like CSharpConsole
  • DotNetFiddle.NemerleScript.Web - CodeMirror template that supports Nemerle

Name like NemerleScript - consists of language and project type. Some languages like C#, VB.NET may support Console/Script/MVC, while others only Script - like F#, Nemerle.

For Web Framwork like NancyFX you would add:

  • DotNetFiddle.NancyFx - NancyFxCodeHelper.cs and supporting classes. Can be using CSharpCodeHelper internally.
  • DotNetFiddle.NancyFx.Tests - automated tests. Probably a bit different than for CSharp Console
  • DotNetFiddle.NancyFx.Web - probably not needed as long as NancyFx uses C# and Razor

Nemerle Notes

NemerleScript can be implemented similarly to CSharpConsole example There shouldn't be any changes to infrastructure, but it may require some extra sandbox permissions or some extra steps during azure rollout.

NancyFX Notes

For NancyFX the data structures will need to be extended to work a bit more like MVC.

Here are the data structures that will need to be extended:

  • NancyFxCodeBlock : CodeBlock (See MvcCodeBlock) View Controller NancyModule

  • NancyFxValidationError : ValidationError NancyFxFileType (similar to MvcFileType)

  • NancyFcCodeHelper.GetAutoCompleteItems() need to take one extra parameter NancyFxFileType

NOTE: we don't support Auto Complete in MVC view right now, so may not be possibly in NancyFx

Several unit tests specific to languages can be skipped like the ones related to Console.ReadLine.

If RunContainer is not sufficient to execute NancyFx, it can also be extended. We had to add some extra functionality for Mvc.

.net-fiddle-language-template's People

Contributors

ericpopivker avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.