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

V2 Refactors: Introduction for Modern Application #27

Open
FerdinandSu opened this issue Dec 4, 2023 · 0 comments
Open

V2 Refactors: Introduction for Modern Application #27

FerdinandSu opened this issue Dec 4, 2023 · 0 comments

Comments

@FerdinandSu
Copy link
Contributor

Due to lack of maintenance, JMobileSuit's design architecture lags far behind MobileSuit. Nowadays, many improvements have helped JMobileSuit make significant progress, especially @yrris 's introduction of Spring's improvements in #21 , which has enabled us to have a true dependency injection system

I think it's time to bridge these gaps. We will imitate MobileSuit's design and develop version 2, which mainly includes the following refactoring work:

  1. V2 Refactor: Core Components using Dependency Injection, Middlewares and Services #23 Thoroughly refactor the core components, imitating MobileSuit's approach based on dependency injection, middleware, and service registration to complete the current core functions; The main case code for this part of the reference project is located in 'HitRefresh' MobileSuit Core, therefore the relevant components of JMobileSuit should be located in package ReFreSH JMobileSuit `;

  2. V2 Refactor: Client instantiation method #24 Change the instantiation method of the client application (SuitClient) from singleton mode to single request mode to facilitate refreshing the application context between different requests, facilitating database operations, and providing support for parallelism

  3. V2 Refactor: Async operation support #25 Provide asynchronous operation support, task lifecycle management, and enable applications to run in parallel (in the background)

  4. V2 Refactor: Configuration file injection support #26 Configuration file injection support: Like MobileSuit, the injected IConfiguration can be directly used to access the specified configuration file (appsettings. json)

由于疏于维护,JMobileSuit的设计架构远远落后于MobileSuit。现在,许多改进已经帮助JMobileSuit进步了很多,尤其是@yrris#21 引入Spring的改进,使得我们有了真正的依赖注入系统.
我想是时候抹平这些差距了,我们将模仿MobileSuit的设计,开发版本2,主要包含以下几项重构工作:

  1. V2 Refactor: Core Components using Dependency Injection, Middlewares and Services #23 彻底重构核心组件,模仿MobileSuit基于依赖注入、中间件和服务注册的方式完成当前的核心功能;参考项目的这部分主要案例代码位于HitRefresh.MobileSuit.Core,故JMobileSuit的相关组件应该位于package ReFreSH.JMobileSuit;
  2. V2 Refactor: Client instantiation method #24 将客户端应用(SuitClient)的实例化方式从单例模式改为单请求模式,以方便在不同的请求间刷新应用上下文,方便对数据库的操作,提供对并行的支持
  3. V2 Refactor: Async operation support #25 提供异步操作支持,提供任务生命周期管理,使应用支持并行(后台运行)
  4. V2 Refactor: Configuration file injection support #26 配置文件注入支持:像MobileSuit那样可以直接使用注入的IConfiguration访问指定的配置文件(appsettings.json)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant