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
软件架构依赖倒置优化建议 #141
Comments
我最近有事耽搁,后面我会仔细查看你的 PR,非常感谢你的建议! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
首先请允许我分享我所绘制的项目架构图:
针对项目架构层面依赖倒置原则,项目存在一些潜在的优化点:
/api/login/index.ts
文件直接调用 request 方法处理 API 请求,使其他模块高度依赖于具体实现。可定义一个抽象的 API 接口,并使当前文件遵循这一接口/store/modules/permission.ts
文件直接依赖于具体的路由配置。可定义一个抽象的权限接口/router/permissions.ts
文件直接依赖于具体的用户和权限存储实现。可定义一个抽象的权限处理接口我计划基于这些观点对项目进行针对性的优化。如有不妥之处,还请不吝赐教。
The text was updated successfully, but these errors were encountered: