【WWDC17周辺イベント情報】 AltConf 2017 に参加してきました! #AltConf #WWDC2017 #WWDC17

2017.06.08

この記事は公開されてから1年以上経過しています。情報が古い可能性がありますので、ご注意ください。

はじめに

IMG_8331

おばんです、今朝方Uber Driverのおっちゃんと話をしていたらAppleの新社屋(通称「宇宙船」)の話になったのですが、どんな建物か聞いたら「トップシークレットだから答えられない」と言われ、もし聞き出していたら命の危機だったかもしれない田中です。(もちろんおっちゃんも知らないだけ)

さて、今回の記事はWWDCが開催されている建物の隣で開催されている AltConf 2017 というデベロッパーカンファレンスに参加してきたので、会場の様子と聞いたセッションについてまとめていきます。

AltConfとは

AltConf is a community-driven event, assembled to serve developers and a product driven community. Held in downtown San Jose at the San Jose Marriott with 900 seats spread over 2 theatres. AltConf is an annual event timed alongside Apple‘s WWDC, June 5-8, 2017.

公式ページより引用

会場の様子

WWDCが公式のしっかりとしたカンファレンスというのに対して、AltConfでは日本における勉強会やミートアップのような、開発者同士がフランクに話し合う暖かい雰囲気を感じました。また企業の出展などもあり、そこはカンファレンスらしさがありました。

IMG_8328

IMG_8326

そして半ば私ごとではありますが、3月に東京で開催されたtry! SwiftハッカソンでStarWarsのレゴをくれたfirebaseのToddさんと再会しました。

IMG_8330

セッション

いくつかのセッションを聞いてきたので、まとめます。

By Zeus! Become an Application God with Serverless Swift : Ian Partridge

IMG_8336

In April, Meyume Ltd released "Weather Gods": an app that enables users to receive custom, personalised, push notifications about the weather. As well as providing rich visualisations, graphics and audio allowing you to see hear and feel the weather, Weather Gods is unique in being built using an fully Serverless backend and being written entirely in Swift. In this session we'll introduce you to Serverless, how to build serverless backends in Swift, and show you how the Weather Gods app was built.

4月にリリースされた Weather Gods というアプリの開発で利用したサーバーレスSwiftの紹介と、アプリ開発で得た知見を共有するセッションです。 Weather Gods はフルサーバーレスで、バックエンドが全てSwiftで書かれているという点が特徴的です。

  • 登壇者の Ian Partridge さんはIBMでSwiftの開発に従事している方。
  • Weather Gods は Meyume Ltd. よりリリースされています。
  • リッチな表現力で天気に関する情報を提供します。(AnimationやCustom/Personalised push notification など)
  • サーバーレスを使うことにより、安く早く開発ができる
  • インフラ、コンテナ、プラットフォームやファンクションは全て "as a Servise" として提供される
  • Event-driven appsではビジネスロジックに注力し、設定やVMの管理をする必要がなくなる
  • マイクロサービスのスケールアウト
  • Martin Fawlerの The Twelve-Factor App
  • サーバーレスな実行環境である OpenWhisk
  • OpenWhisk 上でSwiftを動かすことができる
  • OpenWhiskのデモ
  • 「Xcodeじゃなくてすみません(vimでSwiftを書くIan氏)」
  • OpenWhiskのCLIからactionの管理などができます
  • Hello WorldとDateFormatterのデモ
  • 「Documentはリッチなので、みなさんも読みながらやってみてください」
  • 最初のアプリリリース時はAmazon EC2を使っていた
  • 天気の通知システムについて
  • 3分ごとのアラームをもとに、天気情報を取得して各グループのユーザーに向けてPush通知を送信するセグメントシステム

The secret life of types in Swift : Manu Rink

IMG_6893

As we expected Apple to give us Obj-C 3.0 over two years ago, something entirely surprising happened: we got a new language - Swift. At first glance it already looked very different because of the modern code syntax. But the second glance was even more frightening - the strict and strong type system which is so very different to Obj-C. This talk takes an under-the-hood deep dive into the Swift type system's structure and gives tips how to use it in a proper way - without having the continuous feeling that it keeps you from reaching you goal and is constantly in your way. You'll like it - for sure!

  • Swiftにはroot typeがない
  • Javaにはjava.langが、Obj-CにはNSObject, NSValueがある
  • Data Typeにはroot typeがない
  • SwiftのInt型は多くのprotocolによって成り立っている
  • Name Types: 名前を持つ型。classやstructやenumやprotocol
  • Compound Types: 名前のない型。tuplesやfunction
  • Tuple Type: 複数の値を型安全に扱うための型定義
  • typealiasを使うことでTuple型に名前をつけることができます
  • (): public typealias Void = ()
  • (Type): == Type, let myAge : (Int) = (23); let myAge : Int = 23
  • Function Type: methodやfunctionの型を定義する。Compound Type
  • (Bool) -> (Int) -> Int
    • in, inner in, out
  • Closure: global, nested functionの親コンセプト
  • Closureはコードをさせられる
  • Don't be afraid ... it's just Optionals
  • != nil でnilチェックをおこなったとのブロックの中で print(value) すると Optional(Value) と表示されてしまう問題(nilでないことは保証しているのに)
  • その場合は if let を使ってチェックさせよう
  • あるいは guard let - else を使う方法もあるでしょう

What Google learned about building smooth animation in our iOS apps : Jeff Verkoeyen

IMG_8343

Animation is important! With just a few moving objects, you can convey complicated relationships between views or completely separate view controllers. But animation is also hard! Okay, maybe some animation is easy. But when it comes to animation that’s smooth and jank-free, can respond to your users actions, and is easy to debug, it’s harder than you might think. Come learn about some of the problems Google apps encountered when trying to add more animations to their apps, and how they were able to address many of these issues with a set of open source tools.

Jeff Verkoeyen氏はGoogleのマテリアルデザインチームに所属しています。Google Maps for iOS(2012) や Facebook for iOS(2009) などのチームにいた過去があり、近年はMaterial Componentsをやっています。

  • 最近 Material Motion guideline をリリースしました
    • (Movie)
  • 今日はmotion engineeringについて話をします
  • Motion とは
    • さまざまなつらみがある
    • hard to communicate
    • hard to reuse
    • hard to debug
    • hard to maintain
    • hard to get right
  • iOSにおけるmotionに関する挑戦
    • Jank
    • Responsiveness
    • Debugging
      • 普通であればブレークポイントを用いてデバッグするが、アニメーションは時間に基づいて変化するものなのでデバッグが難しい
  • どのようにして動きを作り出すか
    • インタラクションにはいくつかある
      • ジェスチャーによるもの
      • ジェネリックによるもの
      • Tossableなもの
  • Reactive programming
    • リアクティブなプロパティとなるもの
      • 一例として、position
  • 遷移をいかにして実装するか
    • (実際のコードを追いながら)
  • 画面の遷移におけるdestinationに対してdirectionという役割を追加することで、遷移していくのか、遷移先から戻ってくるかの状態を管理する
  • Material Motionはレシポンシブな動きをCore Animationを使って実装したもの
  • (ここからはライブコーディング。Google Photoのようなものの実装)
    • (文字サイズ調整)
    • 観客「Xcode 9を使えば文字サイズ調整のショートカットがあるよ」 lol

さいごに

AltConf 2017 の様子と、発表されたセッションについて紹介しました。

AltConfの雰囲気は日本で参加している勉強会やミートアップと近いものがあり、とても馴染む感じがしました。セッションで話される内容も、Swiftのお作法をおさらいするような内容からアニメーションやサーバーサイドSwiftなどの濃い内容のものがあったりととても充実していました。

また、サンノゼならではなこととしてGoogleやIBMなどに所属する、なんらかの領域で最前線で開発をおこなっている人のセッションが聞けることはとても貴重でした。

AltConf 2017 は明日までの開催のようです。まだ行っていない方、気になるセッションがある方はぜひ足を運んでみてください!セッションスケジュールは以下になります。