Drag and drop low-code platform framework-PaaS platform, zero code, JNPF 3.4.7 new version aPaaS source code

 The PaaS platform helps enterprises quickly build personalized business applications. Users can build core business applications such as sales, operations, personnel, and procurement with excellent user experience without code development, open up internal enterprise data, and connect with other systems through APIs and Webhooks. The automated workflow in the platform can also realize the control process and business automation such as approval and filling. If the user company uses DingTalk or WeChat, the application built in the platform can also be directly connected to the workbench.

using System.Text.Json;

namespace SerializeBasic
{
    public class WeatherForecast
    {
        public DateTimeOffset Date { get; set; }
        public int TemperatureCelsius { get; set; }
        public string? Summary { get; set; }
    }

    public class Program
    {
        public static void Main()
        {
            var weatherForecast = new WeatherForecast
            {
                Date = DateTime.Parse("2019-08-01"),
                TemperatureCelsius = 25,
                Summary = "Hot"
            };

            string jsonString = JsonSerializer.Serialize(weatherForecast);

            Console.WriteLine(jsonString);
        }
    }
}
// output:
//{"Date":"2019-08-01T00:00:00-07:00","TemperatureCelsius":25,"Summary":"Hot"}


In addition to building enterprise applications, we have integrated the four standard application functions of dynamics, tasks, schedules, and files that have been in operation for 8 years under the collaboration suite to meet the needs of daily sharing and communication, task collaboration, scheduling, and file management.

For paid enterprise users, we provide organizational background management, which supports the setting of enterprise management and individual needs, such as employee management, resignation handover, LOGO upload, secondary domain name settings, etc.

private static string s_contents = string.Concat(Enumerable.Range(0, 100_000).Select(i => (char)('a' + (i % 26))));
private static string s_path = Path.GetRandomFileName();

[Benchmark]
public Task WriteAllTextAsync() => File.WriteAllTextAsync(s_path, s_contents);

using System.Text.Json;

namespace SerializeToFileAsync
{
    public class WeatherForecast
    {
        public DateTimeOffset Date { get; set; }
        public int TemperatureCelsius { get; set; }
        public string? Summary { get; set; }
    }

    public class Program
    {
        public static async Task Main()
        {
            var weatherForecast = new WeatherForecast
            {
                Date = DateTime.Parse("2019-08-01"),
                TemperatureCelsius = 25,
                Summary = "Hot"
            };

            string fileName = "WeatherForecast.json";
            using FileStream createStream = File.Create(fileName);
            await JsonSerializer.SerializeAsync(createStream, weatherForecast);
            await createStream.DisposeAsync();

            Console.WriteLine(File.ReadAllText(fileName));
        }
    }
}
// output:
//{"Date":"2019-08-01T00:00:00-07:00","TemperatureCelsius":25,"Summary":"Hot"}

private byte[] _toCompress;
private MemoryStream _destination = new MemoryStream();

[GlobalSetup]
public async Task Setup()
{
    using var hc = new HttpClient();
    _toCompress = await hc.GetByteArrayAsync(@"https://raw.githubusercontent.com/dotnet/performance/5584a8b201b8c9c1a805fae4868b30a678107c32/src/benchmarks/micro/corefx/System.IO.Compression/TestData/alice29.txt");
}

[Benchmark]
public void Compress()
{
    _destination.Position = 0;
    using var ds = new BrotliStream(_destination, CompressionLevel.Fastest, leaveOpen: true);
    ds.Write(_toCompress);
}

JNPF

The JNPF rapid development platform supports the automatic creation of the database. The first time the program is run, the application will automatically initialize the table and execute the initialized data. The permission authorization module is flexible, supports OAuth2.0 single sign-on, simple yml configuration is enough, no need to write a lot of xml configuration files. Support multiple data sources, simple xml configuration can be realized, for security, no interface is provided to maintain data sources. Support distributed transactions (TCC, message eventual consistency, both mixed use and single use), provide monitoring interface, and manual compensation operations. Cache monitoring, J2Cache secondary cache, supports fast switching to Redis cache. Server monitoring, view CPU, memory, JVM, disk information, etc. It is convenient for operation and maintenance personnel to analyze the system load. Supports Spring Cloud architecture, distributed, microservices, minimized kernel, unified configuration center, and unified authorization and authentication center. Rich built-in functions: user permissions, data permissions, system management, file system.

Based on the Element-UI flat interface design, it is more refined, more beautiful, high-end, atmospheric, and upscale. No refresh design, except for entering function pages and new pages, Ajax interaction is used in all other cases to optimize experience and performance. It supports one-click skinning, and the setting in the upper right corner of the system can quickly switch the style of the entire UI, not only the color tone and style, but also the layout. Support for customizing the unique theme style of the extension project. Optimize user function operation, public thinking mode, clear function, more appropriate and friendly. Internationalization support, page label internationalization, dictionary menu internationalization, data internationalization.

[Params(false, true)]
public bool NewOverload { get; set; }

[Benchmark(OperationsPerInvoke = 1000)]
public async Task ConnectAcceptAsync()
{
    using var listener = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
    listener.Bind(new IPEndPoint(IPAddress.Loopback, 0));
    listener.Listen(1);

    for (int i = 0; i < 1000; i++)
    {
        using var client = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
        if (NewOverload)
        {
            await client.ConnectAsync(listener.LocalEndPoint, CancellationToken.None);
        }
        else
        {
            await client.ConnectAsync(listener.LocalEndPoint);
        }
        using var server = await listener.AcceptAsync();
    }
}

Guess you like

Origin blog.csdn.net/ohpppp/article/details/130891715