Dart: Scalable Application Development

Book description

Master the art of designing web client and server with Google’s bold and productive language – Dart

About This Book

  • Create robust applications with unit tests, documentation, and diagnostic logging

  • Master the core Dart language, type system, and key development tools

  • Connect to existing web services, process JSON, and create your own framework for the data display

  • Use mixins, reflections, annotations, and other metadata programming techniques to create powerful app

  • Who This Book Is For

    If you are familiar with web development and are looking to learn, or even just evaluate, Dart as a multipurpose language, this learning path is for you. No familiarity with the Dart language is assumed. For beginners, it will serve as a guide to rapidly accelerate from a novice level to the master level; for intermediate to advanced developers it will quickly fill in the gaps on Dart and can explore a range of application types and powerful packages that are demonstrated in a practical manner.

    What You Will Learn

  • Handle form data and encryption

  • Set up your Dart environment to achieve the highest productivity

  • Run and debug the Dart server and web applications and compile them in JavaScript

  • Work with PostgreSQL—an industry standard relational database system

  • Create robust applications with unit tests, documentation, and diagnostic logging

  • Develop command-line applications, and explore the key data structures and libraries

  • Detect and use HTML5 features that will help you deliver rich, cross-platform content

  • Demonstrate the power of Polymer web components for binding data and structuring your web pages

  • In Detail

    Designed to create next generation apps, Google’s Dart offers a much more robust framework and also supersedes JavaScript in several aspects. Familiar yet innovative, compact yet scalable, it blows away the accumulated JavaScript legacy limitations. Dart was designed for great tool-ability and developer productivity, allowing you to create better application faster than before. Google chose it for their billion dollar advertising business and you have its power for your projects too.

    The first module will introduce you the Dart language starting from its conception to its current form, and where it headed is through engaging substantial practical projects. You will be taken through building typical applications and exploring the exciting new technologies of HTML5.

    The second module will show you how to add internalization support to your web applications and how i18n and i10n access can be embedded into your code to design applications that can be localized easily. You will be shown how to organize client-to-server communication and how different HTML5 features can be used in Dart. Finally, this module will show you how you can store data locally, break the storage limit, and prevent security issues in your web application.

    The third module is a pragmatic guide that will increase your expertise in writing all kinds of applications, including web apps, scripts, and server-side apps. It provides rich insights on how to extend your Dart programming skills.

    Altogether, this course provides you the power to create powerful applications with Dart, without worrying about your knowledge leading to you having to make compromises to the end product!

    This Learning Path has been curated from three Packt products:

  • Dart By Example By Davy Mitchell

  • Mastering Dart By Sergey Akopkokhyants

  • Dart Cookbook By Ivo Balbaert

  • Style and approach

    This is an enticing learning path that starts from the very basics to gradually pick up pace as the story unfolds. Each topic is explained with the help of recipes that solves a real-world problem involving hands-on work thus giving you a deep insight into the world of DART.

    Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the code file.

    Table of contents

    1. Dart: Scalable Application Development
      1. Table of Contents
      2. Dart: Scalable Application Development
      3. Dart: Scalable Application Development
      4. Credits
      5. Preface
        1. What this learning path covers
        2. What you need for this learning path
        3. Who this learning path is for
        4. Reader feedback
        5. Customer support
          1. Downloading the example code
          2. Errata
          3. Piracy
          4. Questions
      6. 1. Module 1
        1. 1. Starting the Text Editor
          1. Defining Dart
          2. History of Web scripting
          3. The origins of Dart
          4. Downloading the tools
            1. Introducing the WebStorm IDE
            2. Alternative development environments
            3. Help starting a project
            4. Elsewhere in the SDK
          5. Building your first application
            1. Exploring the Web project structure
            2. Unwrapping packages
            3. A look at Pubspec
            4. Putting Dart into the web page
            5. Importing packages
            6. Variable declarations
            7. Writing the event handler
            8. Loading the saved text
            9. Saving the text
            10. Running in the browser
            11. Editing and reloading
            12. Extending the interface
            13. Using the CSS editor
          6. Debugging a Dart application
            1. Working in harmony with JavaScript
            2. Commenting in the code
          7. Summary
        2. 2. Advancing the Editor
          1. The next steps for the text editor
            1. Starting point
              1. Dart classes
            2. Structuring the project
          2. Building the dialog package
            1. The package project structure
            2. Adding a local package reference
              1. Understanding the package scope
              2. Defining the base dialog box
                1. The alert dialog box
                2. The About dialog box
                3. Using the confirmation dialog box
              3. Counting words using a list
              4. The Word Frequency feature
            3. Understanding the typing of Dart code
            4. The file download feature
              1. The clock feature
              2. Executing Dart code
              3. Multi-processing the VM
            5. The class designer
              1. Building a more complicated dialog
              2. Constructing the class
              3. Understanding the flow of events
              4. Launching the application
          3. The command-line app for source code statistics
            1. The command-line project structure
              1. Processing the source code
              2. File handling with the dart:io package
              3. Debugging the command-line program
              4. Integrating the statistics
            2. HTML5 and the canvas
              1. Drawing the pie chart
          4. Building web interfaces with Dart
          5. Compiling to JavaScript
            1. Minification of JavaScript output
          6. Summary
        3. 3. Slideshow Presentations
          1. Building a presentation application
            1. Laying out the application
            2. Defining the presentation format
            3. Parsing the presentation
            4. A sample presentation
            5. Presenter project structures
            6. Launching the application
            7. Building bullet point slides
          2. Accessing private fields
            1. Using true getters and setters
          3. Mixin' it up
            1. Defining the core classes
            2. Transforming data into HTML
            3. Editing the presentation
            4. Displaying the current slide
            5. Navigating the presentation
              1. Handling the button key presses
              2. Using the Function type
              3. Staying within the bounds
              4. Using the slider control
            6. Responding to keyboard events
            7. Showing the key help
              1. Listening twice to event streams
          4. Changing the colors
          5. Adding a date
          6. Timing the presentation
            1. Introducing the Stopwatch class
            2. Implementing the presentation timer
          7. An overview of slides
          8. Handout notes
            1. Comparing optional positional and named parameters
          9. Summary
        4. 4. Language, Motion, and Sound
          1. Going fullscreen
            1. Request fullscreen
            2. Updating the interface for fullscreen
            3. Updating keyboard controls for fullscreen
              1. Adding mouse controls
          2. Adding metadata
            1. Creating a custom annotation
            2. Translating the user interface text
          3. Exploring the intl package
            1. Locating strings to translate
            2. Extracting the strings
              1. Running commands with Dart pub
              2. Obtaining translations
            3. Integrating the translations text
            4. Changing the language of the user interface
            5. Adding a language combo box
          4. Working with dates
            1. Formatting for the locale
          5. Animating slides
            1. Using a timer
          6. Playing sound in the browser
            1. Producing sound effects
            2. Creating sound files
            3. Loading sounds
            4. Playing back sounds
          7. Summary
        5. 5. A Blog Server
          1. The Hello World server example
          2. A blog server
            1. Introducing the HTTP protocol
            2. Starting up the server
            3. Storing the blog posts format
            4. Reading text files
            5. Reading a folder of files
              1. Request handling
              2. Serving text
            6. Robots.txt
            7. Rendering a single blog post
              1. Rendering the index page
              2. Serving images
              3. Locating the file
              4. Serving a single image file
              5. Serving a 404 error
          3. Introducing Dart's server frameworks
            1. Redstone
            2. Rikulo
            3. Shelf
          4. Deployment
            1. Dependencies
            2. Deploying on Unix
            3. Using the screen command
            4. Launching a screen
            5. Deploying on Windows
              1. Using the NSSM tool
              2. Using a Microsoft solution
          5. Load testing
            1. Building a simple load tool
          6. Summary
        6. 6. Blog Server Advanced
          1. Logging
            1. Writing text files
            2. Extracting request information
          2. A blog editor
            1. Password protection
            2. Encryption
            3. Handling more complex forms
            4. Processing the form
            5. Saving data to a disk
              1. Serving a default graphic
              2. Refreshing the blog
          3. Caching
          4. Watching the filesystem
          5. XML feed generation
            1. Serving the RSS
          6. The JSON feed generation
            1. Serving the JSON
            2. Consuming the JSON feed
          7. Static generation
            1. Freezing the website
          8. Introducing the await and async keywords
            1. Joining file paths
            2. Creating an output folder
            3. Generating the front page
              1. Writing the static version
          9. Load testing revisited
            1. Updating the load tester
          10. Summary
        7. 7. Live Data Collection
          1. Kicking off the earthquake monitoring system
          2. Introducing the data source
          3. Exploring the GeoJSON format
            1. Fetching and recording the data
          4. Logging
            1. A simple example of logging
            2. Data monitor logging
          5. Saving to the database
            1. Installing a database system
            2. Using PostgreSQL from Dart
          6. Introducing the pgAdmin GUI
            1. Creating the database and login
            2. Defining the table
            3. Inserting data
            4. Running the program
            5. Maintaining a database
              1. Managing command line arguments
              2. Retrieving data
              3. Deleting data
          7. Observing the Dart VM internals
          8. Unit testing
            1. Running unit tests
            2. Writing unit tests for the data monitor
              1. Grouping tests together
              2. Examining the test results
          9. Summary
        8. 8. Live Data and a Web Service
          1. Freeing the data
            1. Reworking the data collector
            2. Adding a new data table
            3. Filtering the data
            4. Converting the feature to JSON
            5. Improving the data maintenance
            6. Storing the single feature
            7. Running the data application
          2. Creating the web service
            1. Using the package rpc
            2. Initiating the API server
            3. Exposing methods
            4. Error handling of incorrect requests
            5. Serving the latest information
            6. Supplying the data
            7. Discovering the API
            8. Running the web service
          3. Recapping the system so far
          4. Consuming application
            1. Packaging the grid
            2. Initiating the real-time updates
            3. Performing the update
            4. Fetching the JSON
            5. Configuring the grid view control
            6. Formatting the time
            7. Working with date and time
            8. Building the table
            9. Showing the page
          5. Summary
        9. 9. A Real-Time Visualization
          1. Iteration overview
          2. Application overview
            1. Drawing the map image
            2. Plotting on the map
            3. Animating the display
            4. Fetching the data
            5. Updating the map indicators
            6. Mouse over popups
            7. Zooming into the display
          3. Notifying the user of an update
          4. Plotting the user's location
          5. Sorting the feature list
          6. Documenting Dart code with dartdoc
          7. Summary
        10. 10. Reports and an API
          1. Recapping the earthquake system
          2. Advancing the REST API
          3. Passing parameters to the API
          4. Posting on the API
            1. Connecting to an API client
            2. Varying the data
            3. Returning to the map
            4. Reporting on the data
            5. The ReportSite project
            6. Report classes
            7. Creating a printable report
            8. Charting the data
            9. Exporting to CSV
          5. Summary
      7. 2. Module 2
        1. 1. Beyond Dart's Basics
          1. Modularity and a namespace
            1. Modularity in software development
            2. Modularity in Dart
            3. Libraries
          2. Functions and closures in different scopes
            1. Naming functions with a variable
            2. Passing a function as an argument to another function
            3. Returning a function as a result of another function
            4. Storing a function in data structures
            5. Closures
          3. Classes and mixins
            1. Types
            2. Classes
            3. Inheritance
            4. Interface
            5. Mixins
            6. Well-designed classes
            7. To be private or not
            8. Variables versus the accessor methods
            9. Inheritance versus composition
          4. Methods and operators
            1. Checking the values of the parameters before using them
            2. Well-designed methods
          5. Summary
        2. 2. Advanced Techniques and Reflection
          1. Generics
            1. Raw types
            2. Using generics
            3. Generic types
            4. Generic functions
          2. Errors versus exceptions
            1. Errors
            2. Exceptions
          3. Annotations
            1. Built-in annotations
              1. Deprecated
              2. Override
              3. Proxy
            2. Custom annotations
          4. Reflection
            1. Introspection in action
            2. Reflection in action
          5. Summary
        3. 3. Object Creation
          1. Creating an object
            1. A generative constructor
            2. A constructor with optional parameters
            3. A named constructor
            4. A redirecting constructor
            5. A private constructor
            6. A factory constructor
              1. The factory method design pattern
              2. The singleton design pattern
            7. A constant constructor
            8. Initializing variables
            9. Syntactic sugar
              1. Method call
              2. Cascade method invocation
          2. Summary
        4. 4. Asynchronous Programming
          1. Call-stack architectures versus event-driven architectures
            1. Call-stack architectures
            2. Event-driven architectures
            3. The Dart VM execution model
            4. Synchronous versus Asynchronous code
          2. Future
            1. Future and Timer
            2. Future and Microtask
            3. Sync the Future class
            4. Future with a value
            5. Future with an error
            6. Delaying the Future class
          3. Zones
            1. Simple zone example
            2. Zone nesting
            3. Zone values
            4. Zone specifications
            5. Interaction between zones
            6. Tracking the zone execution
          4. Isolates
          5. Summary
        5. 5. The Stream Framework
          1. Why you should use streams
          2. Single-subscription streams versus broadcast streams
            1. A single-subscription stream
            2. A broadcast stream
          3. An overview of the stream framework API
            1. The Stream class
            2. The validation methods of the Stream class
            3. The search methods of the Stream class
            4. The subset methods of the Stream class
            5. Creating a stream
            6. A new stream from the Future class
            7. A new stream from the Iterable class
            8. A new stream with periodically generated events
            9. A new stream from the transformation pipe
            10. A new stream from StreamController
            11. What does the StreamSubscription class do?
            12. Minimizing access to the Stream class members using StreamView
            13. The Sink and EventSink interfaces
            14. Importance of the StreamConsumer interface
            15. What does the StreamSink class do?
            16. Transforming streams with the StreamTransformer class
            17. Traverse streams with StreamIterator
          4. Summary
        6. 6. The Collection Framework
          1. A Dart collection framework
          2. Ordering of elements
            1. The Comparable interface
            2. The Comparator type
          3. Collections and generics
          4. The collection class hierarchy
          5. The Iterable interface
            1. Properties of the Iterable collection
            2. Checking the items of a collection on a condition
            3. The iterate over collection
            4. The search over collection
            5. Creating a new collection
            6. Reducing a collection
            7. Converting a collection
            8. Generating a collection
            9. The Lazy Iterable
          6. The Iterable interface
          7. BidirectionalIterator
          8. The collection classes
            1. List
            2. LinkedList
            3. Set
              1. HashSet
              2. LinkedHashSet
              3. SplayTreeSet
            4. Queue
            5. Map
              1. HashMap
              2. LinkedHashMap
              3. SplayTreeMap
          9. Unmodifiable collections
            1. The unmodifiable list
            2. The unmodifiable map
          10. Choosing the right collection
          11. Summary
        7. 7. Dart and JavaScript Interoperation
          1. Interoperation at a glance
          2. The dart:js library
            1. JsObject
            2. JsFunction
            3. JsArray
          3. Type conversion
            1. Direct type conversion
            2. Proxy type conversion
            3. Collection conversion
          4. JsObject and instantiation
          5. JsFunction and the this keyword
          6. Dart with jQuery
            1. How to create a shortcut to jQuery
            2. Why does JProxy need a method call?
            3. How does JProxy invoke jQuery?
            4. An example project
            5. How to get the jQuery version
            6. How to perform actions in jQuery
            7. How to use effects in jQuery
            8. What is the impact on performance?
          7. Summary
        8. 8. Internalization and Localization
          1. The key principles
            1. Executable code versus User Interface
              1. Numbers and dates
              2. Messages
              3. Measuring units and currencies
              4. Text input and layout
              5. Formatting date and time
          2. The Intl library
            1. Changing a locale
            2. Formatting numbers
            3. Formatting dates
            4. Internalizing messages
            5. Adding parentheses
            6. Adding gender
            7. Adding select
            8. Creating complex message translations
            9. Bidirectional formatting
          3. Internationalizing your web application
          4. Extracting messages
          5. Using Google Translator Toolkit
          6. Using translated messages
          7. Summary
        9. 9. Client-to-server Communication
          1. Communication at a glance
            1. The Internet protocol stack
          2. Hypertext Transfer Protocol
            1. Web server
            2. Standalone HTTP communication via the dart:io library
            3. Standalone HTTP communication via the http package
            4. Web browser HTTP communication via the dart:html library
            5. Web browser HTTP communication via the http package
          3. AJAX polling request
          4. AJAX long polling request
            1. Server-Sent Events
          5. WebSocket
          6. Summary
        10. 10. Advanced Storage
          1. Cookies
          2. Web Storage
            1. The Session storage
            2. The Local storage
          3. Web SQL
          4. IndexedDB
          5. Summary
        11. 11. Supporting Other HTML5 Features
          1. The notification APIs
            1. When to notify
            2. Preventing repeated notifications
          2. The native drag-and-drop APIs
            1. Draggable content
            2. The drag-and-drop events
            3. Dragging data
            4. Dragging the feedback image
            5. Dragging effects
            6. The drop target
            7. Finishing a drop
            8. Finishing a drag
          3. The geolocation APIs
            1. Determining the current location
            2. Geolocation on maps
            3. Tracking the present location
          4. Canvas
            1. Example – the canvas editor
              1. Beginning with HTML
              2. Moving to the main function
              3. The CanvasWidget component
              4. The ToolSelector widget
              5. The ColorSelector widget
              6. The Tool class
              7. The Pen tool
              8. The Line tool
              9. The Rectangle tool
              10. The Oval tool
              11. How to clear the context
              12. How to preview the context
          5. Summary
        12. 12. Security Aspects
          1. Web security
            1. Transport Layer Security and Secure Socket Layer at a glance
            2. The TLS certificate
          2. Securing a server
          3. Securing a client
            1. Attributes of cookies
            2. HTTP Strict Transport Security
            3. Content Security Policy
            4. Cross Origin Resource Sharing versus JSON with padding
            5. CAPTCHA
          4. Security best practices
          5. Summary
      8. 3. Module 3
        1. 1. Working with Dart Tools
          1. Introduction
          2. Configuring the Dart environment
            1. Getting ready
            2. How to do it...
            3. How it works...
          3. Setting up the checked and production modes
            1. Getting ready
            2. How to do it...
            3. How it works...
            4. There's more...
            5. See also
          4. Rapid Dart Editor troubleshooting
            1. Getting ready
            2. How to do it...
            3. How it works...
            4. There's more...
          5. Hosting your own private pub mirror
            1. How to do it...
            2. How it works...
          6. Using Sublime Text 2 as an IDE
            1. Getting ready
            2. How to do it...
            3. How it works...
            4. See also
          7. Compiling your app to JavaScript
            1. How to do it...
            2. How it works...
            3. There's more...
              1. Producing more readable JavaScript code
              2. Producing a single Dart file
            4. See also
          8. Debugging your app in JavaScript for Chrome
            1. How to do it…
            2. How it works...
            3. There's more...
              1. Debugging your app in JavaScript for Firefox
          9. Using the command-line tools
            1. How to do it...
            2. See also
          10. Solving problems when pub get fails
            1. Getting ready
            2. How to do it...
            3. How it works...
            4. There's more...
          11. Shrinking the size of your app
            1. How to do it...
            2. How it works...
            3. There's more...
              1. More Information Section 1
            4. See also
          12. Making a system call
            1. How to do it...
            2. How it works...
          13. Using snapshotting
            1. How to do it...
            2. How it works...
            3. There's more...
            4. See also
          14. Getting information from the operating system
            1. Getting ready
            2. How to do it...
            3. How it works...
            4. There's more...
        2. 2. Structuring, Testing, and Deploying an Application
          1. Introduction
          2. Exiting from an app
            1. How to do it...
              1. How it works...
          3. Parsing command-line arguments
            1. How to do it...
            2. How it works...
            3. See also
          4. Structuring an application
            1. Getting ready
            2. How to do it...
            3. How it works...
            4. There's more...
            5. See also
          5. Using a library from within your app
            1. How to do it...
            2. How it works...
            3. There's more...
          6. Microtesting your code with assert
            1. How to do it...
            2. How it works...
            3. There's more...
          7. Unit testing a Polymer web app
            1. Getting ready
            2. How to do it...
            3. How it works...
            4. See also
          8. Adding logging to your app
            1. Getting ready
            2. How to do it...
            3. How it works...
            4. There's more...
          9. Documenting your app
            1. Getting ready
            2. How to do it...
            3. How it works...
            4. There's more...
          10. Profiling and benchmarking your app
            1. Getting ready
            2. How to do it...
            3. How it works...
            4. See also
          11. Publishing and deploying your app
            1. Getting ready
            2. How to do it...
            3. How it works...
            4. There's more...
          12. Using different settings in the checked and production modes
            1. How to do it...
            2. How it works...
        3. 3. Working with Data Types
          1. Introduction
          2. Concatenating strings
            1. How to do it...
            2. How it works...
            3. There's more...
          3. Using regular expressions
            1. How to do it...
            2. How it works...
            3. There's more...
          4. Strings and Unicode
            1. How to do it...
            2. How it works...
            3. There's more...
          5. Using complex numbers
            1. How to do it...
            2. How it works...
            3. There's more...
          6. Creating an enum
            1. How to do it...
            2. How it works...
            3. There's more...
          7. Flattening a list
            1. How to do it...
            2. How it works...
            3. There's more...
          8. Generating a random number within a range
            1. How to do it...
            2. How it works...
          9. Getting a random element from a list
            1. How to do it...
            2. How it works...
            3. See also
          10. Working with dates and times
            1. How to do it...
            2. How it works...
            3. There's more...
          11. Improving performance in numerical computations
            1. How to do it...
            2. How it works...
            3. There's more...
              1. Working with JavaScript
              2. Parsing numbers
            4. See also
          12. Using SIMD for enhanced performance
            1. How to do it…
            2. How it works...
            3. See also
        4. 4. Object Orientation
          1. Introduction
          2. Testing and converting types
            1. How to do it...
            2. How it works...
            3. There's more...
            4. See also
          3. Comparing two objects
            1. How to do it...
            2. How it works...
            3. There's more...
            4. See also
          4. Using a factory constructor
            1. How to do it...
            2. How it works...
            3. There's more...
          5. Building a singleton
            1. How to do it...
            2. How it works...
          6. Using reflection
            1. Getting ready
            2. How to do it...
            3. How it works...
            4. There's more...
            5. See also
          7. Using mixins
            1. How to do it...
            2. How it works...
            3. There's more...
          8. Using annotations
            1. How to do it...
            2. How it works...
            3. There's more...
            4. See also
          9. Using the call method
            1. How to do it...
            2. How it works...
            3. There's more...
          10. Using noSuchMethod
            1. How to do it...
            2. How it works...
            3. There's more...
            4. See also
          11. Making toJSON and fromJSON methods in your class
            1. Getting ready
            2. How to do it...
            3. How it works...
            4. There's more...
          12. Creating common classes for client and server apps
            1. How to do it...
            2. How it works...
            3. There's more…
            4. See also
        5. 5. Handling Web Applications
          1. Introduction
          2. Responsive design
            1. How to do it...
            2. How it works...
            3. See also
          3. Sanitizing HTML
            1. How to do it...
            2. How it works...
          4. Using a browser's local storage
            1. How to do it...
            2. How it works...
            3. There's more...
            4. See also
          5. Using application cache to work offline
            1. How to do it...
            2. How it works...
            3. There's more...
          6. Preventing an onSubmit event from reloading the page
            1. How to do it...
            2. How it works...
          7. Dynamically inserting rows in an HTML table
            1. How to do it...
            2. How it works...
            3. See also...
          8. Using CORS headers
            1. How to do it...
            2. How it works...
            3. There's more...
          9. Using keyboard events
            1. How to do it...
            2. How it works...
            3. There's more...
          10. Enabling drag-and-drop
            1. How to do it...
            2. How it works...
            3. See also
          11. Enabling touch events
            1. How to do it...
            2. How it works...
            3. There's more...
            4. See also
          12. Creating a Chrome app
            1. How to do it...
            2. How it works...
            3. There's more...
            4. See also
          13. Structuring a game project
            1. How to do it...
            2. How it works...
            3. There's more...
            4. See also
          14. Using WebGL in your app
            1. How to do it...
            2. How it works...
            3. There's more...
            4. See also
          15. Authorizing OAuth2 to Google services
            1. How to do it...
            2. How it works...
            3. There's more...
            4. See also
          16. Talking with JavaScript
            1. How to do it...
            2. How it works...
            3. There's more...
            4. See also
          17. Using JavaScript libraries
            1. How to do it...
            2. How it works...
            3. See also
        6. 6. Working with Files and Streams
          1. Introduction
          2. Reading and processing a file line by line
            1. How to do it...
            2. How it works...
            3. See also
          3. Writing to a file
            1. How to do it...
            2. How it works...
            3. There's more...
          4. Searching in a file
            1. How to do it...
            2. How it works...
            3. See also
          5. Concatenating files
            1. How to do it...
            2. How it works...
            3. There's more...
            4. See also
          6. Downloading a file
            1. Getting ready
            2. How to do it...
            3. How it works...
            4. There's more...
              1. Using pipe
              2. Using the http package
            5. See also
          7. Working with blobs
            1. Getting ready
            2. How to do it...
            3. How it works...
          8. Transforming streams
            1. How to do it...
            2. How it works...
            3. There's more...
            4. See also
        7. 7. Working with Web Servers
          1. Introduction
          2. Creating a web server
            1. How to do it...
            2. How it works...
            3. There is more...
          3. Posting JSON-formatted data
            1. How to do it...
            2. How it works...
            3. See also
          4. Receiving data on the web server
            1. How to do it...
            2. How it works...
            3. There's more...
              1. Writing data to a file on the server
            4. See also
          5. Serving files with http_server
            1. How to do it...
            2. How it works...
            3. There's more...
          6. Using sockets
            1. How to do it...
            2. How it works...
            3. There's more...
          7. Using WebSockets
            1. Getting ready
            2. How to do it...
            3. How it works...
            4. There's more...
            5. See also
          8. Using secure sockets and servers
            1. Getting ready
            2. How to do it...
            3. How it works...
            4. See also
          9. Using a JSON web service
            1. Getting ready
            2. How to do it...
            3. How it works...
            4. See also
        8. 8. Working with Futures, Tasks, and Isolates
          1. Introduction
          2. Writing a game loop
            1. How to do it...
            2. How it works...
            3. There's more...
            4. See also
          3. Error handling with Futures
            1. Getting ready
            2. How to do it...
            3. How it works...
          4. Scheduling tasks using Futures
            1. How to do it...
            2. How it works...
            3. See also
          5. Running a recurring function
            1. How to do it...
            2. How it works...
            3. There's more...
            4. See also
          6. Using isolates in the Dart VM
            1. How to do it...
            2. How it works...
            3. There's more...
            4. See also
          7. Using isolates in web apps
            1. How to do it...
            2. How it works...
            3. See also
          8. Using multiple cores with isolates
            1. How to do it...
            2. How it works...
          9. Using the Worker Task framework
            1. How to do it...
            2. How it works...
            3. There's more…
            4. See also
        9. 9. Working with Databases
          1. Introduction
          2. Storing data locally with IndexedDB
            1. How to do it...
            2. How it works...
            3. See also
          3. Using Lawndart to write offline web apps
            1. How to do it...
            2. How it works...
            3. See also
          4. Storing data in MySQL
            1. Getting ready
            2. How to do it...
            3. How it works...
            4. There's more...
          5. Storing data in PostgreSQL
            1. Getting ready
            2. How to do it...
            3. How it works...
            4. See also
          6. Storing data in Oracle
            1. Getting ready
            2. How to do it...
            3. How it works...
            4. There's more…
          7. Storing data in MongoDB
            1. Getting ready
            2. How to do it...
            3. How it works...
            4. See also
          8. Storing data in RethinkDB
            1. Getting ready
            2. How to do it...
            3. How it works...
            4. See also
        10. 10. Polymer Dart Recipes
          1. Introduction
          2. Data binding with polymer.dart
            1. How to do it...
            2. How it works...
            3. There's more…
          3. Binding and repeating over a list
            1. How to do it...
            2. How it works...
            3. There's more...
          4. Binding to a map
            1. How to do it...
            2. How it works...
            3. See also
          5. Using custom attributes and template conditionals
            1. How to do it...
            2. How it works...
            3. See also
          6. Binding to an input text field or a text area
            1. How to do it...
            2. How it works...
          7. Binding to a checkbox
            1. How to do it...
            2. How it works...
            3. See also
          8. Binding to radio buttons
            1. How to do it...
            2. How it works...
          9. Binding to a selected field
            1. How to do it...
            2. How it works...
          10. Event handling
            1. How to do it...
            2. How it works...
          11. Polymer elements with JavaScript interop
            1. How to do it...
            2. How it works...
            3. See also
          12. Extending DOM elements
            1. How to do it...
            2. How it works...
          13. Working with custom elements
            1. How to do it...
            2. How it works...
            3. There's more...
          14. Automatic node finding
            1. How to do it...
            2. How it works...
          15. Internationalizing a Polymer app
            1. How to do it...
            2. How it works...
            3. There's more...
        11. 11. Working with Angular Dart
          1. Introduction
          2. Setting up an Angular app
            1. How to do it...
            2. How it works...
            3. There's more...
          3. Using a controller
            1. How to do it...
            2. How it works...
            3. There's more...
          4. Using a component
            1. How to do it...
            2. How it works...
            3. There's more...
            4. See also
          5. Using formatters as filters
            1. How to do it...
            2. How it works...
            3. See also
          6. Creating a view
            1. How to do it...
            2. How it works...
          7. Using a service
            1. How to do it...
            2. How it works...
            3. See also
          8. Deploying your app
            1. How to do it...
            2. How it works...
            3. See also
      9. A. Bibliography
      10. Index

    Product information

    • Title: Dart: Scalable Application Development
    • Author(s): Davy Mitchell, Sergey Akopkokhyants, Ivo Balbaert
    • Release date: June 2017
    • Publisher(s): Packt Publishing
    • ISBN: 9781787288027