Clean Architecture
Posted on Wed 26 May 2021 in Journal
Quote
参见 https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html
Robert C.Martin 提出了 Clean Archtecture的思想, 核心思想是关注点分离和稳定依赖原则,其实就是分离易变与不易变的东西,即使要有依赖也是多变的依赖稳定的,与 DDD 所提倡的,把领域模型抽象出来,尘归尘,土归土,框架和软件库的更换不影响领域模型,领域逻辑的变化不影响底层框架和软件库。
1) Independent of Frameworks. The architecture does not depend on the existence of some library of feature laden software. This allows you to use such frameworks as tools, rather than having to cram your system into their limited constraints.
2) Testable. The business rules can be tested without the UI, Database, Web Server, or any other external element.
3) Independent of UI. The UI can change easily, without changing the rest of the system. A Web UI could be replaced with a console UI, for example, without changing the business rules.
4) Independent of Database. You can swap out Oracle or SQL Server, for Mongo, BigTable, CouchDB, or something else. Your business rules are not bound to the database.
5) Independent of any external agency. In fact your business rules simply don’t know anything at all about the outside world.
Program
在 WebRTC 中 对于视频流的自动播放有着严格的规定,
For any app or service to successfully run an autoplay element, the video must either come without an audio track or with a muted attribute. The video element will automatically pause when and if the video becomes unmuted without user interaction or if the video is no longer onscreen.
Additional options are available in the respective website preferences pane to allow or disable autoplay, disable audio in general, or more. In addition to that, both browsers are going to introduce an automated approach, which decides if auto-play will be blocked for media elements with sound in general or if auto-play is disabled at all.
Words
【pick up不止"捡起" 】
🌼Pick up 学会,习得 🍐I picked up a little French when I traveled to France 3 years ago. 三年前去法国的时候,学了一点点法语。
🌼 Pick up接电话 🍐The phone rang and rang and nobody picked up. 电话响了很久都没有人接。
🌼Pick up 收到信号 🍐Could you pick China Radio International up on your radio? 你的收音机能收到中国国际广播电台吗?
🌼Pick someone up 接某人 🍐Hello,I am at gate 7 of Arrival floor, Pudong International Airport. Could you pick me up here? 你好。我在浦东机场达到层的7号门。能在这接一下我吗?
🌼Pick someone up on sth 在某方面挑某人的毛病 🍐I’d like to pick up on a couple of mistakes that you made. 我想说说你刚才犯得一些错误。
🌼Pick up 碰巧买到(廉价的东西) 🍐My mom picked up some real bargains from the clothing shop. 我妈从服装店淘了几件便宜货回来。