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

谈一下微信小程序的架构以及为什么要用到双线程 #205

Open
lgwebdream opened this issue Jul 6, 2020 · 2 comments
Open
Labels
其它 teach_tag 快手 company

Comments

@lgwebdream
Copy link
Owner

No description provided.

@lgwebdream lgwebdream added 其它 teach_tag 快手 company labels Jul 6, 2020
@lgwebdream
Copy link
Owner Author

扫描下方二维码,获取答案以及详细解析,同时可解锁800+道前端面试题。

@talang1991
Copy link

小程序是多WebView的架构,所以每一个页面都是不同的WebView渲染显示,所以单独创建了一个线程去执行JS,也就是逻辑层,而界面渲染的任务都在WebView线程里执行(渲染层)。即双线程模型,将逻辑层与视图层进行分离,视图层和逻辑层之间只有数据的通信,可以防止开发者随意操作界面,更好的保证用户的数据安全。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
其它 teach_tag 快手 company
Projects
None yet
Development

No branches or pull requests

2 participants