Sunday, September 1, 2013

Manning 'Dart in Action' by Chris Buckett

I finished reading a book 'Dart in Action' by Chris Buckett.

I have already read a few other books of Dart, this book was most useful.

It explains the end to end web application development using new Dart language features.

As Language, I think Dart is well balanced language influenced from mainly JavaScript, Java, C++.

interesting aspect of this language is more direct support of client/server communication.
An application involved in these aspects often very complicated in other language, but now they can be directly supported as language level (by library as well).
 
Many of them are related asynchronous nature of programming logic. 
  • Future
  • Event Driven(Message Passing) Communication:
    • among different JVM on Blowser(Dart and JavaScript) on a browser
    • among client/server using websocket
    • among isolates
    • among DOM/human interaction
  • Isolate
Dart support following client/server communication machanins
  • Websocket(server can call client as well as the reverse)
  • httpclient(server call other server)
  • httpserver(browser call server)

Also Dart is designed to be used in both of client and server from the begining.
This is also quite good to simplify web applications to allow more code sharing between them.
And some of the feature in Dart will be more useful in server side.

There is a difference of Dart execution mode.
if it run on browser, dart:html is available, but not for server.
dart:io is only available on server.

Essentially these are just a difference of library.

Also httpclient to access other webservers from server are supported as default. this is also quite useful.


This books has useful  idiom in client side.
  • Page navigarion.(how to support browser back/forward feature)
  • cookies
  • localStorage
  • webstorage

The Chapter 12 has a lots of interesting topics.
  •  The technique called JASONP for avoid same origin restriction. 
  •  Server less browser apps(AppCache for offline browser)
  •  Packaging Chrome Web Application





No comments:

Post a Comment