/
index.html
466 lines (330 loc) · 18.8 KB
/
index.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
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>首届 Swift 开发者大会见闻 | 唐巧的博客</title>
<meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no">
<meta name="author" content="唐巧">
<meta name="description" content="今天是中国 iOS 开发者的一次聚会,因为首届 Swift 开发者大会在北京成功举办了。这次会议的质量很高,大会的相关 keynote 和 视频,稍后都会在官网上公开,所以没能参会的同学可以关注官网( http://atswift.io/ )的内容更新。我作为大会的主席(其实基本没出什么力)全程参与了全天的大会,在此记录下一些参会的见闻。 先说说本次的大会的演讲内容吧。这次大会的 Keynote">
<meta property="og:type" content="article">
<meta property="og:title" content="首届 Swift 开发者大会见闻">
<meta property="og:url" content="https://blog.devtang.com/2016/01/10/atswift-conference-summary/index.html">
<meta property="og:site_name" content="唐巧的博客">
<meta property="og:description" content="今天是中国 iOS 开发者的一次聚会,因为首届 Swift 开发者大会在北京成功举办了。这次会议的质量很高,大会的相关 keynote 和 视频,稍后都会在官网上公开,所以没能参会的同学可以关注官网( http://atswift.io/ )的内容更新。我作为大会的主席(其实基本没出什么力)全程参与了全天的大会,在此记录下一些参会的见闻。 先说说本次的大会的演讲内容吧。这次大会的 Keynote">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2016-01-10T06:31:55.000Z">
<meta property="article:modified_time" content="2020-02-08T18:08:22.165Z">
<meta property="article:author" content="唐巧">
<meta property="article:tag" content="Swift">
<meta name="twitter:card" content="summary">
<link rel="alternative" href="/atom.xml" title="唐巧的博客" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="/css/style.css">
<link rel="stylesheet" href="/%02.css">
<link rel="stylesheet" href="/.css">
<meta name="generator" content="Hexo 4.2.0"></head>
<body>
<header>
<div>
<div id="textlogo">
<h1 class="site-name"><a href="/" title="唐巧的博客">唐巧的博客</a></h1>
<h2 class="blog-motto">记录下自己学习的点滴</h2>
</div>
<div class="navbar"><a class="navbutton navmobile" href="#" title="菜单">
</a></div>
<nav class="animated">
<ul>
<ul>
<li><a href="/">首页</a></li>
<li><a href="/archives">归档</a></li>
<li><a href="/about">关于</a></li>
<li>
<form class="search" action="//google.com/search" method="get" accept-charset="utf-8">
<label>Search</label>
<input type="search" id="search" name="q" autocomplete="off" maxlength="20" placeholder="搜索" />
<input type="hidden" name="q" value="site:blog.devtang.com">
</form>
</li>
</ul>
</nav>
</div>
</header>
<div id="container">
<div id="main" class="post" itemscope itemprop="blogPost">
<article itemprop="articleBody">
<header class="article-info clearfix">
<h1 itemprop="name">
<a href="/2016/01/10/atswift-conference-summary/" title="首届 Swift 开发者大会见闻" itemprop="url">首届 Swift 开发者大会见闻</a>
</h1>
<p class="article-time">
<time datetime="2016-01-10T06:31:55.000Z" itemprop="datePublished"> 发表于 2016-01-10 06:31</time>
</p>
</header>
<div class="article-content">
<div id="toc" class="toc-article">
<strong class="toc-title">文章目录</strong>
<ol class="toc"><li class="toc-item toc-level-3"><a class="toc-link" href="#Chris"><span class="toc-number">1.</span> <span class="toc-text">Chris</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#傅若愚"><span class="toc-number">2.</span> <span class="toc-text">傅若愚</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#Greg"><span class="toc-number">3.</span> <span class="toc-text">Greg</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#李洁信"><span class="toc-number">4.</span> <span class="toc-text">李洁信</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#王巍"><span class="toc-number">5.</span> <span class="toc-text">王巍</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#包涵卿"><span class="toc-number">6.</span> <span class="toc-text">包涵卿</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#翁阳"><span class="toc-number">7.</span> <span class="toc-text">翁阳</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#周楷雯"><span class="toc-number">8.</span> <span class="toc-text">周楷雯</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#后记"><span class="toc-number">9.</span> <span class="toc-text">后记</span></a></li></ol>
</div>
<p>今天是中国 iOS 开发者的一次聚会,因为首届 Swift 开发者大会在北京成功举办了。这次会议的质量很高,大会的相关 keynote 和 视频,稍后都会在官网上公开,所以没能参会的同学可以关注官网( <a href="http://atswift.io/" target="_blank" rel="noopener">http://atswift.io/</a> )的内容更新。我作为大会的主席(其实基本没出什么力)全程参与了全天的大会,在此记录下一些参会的见闻。</p>
<p>先说说本次的大会的演讲内容吧。这次大会的 Keynote 可<a href="https://github.com/atConf/atswift-2016-resources" target="_blank" rel="noopener">在此下载</a>。</p>
<p>2016.02.29更新:中国首届swift开发者大会的视频已经放出:<a href="http://www.imooc.com/learn/600" target="_blank" rel="noopener">http://www.imooc.com/learn/600</a></p>
<h3 id="Chris"><a href="#Chris" class="headerlink" title="Chris"></a>Chris</h3><p>开场的是 objc.io 的创始人 Chris Eidhof。Chris 是大会演讲者中唯一没有准备 keynote 的人,但是演讲相当精彩。Chris 虽然没有 keynote,但是内容是精心准备过的,他先用 playground 简单介绍了一些 Swift 的内容后,就转到一个游戏 Demo 的重构工作中,整个重构工作包括几点:</p>
<ol>
<li>用 typealias 去掉 NSUserDefaults 的依赖。</li>
<li>用 protocol 来代替继承。</li>
<li>用 extension 来实现 protocol。</li>
<li>尽量用 struct。 </li>
<li>全程用 testcase 来验证重构过程。</li>
</ol>
<p>最终,我们看到了一个重构之后的游戏 Demo,相比以前的工程,重构后的项目代码更短,逻辑更清晰。</p>
<p>人们常说,Talk is cheap, show me the code。 Chris 用行动让我们看到如何写出更好的 Swift 代码。</p>
<h3 id="傅若愚"><a href="#傅若愚" class="headerlink" title="傅若愚"></a>傅若愚</h3><p>傅若愚来自 thoughtworks,和我一样是成都人。他这次的演讲主题是《越过 OC 与 Swift 间的鸿沟》,对于正在经历从 OC 到 Swift 转型的各位来说,非常实际。</p>
<p>他从一段代码来引出了大家的好奇,下面这段代码,居然会有两种输出结果,你猜出来是什么原因了吗?</p>
<figure class="highlight plain"><table><tr><td class="code"><pre><span class="line">someArray = [1, 2, 3]</span><br><span class="line">var result = someArray.map({"No. \($0)"})</span><br></pre></td></tr></table></figure>
<p>接着傅若愚介绍了从 OC 转到 Swift 需要注意的地方:</p>
<ol>
<li>优先用 protocol 而不是继承</li>
<li>更多通过 annum, struct, extension 来达成目的。</li>
</ol>
<p>最后,他展示了一个利用函数式编程来重构代码的例子。</p>
<h3 id="Greg"><a href="#Greg" class="headerlink" title="Greg"></a>Greg</h3><p>Greg 是加拿大多伦多的一位 iOS 自由职业者,亚裔,看起来非常像中国人,但是其实他不会说中文。他在为著名 的 raywenderlich.com 撰写博客。本次他分享的是《Swift Style》。</p>
<p>在介绍了编写易读的代码的重要性之后,他从以下 3 方面介绍了他的 Swift 经验:</p>
<ol>
<li>Value types</li>
<li>Protocol</li>
<li>Safety</li>
</ol>
<p>提问环节的时候,Chris 当托似地问了一个非常有趣的问题:「你最近 1 年在写 Swift 代码上有何转变?」。</p>
<p>这个问题非常有意思,Greg 说他现在用了更多的 guard 关键词,然后 Greg 也说到,他写习惯 Swift 之后,因为养成了强类型检查的习惯,他偶尔回去写 oc 的时候会不停地 check 各种 nil。</p>
<h3 id="李洁信"><a href="#李洁信" class="headerlink" title="李洁信"></a>李洁信</h3><p>李洁信是下午第一场,非常犯困的时间。洁信稍微有一些紧张,内容是关于《Swift 中的协议编程》,他把这些内容都梳理得挺好的,讲得挺清楚。</p>
<h3 id="王巍"><a href="#王巍" class="headerlink" title="王巍"></a>王巍</h3><p>喵神王巍是下午第二场,王巍的主题是《如何打造一个让人愉快的框架》,喵神的准备非常充分,演讲过程中还各种卖萌,实在是非常可爱。喵神主要从以下几个方面介绍了框架的开发:</p>
<ol>
<li>静态库和框架的对比</li>
<li>包和依赖管理</li>
<li>创建框架</li>
<li>一些 Tips</li>
<li>发布框架</li>
<li>持续集成</li>
</ol>
<p>如果你希望基于 Swift 来开发一个 framework,非常值得看看喵神的分享。</p>
<h3 id="包涵卿"><a href="#包涵卿" class="headerlink" title="包涵卿"></a>包涵卿</h3><p>包涵卿讲的是《Swift 函数式编程实践》,这块其实是挺难讲的,前面的一些函数式编程的基础还好,比如柯里化之类,但是后面估计比较难理解,我不知道现场有多少人听懂了 Monad 的概念,不过这个确实是比较挑战的话题。</p>
<h3 id="翁阳"><a href="#翁阳" class="headerlink" title="翁阳"></a>翁阳</h3><p>这场话题茶歇回去之后听了一半,所以没怎么整理出来笔记。有些遗憾。</p>
<h3 id="周楷雯"><a href="#周楷雯" class="headerlink" title="周楷雯"></a>周楷雯</h3><p>周楷雯的分享里介绍了各种性能优化的技巧。可惜他当时手机变砖,有一些着急,讲得比较快,很多点感觉展开讲会更好一些。</p>
<h3 id="后记"><a href="#后记" class="headerlink" title="后记"></a>后记</h3><p>这次 Swift 大会中还做了一些有趣的调查,在此将数据分享给大家:</p>
<ol>
<li>这次有 3/4 的听众来自外地!</li>
<li>现场有 1/3 的听众已经开始将 Swift 应用于公司项目开发中。</li>
</ol>
<p>这次大会的组委会都很棒,包括梁杰、裕波、王臣汉、陈雨恒、李涛(还有一些我没能记住名字的同学)都对这次大会付出了大量心血。作为一个非赢利性的 Swift 大会,我觉得他们做到了内容的高质量,期待明年的第二届大会如期进行!</p>
</div>
<footer class="article-footer clearfix">
<div class="article-catetags">
<div class="article-categories">
<span></span>
<a class="article-category-link" href="/categories/iOS/">iOS</a>
</div>
<div class="article-tags">
<span></span> <a href="/tags/Swift/">Swift</a>
</div>
</div>
<div class="article-share" id="share">
<div data-url="https://blog.devtang.com/2016/01/10/atswift-conference-summary/" data-title="首届 Swift 开发者大会见闻 | 唐巧的博客" data-tsina="" class="share clearfix">
</div>
</div>
</footer>
</article>
<nav class="article-nav clearfix">
<div class="prev" >
<a href="/2016/01/12/saul-introdution/" title="MagicalRecord 作者 Saul Mora 的故事">
<strong>上一篇:</strong><br/>
<span>
MagicalRecord 作者 Saul Mora 的故事</span>
</a>
</div>
<div class="next">
<a href="/2016/01/02/reactive-cocoa-discussion/" title="ReactiveCocoa 讨论会">
<strong>下一篇:</strong><br/>
<span>ReactiveCocoa 讨论会
</span>
</a>
</div>
</nav>
</div>
<div class="openaside"><a class="navbutton" href="#" title="显示侧边栏"></a></div>
<div id="asidepart">
<div class="closeaside"><a class="closebutton" href="#" title="隐藏侧边栏"></a></div>
<aside class="clearfix">
<div class="sponsor">
</div>
<div class="categorieslist">
<p class="asidetitle">分类</p>
<ul>
<li><a href="/categories/books-summary/" title="books summary">books summary</a></li>
<li><a href="/categories/iOS/" title="iOS">iOS</a></li>
<li><a href="/categories/iOS-weekly/" title="iOS weekly">iOS weekly</a></li>
<li><a href="/categories/mac/" title="mac">mac</a></li>
<li><a href="/categories/shell/" title="shell">shell</a></li>
<li><a href="/categories/summary/" title="summary">summary</a></li>
</ul>
</div>
<div class="weixin">
<br />
<p class="asidetitle">微信公众号</p>
<p>关注我的微信公众号,和我一起成长:</p>
<img src="/images/weixin-qr.jpg" width="230px" />
</div>
<div class="rsspart">
<a href="/atom.xml" target="_blank" title="rss">RSS 订阅</a>
</div>
</aside>
</div>
</div>
<footer><div id="footer" >
<div class="social-font" class="clearfix">
</div>
<p class="copyright" style="margin-top: 10px;">
Powered by <a href="http://hexo.io" target="_blank" title="hexo">hexo</a> and Theme by <a href="https://github.com/wuchong/jacman" target="_blank" title="Jacman">Jacman</a> © 2020
<a href="/about" target="_blank" title="唐巧">唐巧</a>
</p>
</div>
</footer>
<script src="/js/jquery-2.0.3.min.js"></script>
<script src="/js/jquery.imagesloaded.min.js"></script>
<script src="/js/gallery.js"></script>
<script src="/js/jquery.qrcode-0.12.0.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('.navbar').click(function(){
$('header nav').toggleClass('shownav');
});
var myWidth = 0;
function getSize(){
if( typeof( window.innerWidth ) == 'number' ) {
myWidth = window.innerWidth;
} else if( document.documentElement && document.documentElement.clientWidth) {
myWidth = document.documentElement.clientWidth;
};
};
var m = $('#main'),
a = $('#asidepart'),
c = $('.closeaside'),
o = $('.openaside');
c.click(function(){
a.addClass('fadeOut').css('display', 'none');
o.css('display', 'block').addClass('fadeIn');
m.addClass('moveMain');
});
o.click(function(){
o.css('display', 'none').removeClass('beforeFadeIn');
a.css('display', 'block').removeClass('fadeOut').addClass('fadeIn');
m.removeClass('moveMain');
});
$(window).scroll(function(){
o.css("top",Math.max(80,260-$(this).scrollTop()));
});
$(window).resize(function(){
getSize();
if (myWidth >= 1024) {
$('header nav').removeClass('shownav');
}else{
m.removeClass('moveMain');
a.css('display', 'block').removeClass('fadeOut');
o.css('display', 'none');
}
});
});
</script>
<script type="text/javascript">
$(document).ready(function(){
var ai = $('.article-content>iframe'),
ae = $('.article-content>embed'),
t = $('#toc'),
ta = $('#toc.toc-aside'),
o = $('.openaside'),
c = $('.closeaside');
if(ai.length>0){
ai.wrap('<div class="video-container" />');
};
if(ae.length>0){
ae.wrap('<div class="video-container" />');
};
c.click(function(){
ta.css('display', 'block').addClass('fadeIn');
});
o.click(function(){
ta.css('display', 'none');
});
$(window).scroll(function(){
ta.css("top",Math.max(140,320-$(this).scrollTop()));
});
});
</script>
<script type="text/javascript">
$(document).ready(function(){
var $this = $('.share'),
url = $this.attr('data-url'),
encodedUrl = encodeURIComponent(url),
title = $this.attr('data-title'),
tsina = $this.attr('data-tsina'),
description = $this.attr('description');
var html = [
'<div class="hoverqrcode clearfix"></div>',
'<a class="overlay" id="qrcode"></a>',
'<a href="https://www.facebook.com/sharer.php?u=' + encodedUrl + '" class="article-share-facebook" target="_blank" title="Facebook"></a>',
'<a href="https://twitter.com/intent/tweet?url=' + encodedUrl + '" class="article-share-twitter" target="_blank" title="Twitter"></a>',
'<a href="#qrcode" class="article-share-qrcode" title="微信"></a>',
'<a href="http://widget.renren.com/dialog/share?resourceUrl=' + encodedUrl + '&srcUrl=' + encodedUrl + '&title=' + title +'" class="article-share-renren" target="_blank" title="人人"></a>',
'<a href="http://service.weibo.com/share/share.php?title='+title+'&url='+encodedUrl +'&ralateUid='+ tsina +'&searchPic=true&style=number' +'" class="article-share-weibo" target="_blank" title="微博"></a>',
'<span title="Share to"></span>'
].join('');
$this.append(html);
$('.hoverqrcode').hide();
var myWidth = 0;
function updatehoverqrcode(){
if( typeof( window.innerWidth ) == 'number' ) {
myWidth = window.innerWidth;
} else if( document.documentElement && document.documentElement.clientWidth) {
myWidth = document.documentElement.clientWidth;
};
var qrsize = myWidth > 1024 ? 200:100;
var options = {render: 'image', size: qrsize, fill: '#2ca6cb', text: url, radius: 0.5, quiet: 1};
var p = $('.article-share-qrcode').position();
$('.hoverqrcode').empty().css('width', qrsize).css('height', qrsize)
.css('left', p.left-qrsize/2+20).css('top', p.top-qrsize-10)
.qrcode(options);
};
$(window).resize(function(){
$('.hoverqrcode').hide();
});
$('.article-share-qrcode').click(function(){
updatehoverqrcode();
$('.hoverqrcode').toggle();
});
$('.article-share-qrcode').hover(function(){}, function(){
$('.hoverqrcode').hide();
});
});
</script>
<!-- Analytics Begin -->
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-28029597-1', '');
ga('send', 'pageview');
</script>
<!-- Analytics End -->
<!-- Totop Begin -->
<div id="totop">
<a title="返回顶部"><img src="/img/scrollup.png"/></a>
</div>
<script src="/js/totop.js"></script>
<!-- Totop End -->
<!-- MathJax Begin -->
<!-- mathjax config similar to math.stackexchange -->
<!-- MathJax End -->
<!-- Tiny_search Begin -->
<!-- Tiny_search End -->
</body>
</html>