Comments (4)
使用 OC 的好处是可以在 load 方法中解决注册的问题(对于解耦路由来说),Swift 中没有 load 方法,如果没有 load 方法,所以只能另寻其他解决方案,这时 OC 也没有更多的优势。
from lotusoot.
另外对于『约定优于配置』,对沉淀已久的框架开发是可以的,比如 Java 几大常见框架。但是对于 iOS 开发,很少很能见到通用的范式,也很难管理团队内的规范,除了 Code Review,要尽量做到将问题今早暴露,这也是移动端开发往往使用 CI 来保证 PR 合并之前的质量。
from lotusoot.
比如:
控制器约定为:组件名+ViewController后辍
业务组件约定为:组件名+Lotusoot后辍
这样不用每新建一个类加一些注解,可以通过注册组件名,再使用反射机制拿到类
from lotusoot.
约定是不可靠的,现在 Lotusoot 还是使用字串的方式作为注解,和约定基本上没有区别。
但是努力的方向应该是通过能监测的方式作为注解,去掉不可靠因素,约定不能保证不出错,等到闪退就迟了。
from lotusoot.
Related Issues (8)
- 继承AccountLotus协议必须实现里面所有代理方法 HOT 1
- 是否有纯oc版本的 HOT 1
- Lotusoot.plist内容为空 HOT 1
- 跳转以后如何方向传值 HOT 1
- swift5 substring方法过期了
- route register
- 小姐姐好
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lotusoot.