Giter Site home page Giter Site logo

imi v2 版本最新规划及动态 about imi HOT 14 CLOSED

imiphp avatar imiphp commented on August 23, 2024 8
imi v2 版本最新规划及动态

from imi.

Comments (14)

Yurunsoft avatar Yurunsoft commented on August 23, 2024 11

神秘新特性难道是在php7.xphp8.x的官方注解?

你想多了,PHP 8.0 的注解真的丑,暂时不会考虑去支持……

打脸了,已经支持 PHP 8.0 原生注解(原注释写法依旧支持)

from imi.

Yurunsoft avatar Yurunsoft commented on August 23, 2024 2

一把梭现在还差一个微信开发的包,如果有微信开发的包,毕竟做微信开发的太多太多了,如果有那就更好了

https://github.com/overtrue/wechat

from imi.

windylaugit avatar windylaugit commented on August 23, 2024 2

提个建议: imi v2 建议增加一套 用于DB层、微服务层 等的快捷注解模块。(从java-express大型项目参考而来),代码效果类似以下:
一、DB层相关注解写法(伪代码,下同):

// 某个DB层的微服务类
class SomeDbService {
   // 在DB层服务类内部靠前部分统一书写SQL
   const String QUERY_SQL = "SELECT * FROM e_some_table WHERE id=:id,status IN(:statusList)";

  // 该微服务向外暴露方法,以条件对象为入参,换取结果。外部不关心具体DB的内核如何实现。
  @Query(QUERY_SQL)
  List<SomePO> getList(SomeQO qo); 

}

// 某个微服务的接口类, 根据不同的业务架构,可能有method的方式,也可能有通过pathRoute的方式,推荐method

@Service({ methodPre=“xxx.xxx.xxx”, path="/api/route/rest/someModule/someApi/someFunc.json" })
class SomeApiServie {
   // 注入DB层服务
   @Inject
   private SomeDbService dbService;
   
   // 对外公开的接口方法, 也可以省略注解,默认情况Service所有的public方法均公开。
   @ServiceMethod({ name = "getList" })
   public List<SomeDTO> getSomeList (SomeQO qo) {
      // 这里我偷下懒,用伪代码大概表示下 数据转换。
      return this.dbService.getList(qo).map(po => dto);
   }
}

/************************************ 华丽分割 ***************************************/
以上伪代码,只是个人从项目开发经验出发提出的期望,存在不少超出底层框架应该做的事情, 但这里是个人的一个想法建议,期望大佬V2版本里,能略参考下我的这个想法,能从框架层面尽可能的 提供 实现方面的支持, 比如DB层框架提供原生SQL注解,开发人员也能继承去扩展实现等。

期待V2, 祝 越来越好。

from imi.

ftlh2005 avatar ftlh2005 commented on August 23, 2024

加油干

from imi.

azhuang321 avatar azhuang321 commented on August 23, 2024

加油大神

from imi.

Maoxp avatar Maoxp commented on August 23, 2024

等我能看懂你的代码了,大佬就后继有人了

from imi.

pizriw avatar pizriw commented on August 23, 2024

加油

from imi.

foxhunter avatar foxhunter commented on August 23, 2024

继续一把梭

from imi.

Mjc960512 avatar Mjc960512 commented on August 23, 2024

一把梭现在还差一个微信开发的包,如果有微信开发的包,毕竟做微信开发的太多太多了,如果有那就更好了

from imi.

NHZEX avatar NHZEX commented on August 23, 2024

神秘新特性难道是在php7.xphp8.x的官方注解?

from imi.

Mjc960512 avatar Mjc960512 commented on August 23, 2024

还是强烈建议查询关联的时候可以单独指定条件,给一个查询器where,page,order,limit,参考laravel,tp等框架的关联预加载

from imi.

Yurunsoft avatar Yurunsoft commented on August 23, 2024

一切准备就绪,只等良辰吉日吉时的到来。
永远相信美好的事情即将发生~

from imi.

hjb0924 avatar hjb0924 commented on August 23, 2024

坐等发布

from imi.

Yurunsoft avatar Yurunsoft commented on August 23, 2024

imi 2.0 正式发布

https://wenda.swoole.com/detail/107855
https://www.zhihu.com/zvideo/1404410018154770432
https://www.bilibili.com/video/BV1Bv411E7ce/

from imi.

Related Issues (20)

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.