Giter Club home page Giter Club logo

mimir's Issues

[代码优化建议] 抽取独立出校内服务的非ui代码

考虑是否有必要可以将访问学校内的相关服务的实体定义,鉴权登录,爬虫与解析等相关非ui的代码抽取为一个独立的dart package?

  1. 这将可以形成一个SIT校内各个服务的SDK项目,后面可以方便供开发者甚至是用户写一些相关的脚本小工具。
  2. 开发命令行版本的各种信息查询工具。
  3. 编写自动化测试代码,对学校的各个校内服务进行定时集成测试,确保学校的服务行为产生非兼容性变更时能够及时发现。
  4. 其中的实体定义后续的云同步服务端如果仍使用dart,则可以复用相关实体定义代码

Development Roadmap

Feature

Timetable

  • Timetable palette: Inverse text color #51

Second Class

  • Second class: Activity collection
  • Second class: Activity deep link

OA Announcement

  • OA announcement: Collection
  • OA announcement: Deep link

Exam arrangement

  • Exam arrangement: Disqualified exam

Network tool

  • Network tool: Checking the connectivity of school server.

Improvement

Timetable

  • Timetable editor: Improving selector of repeating and lesson range
  • Timetable: Improving the performance when scrolling down

[代码优化建议] 依赖组件管理

现状

当前各个功能模块的依赖注入均为在相应模块中创建init.dart文件,通过static late变量和static void init()对这些静态变量完成初始化,在模块内部的代码直接访问这个类的static late变量进行依赖组件的访问。

弊端

这造成了各个ui组件相当于对全局变量进行了耦合,只不过这个全局变量带有一个类名(命名空间),但仍具有全局变量的一些弊端。

可能的改进方向

  1. 使用依赖注入框架 https://pub.dev/packages/injectable
  2. 手动封装一个统一依赖管理的容器?通过构造函数传值或BuildContext传值的形式,统一在路由层向下传递依赖,在页面中进依赖接口,以多态接口的形式使用获取具体的依赖组件。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.