Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] use a meta-framework #12

Open
2 tasks done
boomzero opened this issue Feb 3, 2024 · 19 comments
Open
2 tasks done

[Feature Request] use a meta-framework #12

boomzero opened this issue Feb 3, 2024 · 19 comments
Assignees
Labels
enhancement New feature or request

Comments

@boomzero
Copy link
Member

boomzero commented Feb 3, 2024

检查项

  • 我已确认了XMOJ增强脚本已为最新版,且最新版未实现这一功能。
  • 我已在 Issues 页面 中搜索,确认了这一提案未被提交过。

描述

like nitro!

Please track at https://github.com/XMOJ-Script-dev/xmoj-bbs-v2

原因

our implementation is very ad-hoc...

@boomzero boomzero added the enhancement New feature or request label Feb 3, 2024
@boomzero
Copy link
Member Author

boomzero commented Feb 5, 2024

@PythonSmall-Q @zhouyiqing0304 any news?

@boomzero
Copy link
Member Author

boomzero commented Feb 7, 2024

Plus, we get an openapi yml

@boomzero
Copy link
Member Author

boomzero commented Feb 7, 2024

...

@PythonSmall-Q
Copy link
Member

Plus, we get an openapi yml

whats that @boomzero

@boomzero
Copy link
Member Author

@boomzero boomzero closed this as not planned Won't fix, can't repro, duplicate, stale Apr 5, 2024
@boomzero boomzero reopened this Sep 8, 2024
@boomzero
Copy link
Member Author

boomzero commented Sep 8, 2024

I have decided to rewrite the backend.

@boomzero
Copy link
Member Author

boomzero commented Sep 8, 2024

The main reason is that I hate @langningchen 's legacy code, and I want to actually own a piece of code in the project.

@boomzero
Copy link
Member Author

boomzero commented Sep 8, 2024

@boomzero
Copy link
Member Author

boomzero commented Sep 8, 2024

Trying to get error handling to work... I currently can only extract a cryptic stack trace

@boomzero
Copy link
Member Author

boomzero commented Sep 8, 2024

@boomzero
Copy link
Member Author

boomzero commented Sep 8, 2024

Okay... I am preserving some compatibility, so I can copy some code.
The Result class can stay.

@boomzero
Copy link
Member Author

boomzero commented Sep 8, 2024

One thing that will definitely not stay is Database.ts

@boomzero
Copy link
Member Author

boomzero commented Sep 8, 2024

I am going to use an actual ORM, not one that @langningchen wrote.

@boomzero boomzero pinned this issue Sep 8, 2024
@boomzero
Copy link
Member Author

boomzero commented Sep 8, 2024

Just realized that this should be v3, since v1 is php...

@langningchen
Copy link

The main reason is that I hate @langningchen 's legacy code, and I want to actually own a piece of code in the project.

我当时根本没有想要将这个 XMOJ-Script 发布,本来就是自己随便写了一个,最开始开发的时候根本没有按照任何规范开发……

@boomzero
Copy link
Member Author

boomzero commented Sep 15, 2024

The main reason is that I hate @langningchen 's legacy code, and I want to actually own a piece of code in the project.

我当时根本没有想要将这个 XMOJ-Script 发布,本来就是自己随便写了一个,最开始开发的时候根本没有按照任何规范开发……

@langningchen 我这里说的是 XMOJ-bbs, 显然后台的开发时间晚于 “最开始” ……

我不喜欢的主要是它一层一层 return 下来的结构,即你没法直接向客户端发 response,必须经过几层 return, 而这样会导致改变一个东西可能有意外的副作用。

然后就是看似没有问题的代码会有很多 Bug,比如 fce057a 就是因为我实在调不出来

@boomzero
Copy link
Member Author

然后在 iPadOS 上用键盘打字的感觉好奇怪……

@boomzero
Copy link
Member Author

boomzero commented Sep 15, 2024

The main reason is that I hate @langningchen 's legacy code, and I want to actually own a piece of code in the project.

我当时根本没有想要将这个 XMOJ-Script 发布,本来就是自己随便写了一个,最开始开发的时候根本没有按照任何规范开发……

@langningchen 我这里说的是 XMOJ-bbs, 显然后台的开发时间晚于 “最开始” ……

我不喜欢的主要是它一层一层 return 下来的结构,即你没法直接向客户端发 response,必须经过几层 return, 而这样会导致改变一个东西可能有意外的副作用。

然后就是看似没有问题的代码会有很多 Bug,比如 fce057a 就是因为我实在调不出来

备注一下,在 nitro 中可以用 send 函数

https://github.com/XMOJ-Script-dev/xmoj-bbs-v2/blob/b9768dcbe03392f68d733699645204c39e6e9605/server/error.ts#L5

@langningchen
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants