Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥

Reallife experience with Dart

Reallife experience with Dart

I could show my Slack Chatbot written in Dart. It covers websockets, an API w/ redstone and a little bit AngularDart for the frontend.

Sebastian

July 27, 2016
Tweet

More Decks by Sebastian

Other Decks in Programming

Transcript

  1. blitzlicht Improve communication by asking simple questions. 1. Ask one

    question 2. Have people answer in their own words 3. Get insights
  2. Code example void connect(String url) { WebSocket.connect(url).then((WebSocket websocket) { websocket.pingInterval

    = new Duration(seconds: 5); websocket.listen(process, onDone: reconnect, onError: reconnect); }); }
  3. Code example void connect(String url) { WebSocket.connect(url).then((WebSocket websocket) { websocket.pingInterval

    = new Duration(seconds: 5); websocket.listen(process, onDone: reconnect, onError: reconnect); }); }
  4. Code example @app.Group('/api/blitzlichts') class BlitzlichtService { @app.Route('/:id') read(String id, @Repo()

    Repository repo) async { Blitzlicht blitzlicht = await repo.findOne(where.id(new ObjectId.fromHexString(id))); return blitzlicht.toMap(); } }
  5. Code example @app.Group('/api/blitzlichts') class BlitzlichtService { @app.Route('/:id') read(String id, @Repo()

    Repository repo) async { Blitzlicht blitzlicht = await repo.findOne(where.id(new ObjectId.fromHexString(id))); return blitzlicht.toMap(); } }
  6. Code example @app.Group('/api/blitzlichts') class BlitzlichtService { @app.Route('/:id') read(String id, @Repo()

    Repository repo) async { Blitzlicht blitzlicht = await repo.findOne(where.id(new ObjectId.fromHexString(id))); return blitzlicht.toMap(); } }
  7. Code example @app.Group('/api/blitzlichts') class BlitzlichtService { @app.Route('/:id') read(String id, @Repo()

    Repository repo) async { Blitzlicht blitzlicht = await repo.findOne(where.id(new ObjectId.fromHexString(id))); return blitzlicht.toMap(); } }
  8. Code example <head> <!-- snip --> <script async src="main.dart" type="application/dart"

    type=" application/dart"></script> <script async src="packages/browser/dart.js" type="text/javascript" ></script> <!-- snip --> </head>
  9. Code example @Component( directives: const [ROUTER_DIRECTIVES], providers: const [ROUTER_PROVIDERS], selector:

    'blitzlicht', templateUrl: 'app_component.html') @RouteConfig(const [ const Route( path: '/', name: 'Index', component: IndexComponent, useAsDefault: true), ]) class AppComponent implements OnInit { Future<Null> ngOnInit() async { print('THIS IS BLITZLICHT'); } }