Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Hunt framework 2.0.0 release, a simple and high-performance Web services framework

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

HuntLabs is pleased to announce before New Year's Eve: Hunt framework 1.0.0 after some versions (1.1.x / 1.5.x) iteration finally ushered in 2.0.0, this version is very important to us, the integrity and ease of use of the entire framework has been once again improved.

Hunt framework is a full-stack web framework developed in Dlang language, and its ease of use and integrity are close to the design of mainstream frameworks such as Laravel / Django / Spring boot. The advantage is mainly reflected in deployment, and there is no need to build a running environment to open web services. And D language itself is a compiled language with high performance, so we can simply develop high-performance web services based on hunt framework.

The version mainly updates features

More HTTP standard API support

Complete HTTP 2.0 support, including H2 and H2C

Performance improvement of Icano module

The Collie library is replaced with the new hunt-http library

Enhancements to database-related modules, including pager and connection pool fixes

New template engine parser, better compatibility with twig and jinja2 syntax

Implementation of form verifier

Design and implementation of Bread crumb Module

Complete implementation of I18N multilingual module

Implementation of WebSocket Module based on STOMP Protocol

Most of the container objects that have been ported to java are convenient for developers to use

Enhanced unit test modules and more sample code

Dependent libraries to upgrade NameVersionhunt1.0.0hunt-cache0.2.2hunt-database1.1.0hunt-entity2.2.0hunt-http0.1.1hunt-imf0.0.4hunt-net0.1.0hunt-security0.0.6hunt-sql1.0.5hunt-stomp0.0.3hunt-trace0.1.7hunt-validation0.0.2boringssl0.0.1dredis0.0.9libmemcached1.1.1openssl1.1.6+1.0.1gprotobuf0.4.0rocksdb0.0.7I18N multilingual sample code definition language pack in Resources/translations/en-us/messages.iniWELCOME=Welcome to the world of hunt framework.VERSION_TITLE=Hunt framework version s sets the default language config/application.confhunt.application.defaultLanguage = en-ushunt.application.languages = zh-cn in the configuration file En-us uses the language entry {{trans ("VERSION_TITLE", huntVersion)}} in the template to use the language entry string s = trans ("VERSION_TITLE", "2.0.0") in the controller Breadcrumbs use initial bread crumbs to configure app.onBreadcrumbsInitializing ((BreadcrumbsManager breadcrumbs) {breadcrumbs.register ("home", (Breadcrumbs trail, Object [] params...) {trail.push ("Home", "/ home");}); breadcrumbs.register ("index.show", (Breadcrumbs trail, Object [] params...) {trail.parent ("home") Trail.push ("About", url ("index.show"));});} the breadcrumbs of the page are assigned view.assign ("breadcrumbs", breadcrumbsManager.generate ("home")) View file code {% if breadcrumbs.defined and breadcrumbs.length > 0%} {% for item in breadcrumbs%} {% if item.link and not loop.last%} {{item.title}} {% else%} {{item .title} {% endif%} {% endfor%} {% endif%} some improvements in HTTP

HTTP client

HTTP server

WebSocket client

WebSocket server

HTTP2

See: https://github.com/huntlabs/hunt-http/tree/master/examples

File upload support improved @ Action string upload () {string message; if (request.hasFile ("file1")) {auto file = request.file ("file1") If (file.isValid ()) {/ / File save path: file.path () / / Origin name: file.originalName () / File extension: file.extension () / / File mimetype: file.mimeType () if (file.store ("uploads/myfile.zip")) {message = "upload is successed" } else {message = "save as error";}} else {message = "file is not valid";}} else {message = "not get this file" } return message;} form validation sample code defines the form object module app.form.LoginForm;import hunt;class LoginForm: Form {mixin MakeForm; @ Length (6, mixin MakeForm; 20) string username; @ Length (8, 16) string password;} validate @ Actionstring login (LoginForm loginForm) {string message; auto result = loginForm.valid () / / TODO if (! result.isValid ()) {message = "Valid error message:" ~ result.messages ();} else {message = "OK";} return message;} File Resource Response simplification @ Action Response download () {return new FileResponse ("/ tmp/orders-20190122.zip");} Database improvement to strengthen the paging support of Entity & EQL:

Https://github.com/huntlabs/hunt-entity/wiki/Pagination

EQL enhancement

Https://github.com/huntlabs/hunt-entity/wiki/EQL

Validation

Https://github.com/huntlabs/hunt-entity/wiki/Validation

Built-in link tracking initial support

New modules used to tracing the requests in microservice architectures.

Performance test results of IPUBO

The core I/O library is refactored, and is called Hunt.

See: https://github.com/huntlabs/hunt-minihttp

More sample code

Hunt-skeleton: https://github.com/huntlabs/hunt-skeleton

Hunt-examples: https://github.com/huntlabs/hunt-examples

Hunt-minihttp: https://github.com/huntlabs/hunt-minihttp

Hunt-http: https://github.com/huntlabs/hunt-http/tree/master/examples

HuntLabs official website

Https://www.huntlabs.net/

Github code repository

Https://github.com/huntlabs/hunt-framework

Gitee Code Cloud Code Warehouse

Https://gitee.com/huntlabs/hunt-framework

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report