HuntLabs 很高兴的赶在大年三十之前宣布:通过 Hunt framework 1.0.0 后面的一些版本( 1.1.x / 1.5.x)迭代终于迎来 2.0.0,这个版本对我们来说很重要,对整个框架的完整性和易用性再一次得到了提升。
Hunt framework 是一个使用 Dlang 语言开发的全栈 web 框架,易用性和完整性都贴近于 Laravel / Django / Spring boot 等主流框架的设计,优势主要体现在部署方面,不需要搭建运行环境就可开启 web 服务。而且 D 语言自身是一个性能极高的编译型语言,我们可以基于 hunt framework 非常简单的开发出高性能的 web 服务。
更多 HTTP 标准 API 进行支持
完成 HTTP 2.0 支持,包含 H2 和 H2C
I/O 模块性能改进
Collie 库使用新的 hunt-http 库进行替代
数据库相关模块的增强,包含分页器和连接池修复
新的模板引擎解析器,更好的兼容 twig 和 jinja2 语法
表单校验器的实现
面包屑模块设计与实现
I18N 多语言模块完整的实现
基于 STOMP 协议的 WebSocket 模块实现
移植了 java 的大部分容器对象方便开发者使用
加强了单元测试模块和更多的示例代码
Name | Version |
---|---|
hunt | 1.0.0 |
hunt-cache | 0.2.2 |
hunt-database | 1.1.0 |
hunt-entity | 2.2.0 |
hunt-http | 0.1.1 |
hunt-imf | 0.0.4 |
hunt-net | 0.1.0 |
hunt-security | 0.0.6 |
hunt-sql | 1.0.5 |
hunt-stomp | 0.0.3 |
hunt-trace | 0.1.7 |
hunt-validation | 0.0.2 |
boringssl | 0.0.1 |
dredis | 0.0.9 |
libmemcached | 1.1.1 |
openssl | 1.1.6+1.0.1g |
protobuf | 0.4.0 |
rocksdb | 0.0.7 |
WELCOME=Welcome to the world of hunt framework. VERSION_TITLE=Hunt framework version %s
hunt.application.defaultLanguage = en-us hunt.application.languages = zh-cn,en-us
<title>{{ trans("VERSION_TITLE", huntVersion) }}</title>
string s = trans("VERSION_TITLE", "2.0.0");
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")); }); }
view.assign("breadcrumbs", breadcrumbsManager.generate("home"));
{% if breadcrumbs.defined and breadcrumbs.length>0 %} <div class="row"> <div class="col"> <ol class="breadcrumb"> {% for item in breadcrumbs %} {% if item.link and not loop.last %} <li class="breadcrumb-item"><a href="{{ item.link }}">{{ item.title }}</a></li> {% else %} <li class="breadcrumb-item active">{{ item.title }}</li> {% endif %} {% endfor %} </ol> </div> </div> {% endif %}
HTTP client
HTTP server
WebSocket client
WebSocket server
HTTP2
See: https://github.com/huntlabs/hunt-http/tree/master/examples
@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; }
module app.form.LoginForm; import hunt; class LoginForm : Form { mixin MakeForm; @Length(6,20) string username; @Length(8,16) string password; }
@Action string login(LoginForm loginForm) { string message; auto result = loginForm.valid(); // TODO if(!result.isValid()) { message = "Valid error message : " ~ result.messages(); } else { message = "OK"; } return message; }
@Action Response download() { return new FileResponse("/tmp/orders-20190122.zip"); }
https://github.com/huntlabs/hunt-entity/wiki/Pagination
https://github.com/huntlabs/hunt-entity/wiki/EQL
https://github.com/huntlabs/hunt-entity/wiki/Validation
New modules used to tracing the requests in microservice architectures.
The core I/O library is refactored, and is called Hunt.
See: https://github.com/huntlabs/hunt-minihttp
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
https://www.huntlabs.net/
https://github.com/huntlabs/hunt-framework
https://gitee.com/huntlabs/hunt-framework
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。