Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Dartエコシステムの紹介
Search
takayuki-hayashi
October 21, 2017
Programming
2
550
Dartエコシステムの紹介
Dartでいろいろ始める時にこのあたりを知っているといろいろ捗る可能性があります。
takayuki-hayashi
October 21, 2017
Tweet
Share
More Decks by takayuki-hayashi
See All by takayuki-hayashi
E2Eの過去・現在・未来 そしてE2Eにおいて重要なこと
takayukihayashi
1
430
いかにしてテスト文化を醸成させたか.pdf
takayukihayashi
3
1.4k
リーダー、マネージャーが存在しない開発組織のつくり方
takayukihayashi
0
28k
AngularDartでDart入門
takayukihayashi
1
800
E2Eテスト駆動開発実践記_-_Web用.pdf
takayukihayashi
2
3.3k
KubernetesとGaugeを活用したTDD開発事例
takayukihayashi
0
830
FlutterとAngularDartを DIとClean Architectureで いい感じにする
takayukihayashi
3
2.1k
Gaugeによるe2eテスト
takayukihayashi
5
28k
Other Decks in Programming
See All in Programming
レイトレ合宿10 レンダラー紹介 / Renderer Introduction, Ray Tracing Camp 10
shocker_0x15
0
640
CSC305 Lecture 09
javiergs
PRO
0
120
tc39 x jsconf.jp Panel Discussion 2024
yosuke_furukawa
PRO
0
120
Universal Linksの実装方法と陥りがちな罠
kaitokudou
1
200
(Deep|Web) Link support with expo-router
mrtry
0
190
ActiveRecordの力でDBのメタデータを迅速に解析する
lnit
5
2.1k
自分だけの世界を創るクリエイティブコーディング / Creative Coding: Creating Your Own World
chobishiba
2
2.1k
Nuxt UI Pro、NuxtHub、Nuxt Scripts、Nuxtエコシステムをふんだんに利用して開発するコーポレートサイト@Vue Fes Japan 2024
shingangan
3
690
Hi, have you met Kotlin Multiplatform? | DevFest Vienna 2024
prof18
0
240
僕がつくった48個のWebサービス達
yusukebe
6
3.6k
フロントエンドの現在地とこれから
koba04
10
4.7k
rtcamp 10 (vk-illuminati)
yumcyawiz
1
210
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
131
8.9k
4 Signs Your Business is Dying
shpigford
180
21k
Building an army of robots
kneath
302
42k
Visualization
eitanlees
143
15k
Speed Design
sergeychernyshev
23
550
Six Lessons from altMBA
skipperchong
26
3.4k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.2k
Teambox: Starting and Learning
jrom
132
8.7k
Writing Fast Ruby
sferik
626
60k
Optimizing for Happiness
mojombo
376
69k
Imperfection Machines: The Place of Print at Facebook
scottboms
264
13k
Build The Right Thing And Hit Your Dates
maggiecrowley
32
2.3k
Transcript
Dartエコシステム
自己紹介 • 名前:林 尚之(はやし たかゆき) • Agile(XP)、TDD、DDDとかが好き サーバーサイドに生息することが多い(WebもSSRが多かった) • Dartを使い始めた理由は当時Dartが目指した世界に共感したのと
フロントエンドでも静的型付言語を使いたかったから twitter: @t_hyssh
Dart 1.0がリリースされたのが2013年11月13日
元々周辺ツールなどを重要視していた Dart開発チームでしたが、4年経ちエコシ ステムもさらに成熟
個人的によく使うもの • sass_builder • fluri • json_serializable • quiver •
mockito • angular_analyzer_plugin • ng2gen
sass_builder • scssファイルをいい感じにしてくれるライブラリー • yamlのtransformerに定義すればpub serveやpub build時にscssからcss ファイルを自動生成してくれる (別途sassをインストールする必要はない) •
cssファイルも同時にバージョン管理したい場合はwatch用の処理をちょっ と書くだけでOK
sass_builder ※AngularDartと併用する場合 はangularより先に定義しないと いけない
sass_builder ※外部ライブラリーの scssを import可能。
sass_builder(CSSファイルも管理する場合) 上記内容にて${project_root}/tool/sass/watch.dartを 作成し、runしておけば変更を検知して scssファイル からcssファイルを生成してくれる。
fluri • サーバーへのリクエストURLをfluentな感じで生成できる • lightweightなので扱いやすい
fluri
json_serializable • json ⇔ Dartオブジェクトの変換用に使う • ソースコードを自動生成させて使う • 自動生成後に修正しないといけないのがちょっと面倒
json_serializable libraryとJsonSerializableのアノテーショ ン定義が必要 上記ファイルをrunしておけば変更を検 知して自動生成する。 lib/src/json/sample.dart tool/source/watch.dart
json_serializable 上記がファイルが自動生成される 自動生成された情報を基に修正
json_serializable(http + fluri)
mockito • テスト用mockライブラリー • Javaのmockitoにインスパイアされてる • (個人的には)直感的に書けると思う • mockクラスを定義しないといけないのが面倒
mockito Taskをモックにしたい場合
mockito MockTaskというTaskのMockクラスを定義
quiver • DartのSDKには無いユーティリティなライブラリ • 昔のJakarta Commons的立ち位置(Javaな人しか分からない??) • Optionalのために使ってる ◦ Dart2.0はnull-safeにはならないようなので今後も重宝しそう
• 他にも便利そうなのが多そう(未確認)
angular_analyzer_plugin • AngularDartの開発効率Up • IDE等と連携してHTMLテンプレート側での静的チェックとサジェストが可 能 • Dart2.0になるとanalysis_options.yamlに定義するだけでよくなる • 現状(Dart1.24.2)では有効にするのに手間がかかる
ng2gen • AngularDartで必要になる物のscaffoldを作成出来る ◦ component、service、route、etc...
今後期待するもの
今後期待するもの • dazel • (新)angular_analyzer_plugin
dazel • Hot Reload! • まだEXPERIMENTAL(実験)の段階 ◦ AngularDartのサポートはまだっぽい ▪ 自分の環境ではうまく動かない・・・
(新)angular_analyzer_plugin • analysis_options.yamlに記述するだけでOK • AngularDart4.0以降かつDart1.25.0-dev.12.0以降で動作 • 自分の環境ではまだうまく動かない・・・
開発を効率化する仕組みは確実に進化中
FlutterがDartにおけるキラーアプリになる可 能性あり
flutterのgithubスター獲得推移 ここ1ヶ月の伸びが凄い! (reactnativeと比べてはいけない・・・)
https://pub.dartlang.org/ にアップロードされるライブラリーの数と頻度は 日々増え続けていて、1年前に比べると1日に アップロードされるライブラリーの数は3倍以上 になっている
ご清聴ありがとうございました。