SKILL

tinystruct-patterns

tinystruct Java 框架开发的专家指导。适用于 tinystruct 代码库或任何基于 tinystruct 的项目,包括为缺少启动脚本的项目生成 bin/dispatcher 和 bin/dispatcher.cmd,创建 Application 类、@Action 映射路由、单元测试、ActionRegistry,处理 HTTP/CLI 双模式、内置 HTTP 服务器、事件系统、Builder/Builders JSON、AbstractData 数据库持久化、POJO 生成、Server-Sent Events(SSE)、文件上传和出站 HTTP 网络请求。

译文已校对
查看英文原文

Expert guidance for developing with the tinystruct Java framework. Use when working on the tinystruct codebase or any project built on tinystruct — including generating the bin/dispatcher and bin/dispatcher.cmd launcher scripts when a project lacks them, creating Application classes, @Action-mapped routes, unit tests, ActionRegistry, HTTP/CLI dual-mode handling, the built-in HTTP server, the event system, JSON with Builder/Builders, database persistence with AbstractData, POJO generation, Server-Sent Events (SSE), file uploads, and outbound HTTP networking.

适用对象:数据库。自动收录 · 待核查。

原作者说明节选

从固定版本的 SKILL.md 提取,保留原文语言。以下内容属于作者说明,本站尚未验证安装、兼容或运行结果。

查看英文原文

原文涵盖的主题

  • tinystruct Development Patterns
  • Core Principle
  • Primary Development Tool: bin/dispatcher
  • Generating bin/dispatcher and bin/dispatcher.cmd
  • When to Activate
  • When to Use
  • How It Works
  • Examples

Architecture and implementation patterns for building modules with the tinystruct Java framework – a lightweight, high-performance framework that treats CLI and HTTP as equal citizens, requiring no main() method and minimal configuration. CLI and HTTP are equal citizens. A transport-neutral @Action uses Mode.DEFAULT (or omits mode) and has no HTTP-only dependencies. Such an action can run from both a terminal and a web browser. Mode.DEFAULT removes the transport restriction; it does not make an HTTP-dependent method CLI-compatible. Request and Response parameters come from HTTP context attributes and remain null when those attributes are absent, as in an ordinary CLI invocation. Keep shared logic independent of HTTP objects, sessions, and uploads, and call it from transport-specific entry points when needed. This "dual-mode" capability is the core design philosophy of tinystruct. An action with a transport-specific mode (Mode.CLI, Mode.HTTPGET, Mode.HTTPPOST, ...) is deliberately bound to that transport: the framework rejects it from the other one with "The action is not allowed to be executed." bin/dispatcher is the default, highest-priority tool for developing, running, testing,

这里只展示节选,请以完整原文和当前要求为准。

来源仓库
affaan-m/ECC
源文件
skills/tinystruct-patterns/SKILL.md
固定版本
d2ef2680594f9a17526a6e1a2e18b3d242c5d17b
阅读完整原作者说明 ↗

来源与内容状态

本条为自动发现的元数据,尚未完成人工文档核查;适用性与运行结果待核查。

原作者:affaan-m/ECC · 原作者仓库元数据。文档核查:未核查。最近来源检查:2026-11-09T16:01:00.646Z。

分类由名称、说明与路径规则生成,分类不代表已核实适配。

许可与权利归属

MIT。第三方内容及版权归原作者,使用条件以原文为准。

许可原文 ↗

本站没有因同步、复制或用户自报成功而将资源标为运行验证通过。

限制与注意事项

  • 元数据收录不代表本站已经安装、适配、实测或进行安全审查。