-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrebulid.html
268 lines (246 loc) · 9.81 KB
/
rebulid.html
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>The road to the web rebuild</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div id="impress" class="impress-not-supported">
<div class="fallback-message">
<p>您的浏览器太低级啦,换chrome吧</p>
</div>
<div class="step slide index" data-x="-1000" data-y="-1500" data-z="-1000">
<h1>重构の路<q>——The road to the web rebuild.</q></h1>
<ul>
<li><a href="#rebuild-what">一,什么是重构</a><q>The meaning of web rebuild.</q></li>
<li><a href="#rebuild-weapon">二,重构的武器</a><q>The weapon of web rebuild.</q></li>
<li><a href="#rebuild-future">三,未来的重构</a><q>The future of web rebuild.</q></li>
</ul>
</div>
<div id="rebuild-what" class="step slide page2" data-x="1500" data-y="-1500" data-z="0">
<h2>一,什么是重构</h2>
<q>The meaning of web rebuild.</q>
<blockquote>
<small>换个话题,我是谁?</small>
</blockquote>
<img src="images/question.jpg" alt="">
</div>
<div class="step slide page3" data-x="4000" data-y="-1500" data-z="1000">
<h3>我是谁:</h3>
<ul>
<li><strong>Age : </strong>维生数大四的老人</li>
<li><strong>Name : </strong>HB -- Bindy Lin</li>
<li><strong>Position : </strong>腾讯SNS应用设计中心</li>
<li><strong>PS: </strong>我为自己带盐</li>
</ul>
<img src="images/me.jpg" alt="" class="me">
</div>
<div class="step slide page4" data-x="-1000" data-y="-1500" data-z="5000">
<h2>继续话题,什么是重构</h2>
<q>Go on,The meaning of web rebuild.</q>
<p class="info">我们从开发流程说起,web的开发流程大概是这样的:</p>
<div class="workflow">
<div class="wbox">
<img src="images/w1.jpg" alt="" width="250px">
<p>产品策划</p>
</div>
<div class="wbox">
<img src="images/w2.jpg" alt="" width="250px">
<p>交互设计</p>
</div>
<div class="wbox">
<img src="images/w3.jpg" alt="" width="250px">
<p>视觉设计</p>
</div>
</div>
</div>
<div class="step slide page5" data-x="1500" data-y="-1500" data-z="6000" >
<div class="workflow">
<div class="wbox">
<img src="images/w4.jpg" alt="" >
<p>前端开发</p>
</div>
<div class="wbox">
<img src="images/w5.jpg" alt="" width="250px">
<p>后端开发</p>
</div>
<div class="wbox">
<img src="images/w6.jpg" alt="" width="250px">
<p>产品测试</p>
</div>
<div class="wbox">
<img src="images/w7.jpg" alt="" width="250px">
<p>产品上线</p>
</div>
</div>
</div>
<div class="step slide page6" data-x="4000" data-y="-1500" data-z="7000" >
<h2>然后,在前端开发这里</h2>
<q>Now,let us talk about frontend.</q>
<ul>
<li><strong>A. </strong>我们可以稍微做个分类</li>
<li>
<blockquote>
<p>前端开发</p>
<small>web重构</small>
<small>javascript工程师</small>
</blockquote>
</li>
<li><strong>B. </strong>为啥要分类,我想了一个理由</li>
</ul>
<img src="images/model.png" alt="" class="img_mvc">
</div>
<div class="step slide page7" data-x="6500" data-y="-1500" data-z="8000">
<h3>web重构负责View</h3>
<ul>
<li>
<img src="images/mvc_rebulid.jpg" alt="" >
</li>
</ul>
</div>
<div class="step slide page8" data-x="9000" data-y="-1500" data-z="9000">
<h3>这不是一个容易干的活</h3>
<ul>
<li>
<strong>1. </strong>100%的视觉还原,1px都不能少
</li>
<li>
<strong>2. </strong>html结构利于js开发
</li>
</ul>
<img src="images/ps.jpg" alt="" class="ico ico_ps">
<img src="images/dw.jpg" alt="" class="ico ico_dw">
<img src="images/fw.jpg" alt="" class="ico ico_fw">
<img src="images/note++.jpg" alt="" class="ico ico_note">
<img src="images/sublime_text.png" alt="" class="ico ico_st">
<img src="images/page_css.png" alt="" class="ico ico_css">
<img src="images/page_html.png" alt="" class="ico ico_html">
<img src="images/chrome.png" alt="" class="ico ico_chrome">
<img src="images/firefox.png" alt="" class="ico ico_firefox">
<img src="images/ie9-logo.png" alt="" class="ico ico_ie">
</div>
<div class="step slide page9" data-x="11500" data-y="-1500" data-z="10000">
<h3>给前端同学的问题</h3>
<q>questions for the frontend boy.</q>
<ul>
<li><strong>1. 你喜欢写怎样的结构</strong></li>
<li><strong>2. 怎样的结构适合js开发</strong></li>
</ul>
</div>
<div class="step slide page10" data-x="-1000" data-y="-1500" data-z="14000" id="rebuild-weapon">
<h2>二,重构的武器</h2>
<q>The weapon of web rebuild.</q>
<img src="images/code_css.jpg" alt="" class="weapon_css">
</div>
<div class="step slide page11" data-x="1500" data-y="-1500" data-z="15000">
<h3>学会编写可维护的CSS代码</h3>
<ul>
<li><strong>1. </strong>命名(命名空间)</li>
<li><strong>2. </strong>可重用</li>
<li><strong>3. </strong>可维护</li>
<li><strong>4. </strong>可扩展</li>
</ul>
</div>
<div class="step slide page12" data-x="4000" data-y="-1500" data-z="16000">
<h3>1.命名(命名空间)</h3>
<p>不好的例子</p>
<pre><code>.id</code><code>.red</code><code>.top</code><code>.img</code><code>.div</code></pre>
<p>较好的例子</p>
<pre><code>.content</code><code>.navigator</code><code>.header</code><code>.sidebar</code><code>.logo</code></pre>
<p>更好的例子</p>
<pre><code>.show_content</code><code>.show_nav</code><code>.show_hd</code><code>.show_sidebar</code><code>.show_logo</code></pre>
</div>
<div class="step slide page13" data-x="6500" data-y="-1500" data-z="17000">
<h3>2.可重复使用</h3>
<p>可重用意味着模块化,批量生产</p>
<img src="images/module.png" alt="">
<pre><code>.mod_basic</code><code>.mod_primary</code><code>.gb_nav</code><code>.gb_sidebar</code></pre>
</div>
<div class="step slide page14" data-x="9000" data-y="-1500" data-z="18000">
<h3>3.可维护</h3>
<p>可维护的前提是,模块化和标准化</p>
<img src="images/fixable.jpg" alt="">
</div>
<div class="step slide page15" data-x="11500" data-y="-1500" data-z="19000">
<h3>4.可扩展</h3>
<p>举个栗子</p>
<img src="images/exp.jpg" alt="">
</div>
<div class="step slide page16" data-x="14000" data-y="-1500" data-z="20000">
<h3>栗子</h3>
<img src="images/dialog.jpg" alt="">
</div>
<div class="step slide page17" data-x="16500" data-y="-1500" data-z="21000">
<p>原来是这样子的:</p>
<pre><code>.sidebar_a {</code>
<code>background:#ddd;</code>
<code>width:200px;</code>
<code>}</code>
</pre>
<p>然后小G这样改:</p>
<pre><code>.sidebar_a {</code>
<code>background:#aaa;</code>
<code>width:100px;</code>
<code>}</code>
</pre>
</div>
<div class="step slide page18" data-x="19000" data-y="-1500" data-z="22000">
<p>很明显,这样是很不利扩展的,正确的做法是:</p>
<pre><code>.index .sidebar_a {</code>
<code>background:#aaa;</code>
<code>width:100px;</code>
<code>}</code>
</pre>
<p>又或者给sidebar_a加个类名“.index_sidebar_a”</p>
<pre><code>.index_sidebar_a {</code>
<code>background:#aaa;</code>
<code>width:100px;</code>
<code>}</code>
</pre>
<p>记住:软件实体(类,模块,函数等)应对扩展开放,对修改闭合。</p>
</div>
<div id="rebuild-future" class="step slide page19" data-x="-1000" data-y="-1500" data-z="26000">
<h2>三,未来的重构</h2>
<q>The future of web rebuild.</q>
<img src="images/responsive_web_design.png" alt="" class="rep_img">
</div>
<div class="step slide page20" data-x="1500" data-y="-1500" data-z="27000">
<h3>1.Phonegap</h3>
<q>PhoneGap is an open source framework for quickly building cross-platform mobile apps using HTML5, Javascript and CSS.</q>
<img src="images/diagram_build_large.png" alt="" class="rep_img">
</div>
<div class="step slide page21" data-x="4000" data-y="-1500" data-z="28000">
<h3>2.响应式设计</h3>
<q>responsive design</q>
<p>利用css3 的 media query 做响应式设计</p>
<img src="images/media_query.png" alt="">
</div>
<div class="step slide page22" data-x="6500" data-y="-1500" data-z="29000">
<h3>3.Android</h3>
<img src="images/android_xml.jpg" alt="">
</div>
<div class="step slide page23" data-x="9000" data-y="-1500" data-z="30000">
<h3>Example</h3>
<img src="images/android_xml_code.jpg" alt="">
<img src="images/android_xml_ex.jpg" alt="">
</div>
<div class="step slide page24" data-x="11500" data-y="-1500" data-z="31000">
<h3>Hope</h3>
<ul>
<li><strong>1.</strong>一些期望</li>
<li><strong>2.</strong>给设计师小朋友的礼物 <a href="http://dribbble.com/">Dribbble</a></li>
<li><strong class="tab">a. 增加危机感</strong></li>
<li><strong class="tab">b. 看看牛人们关注些什么</strong></li>
<li><strong class="tab">c. 免费资源供你学习研究</strong></li>
<li><strong class="tab">d. 对设计产生一些消极的情绪,感觉没什么动力了,上去转两圈会感觉好很多。</strong></li>
<li><strong class="tab">e. Dribbble应该是为你塑型,加强你的设计风格,而不是左右你自己的想法和观点。</strong></li>
</ul>
</div>
<div class="step slide end" data-x="14000" data-y="-1500" data-z="32000">
<h1>Q&A</h1>
</div>
</div>
<script src="js/impress.js"></script>
</body>
</html>