SlideShare una empresa de Scribd logo
1 de 18
Descargar para leer sin conexión
Let’s start Dart
Dartをはじめよう。
@mogetta
How about Dart
Classes
Optional types
Lexical scoping
http://www.dartlang.org/docs/technical-overview/
Install
brew install dart
or
command line
http://www.dartlang.org/
導入
Install
http://www.dartlang.org/tools/
http://plugins.jetbrains.com/plugin/?idea&id=6351 https://github.com/dart-lang/dart-sublime-bundle#readme https://github.com/dart-lang/dart-vim-plugin
導入
be useful
使い道
on Dartium Server side[dart2js]
convert to js
fast! like node.js?wide useful
Syntax
try!!!
http://try.dartlang.org/
compare other language
http://synonym.dartlang.org/
文法
class Dot {
num x, y;
Dot(this.x, this.y);
String toString() => "($x,$y)";
}
void main() {
var p = new Dot(3, 4);
var q = new Dot(5, 6);
print(p);
}
entry point
optional type
short hand
<!DOCTYPE html>
<html>
  <head>
    <title>Hi Dart</title>
  </head>
  <body>
    <h2 id="status">Waiting for Dart to start</h2>
    <script type="application/dart" src="hi.dart"></
script>
    <script src="dart.js"></script>
  </body>
</html>
library hi;
import 'dart:html';
main() {
  query('#status').text = 'Hi, Dart';
}
<!-- Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
     for details. All rights reserved. Use of this source code is governed by a
     BSD-style license that can be found in the LICENSE file. -->
Example
サンプル
dart2js
Dartコードをjavascriptに変換する。
変換後のデバッグも
ソースコードの書き換え等は必要なし。
jsのcontextをDartで扱うライブラリもある。
javascriptへの変換
http://www.dartlang.org/docs/dart-up-and-running/
contents/ch04-tools-dart2js.html
chrome
Package manager for Dart
name: channelDart
dependencies:
appengine_channel: any
js: any
color_picker: any
ライブラリ
pub install
Server side
import 'dart:io';
main() {
HttpServer.bind('127.0.0.1', 8080).then((server) {
server.listen((HttpRequest request) {
//request.uri.path
request.response.write('Hello, world');
request.response.close();
});
});
}
サーバーサイド
Server side
http://dartvoid.com/
http://www.dartlang.org/articles/io/#writing-web-
servers
http://pub.dartlang.org/packages/route
サーバーサイド
Test
unit test
http://www.dartlang.org/articles/dart-unit-tests/
drone.io
[本家]https://drone.io/
[導入]http://muzigram.muzigen.net/
テスティング
web_ui
<html>のパーツ化
データの変化によるViewの変化駆動
http://www.dartlang.org/articles/web-ui/
MDV and Web Component
web_ui Model Driven View
// Dart code:
import 'package:web_ui/web_ui.dart';
@observable String myString = '';
String get shouted => myString.toUpperCase();
String get palindrome =>
myString + myString.split('').reversed.join();
<!-- HTML code: -->
<input type="text" bind-value="myString"
placeholder="Type here">
<div> Shouted: {{shouted}} </div>
<div> Palindromic: {{palindrome}} </div>
<script type="application/dart"
src="little.dart"></script>
<script src="packages/browser/dart.js"></
script>
MDV and Web Component
Web_ui Example
<b-secret placeholder="Enter your Password">
</b-secret>
https://www.blossom.io/bee
MDV and Web Component
Web_ui
create project result
MDV and Web Component
Reccomend Packages
JS
http://pub.dartlang.org/packages/js
Web component parts
https://www.blossom.io/bee
flash like API
http://pub.dartlang.org/packages/stagexl
support game create
http://pub.dartlang.org/packages/game_loop
おすすめのパッケージ
Thanks
http://muzigram.muzigen.net/search/label/dart
http://www.iconfinder.com/
@mogetta

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Introduction to Dart
Introduction to DartIntroduction to Dart
Introduction to Dart
 
Groovy Programming Language
Groovy Programming LanguageGroovy Programming Language
Groovy Programming Language
 
DSL's with Groovy
DSL's with GroovyDSL's with Groovy
DSL's with Groovy
 
Practical Groovy DSL
Practical Groovy DSLPractical Groovy DSL
Practical Groovy DSL
 
Dart structured web apps
Dart   structured web appsDart   structured web apps
Dart structured web apps
 
Dart
DartDart
Dart
 
Dart presentation
Dart presentationDart presentation
Dart presentation
 
TypeScript - Silver Bullet for the Full-stack Developers
TypeScript - Silver Bullet for the Full-stack DevelopersTypeScript - Silver Bullet for the Full-stack Developers
TypeScript - Silver Bullet for the Full-stack Developers
 
Dart, unicorns and rainbows
Dart, unicorns and rainbowsDart, unicorns and rainbows
Dart, unicorns and rainbows
 
Dart
DartDart
Dart
 
Groovy DSLs, from Beginner to Expert - Guillaume Laforge and Paul King - Spri...
Groovy DSLs, from Beginner to Expert - Guillaume Laforge and Paul King - Spri...Groovy DSLs, from Beginner to Expert - Guillaume Laforge and Paul King - Spri...
Groovy DSLs, from Beginner to Expert - Guillaume Laforge and Paul King - Spri...
 
Dart Workshop
Dart WorkshopDart Workshop
Dart Workshop
 
TypeScript introduction to scalable javascript application
TypeScript introduction to scalable javascript applicationTypeScript introduction to scalable javascript application
TypeScript introduction to scalable javascript application
 
Crystal internals (part 1)
Crystal internals (part 1)Crystal internals (part 1)
Crystal internals (part 1)
 
JavaScript - An Introduction
JavaScript - An IntroductionJavaScript - An Introduction
JavaScript - An Introduction
 
Groovy & Grails
Groovy & GrailsGroovy & Grails
Groovy & Grails
 
Better DSL Support for Groovy-Eclipse
Better DSL Support for Groovy-EclipseBetter DSL Support for Groovy-Eclipse
Better DSL Support for Groovy-Eclipse
 
Groovy Domain Specific Languages - SpringOne2GX 2012
Groovy Domain Specific Languages - SpringOne2GX 2012Groovy Domain Specific Languages - SpringOne2GX 2012
Groovy Domain Specific Languages - SpringOne2GX 2012
 
C++ programming
C++ programmingC++ programming
C++ programming
 
How to bake an app in Dart and Polymer
How to bake an app in Dart and PolymerHow to bake an app in Dart and Polymer
How to bake an app in Dart and Polymer
 

Destacado

Core components lib con soc l2
Core components lib con soc l2Core components lib con soc l2
Core components lib con soc l2
betramasamy1
 
Bullesys darts targets design 2 powerpoint ppt slides.
Bullesys darts targets design 2 powerpoint ppt slides.Bullesys darts targets design 2 powerpoint ppt slides.
Bullesys darts targets design 2 powerpoint ppt slides.
SlideTeam.net
 
Dynamics in governance fv version bonita
Dynamics in governance fv version bonitaDynamics in governance fv version bonita
Dynamics in governance fv version bonita
Cristina Medina
 
Classification of political ideas
Classification of political ideasClassification of political ideas
Classification of political ideas
guest9afd54
 
Some Major Political Ideologies
Some Major Political IdeologiesSome Major Political Ideologies
Some Major Political Ideologies
Jess McCulloch
 
Politics of the Philippines
Politics of the PhilippinesPolitics of the Philippines
Politics of the Philippines
HistoryExpert006
 

Destacado (20)

Core components lib con soc l2
Core components lib con soc l2Core components lib con soc l2
Core components lib con soc l2
 
Ideologies
IdeologiesIdeologies
Ideologies
 
Bullesys darts targets design 2 powerpoint ppt slides.
Bullesys darts targets design 2 powerpoint ppt slides.Bullesys darts targets design 2 powerpoint ppt slides.
Bullesys darts targets design 2 powerpoint ppt slides.
 
Local governance
Local governanceLocal governance
Local governance
 
Dynamics in governance fv version bonita
Dynamics in governance fv version bonitaDynamics in governance fv version bonita
Dynamics in governance fv version bonita
 
Darts
DartsDarts
Darts
 
Classification of political ideas
Classification of political ideasClassification of political ideas
Classification of political ideas
 
The local government code of 1991 (chapter iii)
The local government code of 1991 (chapter iii)The local government code of 1991 (chapter iii)
The local government code of 1991 (chapter iii)
 
Liberalism in the Philippines
Liberalism in the PhilippinesLiberalism in the Philippines
Liberalism in the Philippines
 
Nation & state
Nation & stateNation & state
Nation & state
 
Darts powerpoint
Darts powerpointDarts powerpoint
Darts powerpoint
 
Chess
ChessChess
Chess
 
Nation, State & Government
Nation, State & GovernmentNation, State & Government
Nation, State & Government
 
Top 10 Life Lessons Learned From Chess
Top 10 Life Lessons Learned From ChessTop 10 Life Lessons Learned From Chess
Top 10 Life Lessons Learned From Chess
 
Some Major Political Ideologies
Some Major Political IdeologiesSome Major Political Ideologies
Some Major Political Ideologies
 
Politics of the Philippines
Politics of the PhilippinesPolitics of the Philippines
Politics of the Philippines
 
Politics and Governance in the Philippines
Politics and Governance in the PhilippinesPolitics and Governance in the Philippines
Politics and Governance in the Philippines
 
Track and Field Events
Track and Field EventsTrack and Field Events
Track and Field Events
 
Political ideologies
Political ideologiesPolitical ideologies
Political ideologies
 
Humss philippine politics and governance cg 1
Humss philippine politics and governance cg 1Humss philippine politics and governance cg 1
Humss philippine politics and governance cg 1
 

Similar a Start dart

GDG DART Event at Karachi
GDG DART Event at KarachiGDG DART Event at Karachi
GDG DART Event at Karachi
Imam Raza
 
Ratpack - Classy and Compact Groovy Web Apps
Ratpack - Classy and Compact Groovy Web AppsRatpack - Classy and Compact Groovy Web Apps
Ratpack - Classy and Compact Groovy Web Apps
James Williams
 
Dart Jump Start
Dart Jump StartDart Jump Start
Dart Jump Start
Haim Michael
 
Taming Deployment With Smart Frog
Taming Deployment With Smart FrogTaming Deployment With Smart Frog
Taming Deployment With Smart Frog
Steve Loughran
 
Dart, Darrt, Darrrt
Dart, Darrt, DarrrtDart, Darrt, Darrrt
Dart, Darrt, Darrrt
Jana Moudrá
 
R Introduction
R IntroductionR Introduction
R Introduction
schamber
 
GTLAB Installation Tutorial for SciDAC 2009
GTLAB Installation Tutorial for SciDAC 2009GTLAB Installation Tutorial for SciDAC 2009
GTLAB Installation Tutorial for SciDAC 2009
marpierc
 

Similar a Start dart (20)

GDG DART Event at Karachi
GDG DART Event at KarachiGDG DART Event at Karachi
GDG DART Event at Karachi
 
Ratpack - Classy and Compact Groovy Web Apps
Ratpack - Classy and Compact Groovy Web AppsRatpack - Classy and Compact Groovy Web Apps
Ratpack - Classy and Compact Groovy Web Apps
 
Dart PPT.pptx
Dart PPT.pptxDart PPT.pptx
Dart PPT.pptx
 
Dart Jump Start
Dart Jump StartDart Jump Start
Dart Jump Start
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Learn Dart And Angular, Get Your Web Development Wings With Kevin Moore
Learn Dart And Angular, Get Your Web Development Wings With Kevin MooreLearn Dart And Angular, Get Your Web Development Wings With Kevin Moore
Learn Dart And Angular, Get Your Web Development Wings With Kevin Moore
 
Taming Deployment With Smart Frog
Taming Deployment With Smart FrogTaming Deployment With Smart Frog
Taming Deployment With Smart Frog
 
Etu_Optimizer
Etu_OptimizerEtu_Optimizer
Etu_Optimizer
 
Flutter tutorial for Beginner Step by Step
Flutter tutorial for Beginner Step by StepFlutter tutorial for Beginner Step by Step
Flutter tutorial for Beginner Step by Step
 
Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)
Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)
Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)
 
Debian graylog logging server.docx
Debian graylog logging server.docxDebian graylog logging server.docx
Debian graylog logging server.docx
 
Dart, Darrt, Darrrt
Dart, Darrt, DarrrtDart, Darrt, Darrrt
Dart, Darrt, Darrrt
 
R Introduction
R IntroductionR Introduction
R Introduction
 
Groovy Update - JavaPolis 2007
Groovy Update - JavaPolis 2007Groovy Update - JavaPolis 2007
Groovy Update - JavaPolis 2007
 
Kicking off with Zend Expressive and Doctrine ORM (ZendCon 2016)
Kicking off with Zend Expressive and Doctrine ORM (ZendCon 2016)Kicking off with Zend Expressive and Doctrine ORM (ZendCon 2016)
Kicking off with Zend Expressive and Doctrine ORM (ZendCon 2016)
 
GTLAB Installation Tutorial for SciDAC 2009
GTLAB Installation Tutorial for SciDAC 2009GTLAB Installation Tutorial for SciDAC 2009
GTLAB Installation Tutorial for SciDAC 2009
 
GDSC-FlutterBasics.pdf
GDSC-FlutterBasics.pdfGDSC-FlutterBasics.pdf
GDSC-FlutterBasics.pdf
 
2. introduction
2. introduction2. introduction
2. introduction
 
Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008
 
Joomla! Day Chicago 2011 Presentation - Steven Pignataro
Joomla! Day Chicago 2011 Presentation - Steven PignataroJoomla! Day Chicago 2011 Presentation - Steven Pignataro
Joomla! Day Chicago 2011 Presentation - Steven Pignataro
 

Start dart