UI Framework-1: UI Development Practices
UI Development Practices
Guidelines Principles for developing for Chrome. These best practices center around ensuring features are implemented as efficiently as possible. Content Area (UI in a Tab)The UI that lives in the content area should be implemented with HTML technologies on desktop platforms. (Either web or native can be used for the content area UI on Android and iOS.) This HTML can be either WebUI or plain HTML and JS bundled with Chrome. It should work with no connection and lo-fi connections. The expectation is that the implementation does not contain polyfills, code that only executes for other browsers, or arcane Web development practices. Non-Content Area (UI in Popups or in Chrome’s Chrome)UI outside of the content area should be implemented using Views (in C++) for Windows/Linux/ChromeOS. Mac UI is done with Cocoa although work is progressing on porting Views to it as well. The expectation is that UI of this style is limited to small, transient windows with low-complexity UI. On Clank, this UI should be implemented using the Android View system. Manipulating DOM on Arbitrary PagesSome features need to inspect or modify the DOM of the current tab, which can be any arbitrary website. Blink's Web* C++ API is intentionally simple and limited to guide you to use it only for what is practical. When Blink’s C++ API is impractical, use isolated world script injection. The script injected should be as lean as possible and should not contain any code that deals with other browsers (for example Closure). Because script injection carries a runtime and memory cost, it is expected that it is driven by a user action that has an expectation of work. A good example is ‘translate’. If inspecting every page that the user might open is required, script injection is not recommended. For this case, consult with chrome-eng-review@ for an appropriate solution. For example, reader mode converted the triggering logic from script injection to native implementation. Prototyping and Exploring the Solution SpaceExperimenting can be accomplished with an extension. Non-confidential features can be published on the Chrome Web Store and installed manually for early testing. Confidential extensions can be enabled only for trusted testers so they are invisible to the public. Extensions can use content scripts to do script injection and can use page actions and browser actions to provide UI outside the content area. Extensions can also use NaCL, which has full access to the Pepper API. Component extensions (i.e. extensions automatically installed into Chrome) are also a prototyping option, but should only be used if there is something needed that a regular extension cannot do. Extensions should strive to only execute on explicit user action and never on startup. Persistent background pages should be avoided. Event pages should only be used for infrequent items like push messaging, hardware events, alarms etc…, but not common events like navigation. If you need to do something that imposes a constant load or requires updating state on each navigation, consult the extensions team; they might be able to provide a declarative API so the job can be done with low impact. Failing that, consult with chrome-eng-review@ if you need to deviate from these guidelines. |
UI Framework-1: UI Development Practices的更多相关文章
- Hybrid UI framework shootout: Ionic vs. Famo.us vs. F7 vs. OnsenUI
1 Introduction In the past 2 years I’ve been working intensively on mobile applications, mostly hybr ...
- 00 - Vue3 UI Framework - 阅读辅助列表
阅读列表 01 - Vue3 UI Framework - 开始 02 - Vue3 UI Framework - 顶部边栏 03 - Vue3 UI Framework - 首页 04 - Vue3 ...
- 【转】What is an entity system framework for game development?
What is an entity system framework for game development? Posted on 19 January 2012 Last week I relea ...
- 创新高性能移动 UI 框架-Canvas UI 框架
WebView 里无法获得的能力虽然是「体验增强」与「端基本能力」,但现都基本上有成熟解决方法.但后期的 UI 和 Layout 的性能反而是目前 Web 技术欠缺的.所以,无论是 Titanium ...
- Unity 游戏框架:UI 管理神器 UI Kit
UI Kit 快速入门 首先我们来进行 UI Kit 的快速入门 制作一个界面的,步骤如下: 准备 生成代码 逻辑编写 运行 1. 准备 先创建一个场景 TestUIHomePanel. 删除 Hie ...
- iPhone/iPad/Android UI尺寸规范 UI尺寸规范,UI图标尺寸,UI界面尺寸,iPhone6尺寸,iPhone6 Plus尺寸,安卓尺寸,iOS尺寸
iPhone/iPad/Android UI尺寸规范 UI尺寸规范,UI图标尺寸,UI界面尺寸,iPhone6尺寸,iPhone6 Plus尺寸,安卓尺寸,iOS尺寸 iPhone界面尺寸 设备 分辨 ...
- 学习通过Thread+Handler实现非UI线程更新UI组件
[Android线程机制] 出于性能考虑,Android的UI操作并不是线程安全的,这就意味着如果有多个线程并发操作UI组件,可能导致线程安全问题.为了解决这个问题,Android制定了一条简单的规则 ...
- HTML5 UI框架Kendo UI Web中如何创建自定义组件(二)
在前面的文章<HTML5 UI框架Kendo UI Web自定义组件(一)>中,对在Kendo UI Web中如何创建自定义组件作出了一些基础讲解,下面将继续前面的内容. 使用一个数据源 ...
- iframeWin For Easy UI. 为 Easy UI 扩展的支持IFrame插件
iframeWin For Easy UI. 为 Easy UI 扩展的支持IFrame插件 在一个项目中用了Easy UI,但是发现里面的 Dialog .Window.Messager 弹窗都不支 ...
随机推荐
- IntelliJ IDEA中JAVA连接MYSQL
1.下载mysql包 2.项目中引入mysql包 3.连接数据库,查询结果 看jdbc数据库连接类 package Facade; import java.sql.*; /** * Created b ...
- 关于linux下QIODevice类进行读取的几个方法的理解
Qt中对读写设备的支持力度很大,其都继承与QIODevice类,其中有几个方法是非常值得注意的,不管是在用原始的serial port进行通信还是使用网络的TCP/IP 或者UDP或者HTTP等协议时 ...
- CSS3个人盲点总结【总结中..........】
~:表示同辈元素之后指定类型的元素,如;elm1 ~ elm2表示,elm1之后的所有elm2元素,且elm1与elm2都是在同一个父级元素. +:表示同辈元素的兄弟元素. \A:一个空白换行符 &l ...
- Edge 浏览器
Edge浏览器设计理念 无法播放:https://edgewelcomecdn.microsoft.com/site/images/tabs/rs3/tabs_screen.acd367a2.mp4 ...
- 编程语言与Python学习(一)
1.1 编程与编程语言 1.1.1 编程语言 计算机的发明,是为了用机器解放人力,而编程的目的则是将人类的思想流程按照某种能够被计算机识别的表达方式传递给计算机,从而达到让计算机能够像人脑一样自动执行 ...
- 关于 jsp java servlet 中文汉字乱码的解决方法
在servlet类中的get,post最前面加上 req.setCharacterEncoding("UTF-8"); resp.setCharacterEncoding(&quo ...
- 微软的鼠标 Microsoft mouse
微软是做软件出身的厂商, 所以微软开发的软件质量毋庸置疑,Windows操作系统还有诸如Office的办公软件拥有庞大的用户群. 微软家的Visual Studio也被号称宇宙最强IDE,我个人也每天 ...
- NodeJS学习笔记 (9)网络服务-https(ok)
模块概览 这个模块的重要性,基本不用强调了.在网络安全问题日益严峻的今天,网站采用HTTPS是个必然的趋势. 在nodejs中,提供了 https 这个模块来完成 HTTPS 相关功能.从官方文档来看 ...
- C语言变量名转字符串的方法
C语言中将变量名转换成字符串使用的是#符号,来看下边两个宏定义: #define name2str(name) (#name) #define print_val(x) printf(#x" ...
- 【BZOJ 1193】 [HNOI2006]马步距离
[链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 原问题可以等价为两个点. 然后其中一个点要移动到另外一个点. 那么我们可以把左下角那个点(对称总是可以得到一个点在左下角)放在原点的 ...