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 弹窗都不支 ...
随机推荐
- 模拟退火算法c++
转载. 为方便理解, 在原博客的基础上加部分注释, 原博客地址:http://www.cnblogs.com/CsOH/p/6049117.html 今天终于用模拟退火过了一道题:CodeVS: P1 ...
- m_Orchestrate learning system---十四、数据表中字段命名规则
m_Orchestrate learning system---十四.数据表中字段命名规则 一.总结 一句话总结:a.保证唯一 b.见名知意 1.注意php中的数组类函数和字符串类函数的前缀? 数组类 ...
- ThinkPHP5.0框架开发--第7章 TP5.0数据库操作
ThinkPHP5.0框架开发--第7章 TP5.0数据库操作 第7章 TP5.0数据库操作 ===================================================== ...
- 时域,频域,s域和z域,一些网上的总结
https://www.jianshu.com/p/29f4a7663b14 https://wenku.baidu.com/view/26961183b9d528ea81c779e0.html ht ...
- Linux部署之批量自动安装系统之DHCP篇
1. 安装:yum install dhcp 2. Ip配置信息 3. Dhcp配置文件如下 4. 配置完后检查语法是否错误 ...
- LightOJ-1138 Trailing Zeroes (III) 唯一分解定理 算n!的某个因数个数
题目链接:https://cn.vjudge.net/problem/ 题意 找一个最小的正整数n 使得n!有a个零 思路 就是有几个因数10呗 考虑到10==2*5,也就是说找n!因数5有几个 数据 ...
- ifram 实现左侧菜单,右侧显示内容
一般都是左侧的导航栏中的a标签中写一个target(a标签有target属性), 右侧的div标签中写一个iframe,在iframe中有name的属性,在左侧a标签中的target写上iframe中 ...
- Qt之QSS(动态属性)
简述 QSS可以定制应用程序的外观,无需关注Qt样式背后的魔力.从非常轻微到极其复杂的调整,样式表都可以做到.对于一个完全定制和独特的用户体验,QtQuick和QGraphicsView是更好的选择. ...
- 与Greenplum度过的三个星期
5月4日-5月24日.断断续续折腾了三个星期的Greenplum,总算告一段落了:扩容,发现扩不成容.仅仅好升级.升级,发现一堆错误,仅仅好暂停修复数据库:修好了,继续升级.升完级,发现错误.修啊修啊 ...
- moble 设备多指手势识别 (tap , double_tap , pinch)
function(){ elem.addEventListener('touchstart', start , false) elem.addEventListener('touchend', end ...