This issue recommends a Jean. NET to develop a simpler, more versatile, and more popular project – Furion.
Furion is an application framework based on the.net5/6 platform that you can integrate into any.NET/C# application.
Furion has the following characteristics:
- New look: Based on the.NET5/6 platform, no historical baggage
- Minimal dependencies: The framework relies on only two third-party packages
- Easy to get started: Only Inject() is needed to complete the configuration
- Rapid development: Built-in rich enterprise application development functions
- Extremely flexible: easily cope with changing and complex requirements
- Easy to maintain: A unique architectural idea designed for long-term maintenance
- Complete documentation: Provides comprehensive development documentation
- Cross-platform: Supports all major operating systems and all.NET project types
function module
Frame dependency
Furion, in pursuit of fast entry, extreme performance, does not use or reduce third party dependence as much as possible. Currently, Furion only integrates the following two dependencies:
- MiniProfiler: Required for performance analysis and monitoring
- Swashbuckle: Swagger interface documentation
Small but complete. Even though Furion only integrates these two dependencies, the mainstream dependency injection/inversion of control, AOP aspect oriented programming, event bus, data validation, database manipulation, etc., are not lost.
environmental requirement
- Visual Studio 2019 16.8 +
- .NET 5 SDK +
- .Net Standard 2.1 +
supporting platform
- operating environment
- database
- application deployment
On performance
Furion currently uses Visual Studio 2019 16.8’s built-in performance test and JMeter for testing. Due to limited space, only part of the test diagram is posted. The test results are as follows:
Simple use
Entry requirements: Have a basic understanding of.NET Core/ASP.NET Core, have not yet touched ASP.NET Core basics | Microsoft Docs
1. Create a Web project
Environment requirements: Before using Furion, make sure you have the latest.NET 5 SDK installed and upgrade Visual Studio 2019 to the latest version.
To create an ASP.NET Core Web application:
- Open Visual Studio 2019 and create the Web project
- Configuration item name
- Select the WebAPI project
Special note: Furion already has the Swagger normalization library built in, so you don’t need to check the Enable OpenAPI support option when creating. Otherwise, a message is displayed indicating version inconsistency and conflict.
2. Add Furion dependency packages
3. Furion Basic configuration
- Program.cs Add Inject()
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
namespace FurionStart
{
public class Program
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder
.Inject() // Add this line
.UseStartup<Startup>();
});
}
}
- Add two Inject() to Startup.cs
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
namespace FurionStart
{
public class Startup
{
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}
public IConfiguration Configuration { get; }
public void ConfigureServices(IServiceCollection services)
{
services.AddControllers().AddInject(); // add AddInject();
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseHttpsRedirection();
app.UseRouting();
app.UseAuthorization();
// Add this line,If it is MVC and API co-existing project,No addition string.Empty
app.UseInject(string.Empty);
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
});
}
}
}
Tip: If app.UseInject() does not enter an argument, the default address is /api, and if string.Empty is/directory. If you enter any string, it is/any string directory.
4.Launch browser
Launch your browser to see the effect.
You can read more on your own.