Upload
Download free for 30 days
Login
Submit Search
サーバーサイドDartを試してみる
3 likes
2,788 views
Satoshi KOBAYASHI
「Angular 4 の最新動向と、2017年再注目のDart、そしてAngular Dart 」Dart の部 3/3 on 2017.3.6
Technology
Read more
1 of 18
Download now
Downloaded 12 times
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
More Related Content
PDF
15分でわかった気になるdart
Satoshi KOBAYASHI
PDF
Angular+Dart=より快適なSPA開発
Satoshi KOBAYASHI
PDF
はじめてのDart
Takuya Kawabe
PDF
Web制作で培ってきたFlashのリッチな表現力をモバイルアプリに
invogue
PDF
マークアップエンジニアと情報アーキテクチャ
力也 伊原
PPTX
XAML + C#で開発するときのVisual Studio 2013(とBlend)の便利機能
一希 大田
PDF
お気に入り拡張機能
SatsukiYabu
PDF
Clojureに入門してみた、2017年秋
Satoshi KOBAYASHI
15分でわかった気になるdart
Satoshi KOBAYASHI
Angular+Dart=より快適なSPA開発
Satoshi KOBAYASHI
はじめてのDart
Takuya Kawabe
Web制作で培ってきたFlashのリッチな表現力をモバイルアプリに
invogue
マークアップエンジニアと情報アーキテクチャ
力也 伊原
XAML + C#で開発するときのVisual Studio 2013(とBlend)の便利機能
一希 大田
お気に入り拡張機能
SatsukiYabu
Clojureに入門してみた、2017年秋
Satoshi KOBAYASHI
Featured
(20)
PDF
2024 Trend Updates: What Really Works In SEO & Content Marketing
Search Engine Journal
PDF
Storytelling For The Web: Integrate Storytelling in your Design Process
Chiara Aliotta
PDF
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
OECD Directorate for Financial and Enterprise Affairs
PDF
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
SocialHRCamp
PDF
2024 State of Marketing Report – by Hubspot
Marius Sescu
PDF
Everything You Need To Know About ChatGPT
Expeed Software
PDF
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
PDF
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
PDF
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
PDF
Skeleton Culture Code
Skeleton Technologies
PDF
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
PDF
Content Methodology: A Best Practices Report (Webinar)
contently
PPTX
How to Prepare For a Successful Job Search for 2024
Albert Qian
PDF
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
PDF
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
PDF
5 Public speaking tips from TED - Visualized summary
SpeakerHub
PDF
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
PDF
Getting into the tech field. what next
Tessa Mero
PDF
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
PDF
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
2024 Trend Updates: What Really Works In SEO & Content Marketing
Search Engine Journal
Storytelling For The Web: Integrate Storytelling in your Design Process
Chiara Aliotta
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
OECD Directorate for Financial and Enterprise Affairs
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
SocialHRCamp
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Ad
サーバーサイドDartを試してみる
1.
「Angular 4 の最新動向と、2017年再注目のDart、そしてAngular
Dart 」 Dart の部 3/3 HRMOS事業部 小林 達 at BizReach on 2017.3.6 サーバーサイド Dart を試してみる
2.
自己紹介 ✓ 小林 達
(こばやしさとし) ✓ HRMOS[ハーモス]プロダクト開発部 ✓ こぼれ球拾いが気軽にできると嬉しい昨今 ▶ さくっと使えて引き継ぎやすい武器が欲しい
3.
なぜ?
4.
Googleさんの注力はAngularとFlutter(アプリ)。。 サーバサイドは分野は正直流行っていない。。が、しかし、 ✓ 言語仕様の簡潔な静的言語として、サーバでも生産性が期待できるのでは? ✓ 標準ライブラリが充実しているので、リッチなフレームワークがなくてもちょっとした 用途に使えるのでは? サーバーサイド
Dart ?
5.
もしつかえるならば、 ちょっとした用途、つまり、 ✓ 社内サービスだけどフロントリッチなのがさっと作れたりするのでは? ✓ フロントメインの人にとっても、とっつきやすいのでは? ✓
2本め、3本めの武器として使い回しが効くのでは?
6.
フレームワークを選ぶ
7.
Webフレームワークの選択 ✓ ALL-IN-ONEなら、Aqueduct の開発はアクティブなのでいいかも ●
stablekernelがバックアップ(アトランタのスタートアップ?) ● Dart Developer Summit でも発表あり ● DI, ORM, 認証, テンプレート, テスト, DBマイグレーションなどの機能 ✓ シンプルなら、純正のShelfが第一候補 ● shelf_xxx など機能ごとにパッケージが分かれている ● フレームワークというより、フレームワークの構成部品という位置づけなので、 初心者にはとっつきづらいかも ✓ 中間的な選択肢として、
8.
Redstone をチョイス
9.
Redstone をチョイス Awesome Dart
リストから見ていって選んだ。 ✓ Shelf を利用したラッパー ✓ ぱっと見分かりやすい ✓ 比較的アクティブ ✓ ALL-IN-ONEではないので、DBアクセスなどは別途チョイスが必要
10.
書いてみる
11.
Hello World ! server.dart
ファイルに main関数とhelloworld関数 を追加して、dart コマンドで起動すれば立ち上が る。シンプル。 ※ 実際には、以下を先に実施 1. stagehand で server-shelf のテンプレート作成 2. pubspec.yaml の依存を変更 3. pub get @web.Route("/") helloWorld() => "Hello, World!"; void main() { web.setupConsoleLog() ; web.start(); } ❯❯❯ dart bin/server.dart ⏎ INFO: 2017-03-03 11:23:56.494179: Configured target for / [GET]: .helloWorld INFO: 2017-03-03 11:23:56.523415: Running on 0.0.0.0:8080
12.
Hello World !
13.
URLからのパラメータ取得 getUser関数を書く。 @web.Route("/user/find/:id") getUser(String id) => {"userId":
id, "name": "User", "login": "user"}; @web.Route("/") helloWorld() => "Hello, World!";
14.
DI、Future、JSON class HeroService { Future<List<Hero>>
getHeroes() { … } } @web.Group("/heroes") class HeroController { HeroService _service; HeroController(this._service); @web.Route("/list") service() => _service.getHeroes() .then((heroes) => { "heroes": heroes}); } void main() { web.addModule(new Module() ..bind(HeroService)) ; web.setupConsoleLog() ; web.start(); } ✓ DIは、AngularのDIライブラリ (di.dart)をベースにしたもので、 ルーティングなどで利用。 ✓ Futureで返したレスポンスは、そ のまま返せる。 1 1 1 2 2
15.
DI、Future、JSON ✓ /heroes/list へアクセス。 (Hero
の toJson() は略) class HeroService { Future<List<Hero>> getHeroes() ... } @web.Group("/heroes") class HeroController { HeroService _service; HeroController(this._service); @web.Route("/list") service() => _service.getHeroes() .then((heroes) => { "heroes": heroes}); } void main() { web.addModule(new Module() ..bind(HeroService)) ; web.setupConsoleLog() ; web.start(); } 3 3
16.
もっと学べそうなリソースもあった ✓ 公式サイト ● Write
HTTP Clients & Servers ✓ 1時間コードラボ? ● https://github.com/dart-lang/one-hour-codelab
17.
まとめ
18.
まとめ ✓ 奇をてらった感じがない。とっつきやすい ! ✓
開発していて楽しい ! ✓ スタブサーバとして使うのはありかも ● フロントエンドエンジニア主体でメンテできる感がある ● 少しずつスキルを広げられそう ✓ Redstoneをプロダクションに使うには不安 ● 品質とかより、今後の展望的に。ドキュメントもあまりない ✓ 小さなものであれば、自分達で作ってもいいのかもしれない ● 勉強不足ですが、ドキュメントは結構ある。 ● ライブラリのコードも読もうと思えば読める
Download