GithubHelp home page GithubHelp logo

Comments (4)

summertian4 avatar summertian4 commented on July 1, 2024

使用 OC 的好处是可以在 load 方法中解决注册的问题(对于解耦路由来说),Swift 中没有 load 方法,如果没有 load 方法,所以只能另寻其他解决方案,这时 OC 也没有更多的优势。

from lotusoot.

summertian4 avatar summertian4 commented on July 1, 2024

另外对于『约定优于配置』,对沉淀已久的框架开发是可以的,比如 Java 几大常见框架。但是对于 iOS 开发,很少很能见到通用的范式,也很难管理团队内的规范,除了 Code Review,要尽量做到将问题今早暴露,这也是移动端开发往往使用 CI 来保证 PR 合并之前的质量。

from lotusoot.

yizzuide avatar yizzuide commented on July 1, 2024

比如:
控制器约定为:组件名+ViewController后辍
业务组件约定为:组件名+Lotusoot后辍
这样不用每新建一个类加一些注解,可以通过注册组件名,再使用反射机制拿到类

from lotusoot.

summertian4 avatar summertian4 commented on July 1, 2024

约定是不可靠的,现在 Lotusoot 还是使用字串的方式作为注解,和约定基本上没有区别。
但是努力的方向应该是通过能监测的方式作为注解,去掉不可靠因素,约定不能保证不出错,等到闪退就迟了。

from lotusoot.

Related Issues (8)

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.