NETCore2Blockly generates Blockly blocks for each of your controller actions.
Demo at https://netcoreblockly.herokuapp.com/ ( play with the links from the bottom)
Demo Video at https://www.youtube.com/watch?v=GptkNWjmCzk
Sample Project is TestBlocklyHtml from this repository
Contributors welcome! - please send email to or see issues tab.
How to install NETCore2Blockly in a .NET Core 3.1 WebAPI / MVC application in 3 steps + run application
Install https://www.nuget.org/packages/NetCore2Blockly/ by running the following command in the Package Manager Console:
Install-Package NetCore2Blockly
Modify Startup.cs by adding
public void ConfigureServices(IServiceCollection services)
{
//last line
services.AddBlockly();
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env){
//if you plan to use as html, do not forget app.UseStaticFiles
//last line
app.UseBlockly();
}
To see the UI , please add
public void Configure(IApplicationBuilder app, IWebHostEnvironment env){
app.UseBlocklyUI(); // you can customize (with BlocklyUIOptions argument )header name, start blocks, others...
//you can add storage like local storage or sqlite
//app.UseBlocklyLocalStorage();
//app.UseBlocklySqliteStorage() ; // other nuget package
app.UseBlockly();
}
Run the application from VS and browse to /blockly.html
app.UseBlocklySwagger("petstore", "https://petstore.swagger.io/v2/swagger.json")
You can see demo at https://netcoreblockly.herokuapp.com/ ,colapse category local function, expand category Swagger.
See link 25 from https://netcoreblockly.herokuapp.com/
app.UseBlocklyOData("OdataV4", "https://services.odata.org/TripPinRESTierService/");
You can see demo at https://netcoreblockly.herokuapp.com/ ,colapse category local function, expand category OData.
app.UseBlocklyGraphQL("localGraphql", "/graphql");
You can see demo at https://netcoreblockly.herokuapp.com/ ,colapse category local function, expand category GraphQL.
See link 32,33 from https://netcoreblockly.herokuapp.com/
See links 22 for JWT and 31 for Auth0 from https://netcoreblockly.herokuapp.com/
Also, it works with Active Directory enabled - see Authentication category.
See links 22 for JWT from https://netcoreblockly.herokuapp.com/
See link 2 from https://netcoreblockly.herokuapp.com/
See link 1 from https://netcoreblockly.herokuapp.com/
See link 6,7,8,9, from https://netcoreblockly.herokuapp.com/
Please see how I add CustomBlocksForUI below
app.UseBlocklyUI(new BlocklyUIOptions()
{
StartBlocks = StartBlocksForUI,
HeaderName = "Demo test for .NET Core WebAPI To Blockly ( demo site with Blockly + swaggers + odata loaded + graphql)",
CustomBlocks = CustomBlocksForUI
});
Download the source code, run the TestBlocklyHtml project ( in the test folder ).
See there
region blockly needed
and
region blockly optional
and follow the code.
All other code is just boilerplate for Swagger, OData,GraphQL that are mandatory for demo'ing the application, not for Blockly2NetCore itself.
There is a integration testing at \IntegrationTesting that tests the UI. Generates images and verifies " program complete " textbox.
There are 42 tests that you can also click the demo at https://netcoreblockly.herokuapp.com/ ( see links on the bottom of the page)
Thanks goes to these wonderful people (emoji key):
If you want to contribute, that is plenty of work to be done -see issues tab .
Cosmin Popescu 💻 |
Adrian Nasui 📖 |
Tudor Iliescu 💻 |
robertszabobv 💻 |
Noah Andrews 💻 |
Rene Escalante 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!