1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
|
---
title: 教程
slug: Mozilla/Add-ons/SDK/Guides
tags:
- NeedsTranslation
- TopicStub
translation_of: Archive/Add-ons/Add-on_SDK/Guides
---
<p>下面列出了一些文章可以加深你对SDK的理解</p>
<hr>
<h3 id="投稿者的教程"><a name="contributors-guide">投稿者的教程</a></h3>
<div class="column-container">
<div class="column-half">
<dl>
<dt>
<a href="Guides/Getting_Started">起步</a></dt>
<dd>
学会如何使用SDK : 编写代码, 调试bug, 提交补丁, 审核项目, 获得帮助.</dd>
<dt>
<a href="Guides/Modules">模块</a></dt>
<dd>
通过SDK学会模块的使用 (以CommonJS为规范), 懂得如何使用 sandboxes 和compartments 提高安全性, 并且了解内置的 SDK module loader (被称为Cuddlefish).</dd>
<dt>
<a href="Guides/Classes_and_Inheritance">类 和 继承</a></dt>
<dd>
学会<strong> 类</strong>和<strong>继承</strong>在JavaScript中的运行机制, 使用<strong>构造(constructors)</strong>和<strong>原型(prototypes)</strong>, 并知道如何使用SDK提供的函数帮助器简化它.</dd>
</dl>
</div>
<div class="column-half">
<dl>
<dt>
<a href="Guides/Private_Properties">私有成员</a></dt>
<dd>
通过 前缀, 闭包, 和WeakMaps 学会私有成员如何在JavaScript中的实现, 使用 命名空间(通常指WeakMaps) 学会SDK如何支持私有成员.</dd>
<dt>
<a href="Guides/Content_Processes">脚本运行流程</a></dt>
<dd>
SDK的设计目的是为了使控制网页内容的扩展脚本可以在不同进程的环境中运行. 这篇文章强调了这一设计的特点.</dd>
</dl>
</div>
</div>
<hr>
<h3 id="SDK的基础结构"><a name="sdk-infrastructure">SDK的基础结构</a></h3>
<div class="column-container">
<div class="column-half">
<dl>
<dt>
<a href="Guides/Module_structure_of_the_SDK">SDK 模块结构</a></dt>
<dd>
SDK是可重复使用的 JavaScript 模块. 这里解释了什么是模块, 怎样加载模块, 和SDK模块树的构造.</dd>
<dt>
<a href="Guides/SDK_API_Lifecycle">SDK API 生存周期</a></dt>
<dd>
为SDK的API定义生命周期, 包括API稳定性的排名</dd>
</dl>
</div>
<div class="column-half">
<dl>
<dt>
<a href="Guides/Program_ID">程序 ID</a></dt>
<dd>
程序ID 是扩展独一无二的标识符. 教程解释了如何定义你自己的程序 ID.</dd>
<dt>
<a href="Guides/Firefox_Compatibility">Firefox 兼容</a></dt>
<dd>
解决不同版本SDK生成的扩展与不同版本Firefox的兼容问题</dd>
</dl>
</div>
</div>
<hr>
<h3 id="SDK_常用技巧"><a name="sdk-idioms">SDK 常用技巧</a></h3>
<div class="column-container">
<div class="column-half">
<dl>
<dt>
<a href="Guides/Working_with_Events">善用 事件触发</a></dt>
<dd>
通过SDK的事件触发框架 写出以事件驱动为基础的代码</dd>
</dl>
</div>
<div class="column-half">
<dl>
<dt>
<a href="Guides/Two_Types_of_Scripts">脚本的两种类型</a></dt>
<dd>
这篇文章可以帮助你理解扩展中的API和普通脚本的区别</dd>
</dl>
</div>
</div>
<p> </p>
<hr>
<h3 id="XUL_迁移"><a name="xul-migration">XUL 迁移</a></h3>
<div class="column-container">
<div class="column-half">
<dl>
<dt>
<a href="Guides/XUL_Migration_Guide">XUL 迁移教程</a></dt>
<dd>
把XUL扩展迁移到SDK的技巧</dd>
<dt>
<a href="Guides/XUL_vs_SDK">XUL 与 SDK 不同</a></dt>
<dd>
比较 传统的以XUL为基础的扩展 和 SDK 两者优点和缺点</dd>
</dl>
</div>
<div class="column-half">
<dl>
<dt>
<a href="Guides/Porting_the_Library_Detector">移植例子</a></dt>
<dd>
一个简单地教你如何让 基于XUL的扩展 迁移到 SDK中的实例</dd>
</dl>
</div>
</div>
<p> </p>
|