Dart Essentials
eBook - ePub

Dart Essentials

Martin Sikora

Partager le livre
  1. 232 pages
  2. English
  3. ePUB (adapté aux mobiles)
  4. Disponible sur iOS et Android
eBook - ePub

Dart Essentials

Martin Sikora

DĂ©tails du livre
Aperçu du livre
Table des matiĂšres
Citations

Foire aux questions

Comment puis-je résilier mon abonnement ?
Il vous suffit de vous rendre dans la section compte dans paramĂštres et de cliquer sur « RĂ©silier l’abonnement ». C’est aussi simple que cela ! Une fois que vous aurez rĂ©siliĂ© votre abonnement, il restera actif pour le reste de la pĂ©riode pour laquelle vous avez payĂ©. DĂ©couvrez-en plus ici.
Puis-je / comment puis-je télécharger des livres ?
Pour le moment, tous nos livres en format ePub adaptĂ©s aux mobiles peuvent ĂȘtre tĂ©lĂ©chargĂ©s via l’application. La plupart de nos PDF sont Ă©galement disponibles en tĂ©lĂ©chargement et les autres seront tĂ©lĂ©chargeables trĂšs prochainement. DĂ©couvrez-en plus ici.
Quelle est la différence entre les formules tarifaires ?
Les deux abonnements vous donnent un accĂšs complet Ă  la bibliothĂšque et Ă  toutes les fonctionnalitĂ©s de Perlego. Les seules diffĂ©rences sont les tarifs ainsi que la pĂ©riode d’abonnement : avec l’abonnement annuel, vous Ă©conomiserez environ 30 % par rapport Ă  12 mois d’abonnement mensuel.
Qu’est-ce que Perlego ?
Nous sommes un service d’abonnement Ă  des ouvrages universitaires en ligne, oĂč vous pouvez accĂ©der Ă  toute une bibliothĂšque pour un prix infĂ©rieur Ă  celui d’un seul livre par mois. Avec plus d’un million de livres sur plus de 1 000 sujets, nous avons ce qu’il vous faut ! DĂ©couvrez-en plus ici.
Prenez-vous en charge la synthÚse vocale ?
Recherchez le symbole Écouter sur votre prochain livre pour voir si vous pouvez l’écouter. L’outil Écouter lit le texte Ă  haute voix pour vous, en surlignant le passage qui est en cours de lecture. Vous pouvez le mettre sur pause, l’accĂ©lĂ©rer ou le ralentir. DĂ©couvrez-en plus ici.
Est-ce que Dart Essentials est un PDF/ePUB en ligne ?
Oui, vous pouvez accĂ©der Ă  Dart Essentials par Martin Sikora en format PDF et/ou ePUB ainsi qu’à d’autres livres populaires dans Informatique et DĂ©veloppement Web. Nous disposons de plus d’un million d’ouvrages Ă  dĂ©couvrir dans notre catalogue.

Informations

Année
2015
ISBN
9781783989607

Dart Essentials


Table of Contents

Dart Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Getting Started with Dart
What is Dart?
Why choose Dart?
Installing the Dart SDK
Dart Editor
Writing a greeting for all Dartisans
pubspec.yaml
index.html
The main() function
Running and debugging code in Dartium
Compiling Dart to JavaScript
The Dart language tour
The static checker
Variables
Built-in types
Functions and parameters
Class properties
Class inheritance and abstract classes
Constructors
Exceptions
Using static types
Summary
2. Practical Dart
Optimizing DOM tree manipulations
The documentation search app
The Future-Based API
Using async and await keywords
Async
Await
Creating Ajax requests in Dart
Dart packages
Writing the fuzzy search algorithm
Handling HTML elements
Combining Dart and JavaScript
Using Dart in JavaScript
Using JavaScript in Dart
Dart MythBusters
Summary
3. The Power of HTML5 with Dart
Creating the Reddit Read Later app
Fetching the JSONP data
IndexedDB
Initializing IndexedDB
Fetching stored records
Saving records
Deleting records
Indices
Polishing the application
LocalStorage versus IndexedDB
What about WebSQL?
Music visualizer
Other noteworthy APIs and libraries
Typed lists for fast numeric computing
vector_math
SIMD
WebGL
three.dart
StageXL
Box2D and play_phaser
Isolates and Web Workers
Summary
4. Developing a Mobile App with Dart
300 ms tap delay
Basics of CSS3 transformations
Axes
Hello world in 3D
Nesting 3D transformed elements
A 3D bookshelf with DeviceOrientation events
Position and distance tracker with the GeoLocation API and Google Maps API
Drawing into 2D canvas using onTouch events
Summary
5. Web Components and polymer.dart
Web Components
Shadow DOM
Custom Elements
Template
HTML Imports
The Web Components polyfill for older browsers
Basic HTML Import
Using Shadow DOM
Using Custom Elements
Polymer.dart
Minimalistic custom element in polymer.dart
One-way data binding
Loops and conditions in templates
Two-way data binding
Polymer core and paper elements
A quick look at core-list
What's next?
Summary
6. AngularDart
Installing AngularDart
To-do list with AngularDart
Scope
Extending the to-do list
Model
View
Component
Finishing TodoListComponent
Data bindings
A book component in AngularDart
What is Angular 2.0?
Why is Angular 2.0 not written in Dart?
Performance tips for AngularDart
Avoiding nesting ng-repeat directives
Using track by for ng-repeat
Avoiding excess formatter usage
Not everything needs to be in Angular
Summary
7. Server-side Applications with Dart
The standalone Dart VM
Parsing CLI arguments with the args package
Writing a chat app with the WebSockets server
Client-side WebSockets
Listening to Unix signals and basic I/O operations
Running the server as a background process
Enumerated types
Typedefs
Using MySQL as a storage
Writing an HTTP server with the route package
Using Dart as a full-stack language
Using Apache as a proxy for the Dart HTTP server
Using nginx as a proxy for the Dart HTTP server
Executing Dart as CGI and Apache mod_dart
Summary
8. Testing and Profiling the Dart Code
Testing strategies for web apps
Unit testing
Asynchronous tests
Test groups
Running all tests
Operator overloading and mixins
Operator overloading
Mixins
Testing AngularDart apps
Profiling with the Observatory tool
Summary
9. Writing Native Extensions for the Standalone Dart VM
The structure of native extensions
Writing a minimal native extension
Writing a native fuzzy search implementation
Optimizing our C/C++ code
Multithreading with Dart Isolates
Writing bindings for the exiv2 library
Distributing native extensions
Summary
Index

Dart Essentials

Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: May 2015
Production reference: 1190515
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78398-960-7
www.packtpub.com

Credits

Author
Martin Sikora
Reviewers
Lamoriniere Cedric
Rokesh Jankie
Hans Van den Keybus
Frederik Leonhardt
Marko Vuksanovic
Commissioning Editor
Taron Pereira
Acquisition Editor
Shaon Basu
Content Development Editor
Akashdeep Kundu
Technical Editor
Mrunal M. Chavan
Copy Editor
Stuti Srivastava
Project Coordinator
Milton Dsouza
Proofreaders
Stephen Copestake
Safis Editing
Indexer
Hemangini Bari
Graphics
Sheetal Aute
Production Coordinator
Shantanu N. Zagade
Cover Work
Shantanu N. Zagade

About the Author

Martin Sikora has been programming professionally since 2006 for companies such as Miton CZ and Symbio Digital in various languages, mostly PHP. Since 2012, he's been freelancing, working on projects in Python, PHP, Dart, Objective-C, and AngularJS. He's a Zend Certified Engineer and was a member of the winning team at Google Dart Hackathon 2012 in Prague.

About the Reviewers

Lamoriniere Cedric is a software engineer and a graduate from a French engineering school, who mostly uses C++ during his day job.
His taste for innovation has led him to try out a considerable amount of various web frameworks, technologies, and languages.
Among these languages, he has taken a strong interest in the Dart language for its ease of use and efficiency. It allows developers to get things done in a timely manner.
Rokesh Jankie graduated in 1998 with a master's degree in computer science from Leiden University, the Nether...

Table des matiĂšres