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

设计思路 #2

Open
himself65 opened this issue Mar 10, 2019 · 13 comments
Open

设计思路 #2

himself65 opened this issue Mar 10, 2019 · 13 comments
Assignees
Labels
enhancement New feature or request

Comments

@himself65
Copy link
Member

himself65 commented Mar 10, 2019

花了两天把https://github.com/Himself65/create-bread-app 基本撸完了
然后突发奇想,如果oi-test也有这种东西该有多好(虽然我并不参加

目前的设计思路

#8

@langyo
Copy link

langyo commented Mar 10, 2019

建议使用基于 React 的 UI 库 Material UI (material-ui.com)

建议使用 Reflux 实现前端数据交换 (不影响 koa 的使用,使用 Reflux 可以将诸如 Ajax 请求与 cookies 操作等从 React 本身剥离出来)

(本人准备要动工做的 OI 平台 Multi_OI 大概需要你的库,所以我最近或许能腾出时间帮你写点什么)

@himself65
Copy link
Member Author

@langyo 你可以自己写一个demo

@himself65 himself65 added the enhancement New feature or request label Mar 10, 2019
@himself65 himself65 self-assigned this Mar 10, 2019
@himself65 himself65 pinned this issue Mar 10, 2019
@himself65 himself65 added this to In progress in Project Main Plans Mar 10, 2019
@himself65
Copy link
Member Author

项目结构

- lib   # 核心库文件,包括但不限于judge和helpers、utils
- src  # 界面库文件
    - cli   # 命令行部分
    - ui    # UI部分
    - server # 服务器部分,负责打通ui和cli的通信

@himself65
Copy link
Member Author

core部分

judge通过结合EventEmitter、child_spawn等实现测试程序,如果需要安全沙盒则可以将此部分部署到docker中

// todo

@himself65
Copy link
Member Author

cli部分

结合commander库实现快速测试程序,需要judge

@himself65
Copy link
Member Author

ui部分

暂时考虑使用React.js,包含Redux(如果需要),使用element-ui或ant-design

附带一提,此部分仅仅是作为方便显示程序,实际上没有任何逻辑代码

@himself65
Copy link
Member Author

server部分

可以部署到生产环境

通过ui部分的信息来操作cli(并不直接操作lib),使用koa.js,不包含任何安全检查,可以考虑做成koa的插件,方便使用

@himself65
Copy link
Member Author

其他细节

  • 使用eslint,eslint-config-standard检查代码正确

  • babel采用pipeline-operator、function-bind等stage-x特性来提升代码体验

  • lib、cli、serve采用rollup打包,ui库使用webpack打包

  • rrreol使用lerna维护

@langyo
Copy link

langyo commented Mar 10, 2019

本人并不是经常能够上线 qq,不过 Github 常在线,会定期检查邮箱

Q 已加,你把上头的验证答案修改掉吧,

另外,UI 部分或许可以考虑 material-ui?(本人能力推此库不是没有理由的,它确实做的很棒)

@himself65
Copy link
Member Author

@langyo
你有空可以到/src/ui中写一个脚手架 能运行就行那种

@langyo
Copy link

langyo commented Mar 11, 2019

@langyo
你有空可以到/src/ui中写一个脚手架 能运行就行那种

收到了

@himself65
Copy link
Member Author

@langyo
今晚我会写好脚手架

@himself65
Copy link
Member Author

himself65 commented Apr 14, 2019

JudgeWrapper 属于伪需求, 已经删除

#116

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
Project Main Plans
  
In progress
Development

No branches or pull requests

2 participants