You are previewing Web Programming with Dart.
O'Reilly logo
Web Programming with Dart

Book Description

Web Programming with Dart is for programmers who want to master the new Dart programming language from Google, and also web developers who want to understand how Dart can integrate perfectly with HTML5 and CSS3.

With this book you will understand the ins and outs of the language, how the tools work, and how to get the most from the core functions and libraries. Web Programming with Dart is a practical, example-led book, with case studies involving developing UI animations for the web, working with web services such as JSON, server side Dart applications, and the new Polymer.dart library for advanced HTML UI web components generation.

  • Take a full tour of Dart's core features and its advanced functionality
  • Learn the tools that come with Dart SDK and the most important libraries. Additionally you will work with the newest Polymer.dart library for web component creation.
  • Develop your own command-line and server side applications and, of course, web applications with Dart.
  • Table of Contents

    1. Cover
    2. Title
    3. Copyright
    4. Contents at a Glance
    5. Contents
    6. About the Authors
    7. About the Technical Reviewer
    8. Acknowledgments
    9. Introduction
    10. Chapter 1: Dart’s Flightpath So Far
      1. What is Dart?
      2. Advantages to Using Dart
      3. Dart’s Origins
      4. Converting From Other Programming Languages
        1. Dart Names are Simpler and More Structured
        2. Searching for DOM Elements is Easier
        3. Dart Has Real Data Collections
        4. Constructors to Create New DOM Elements
        5. Dart Improves and Unifies the Events System
        6. Say Goodbye to Vendor Prefixes
        7. Future-Based APIs
        8. Libraries
        9. Cross-Browser Consistency
        10. Cascaded DOM Construction
      5. Why Dart is Perfect for Web Development
      6. Summary
    11. Part I: Getting Started
      1. Chapter 2: Setting up Dart Correctly
        1. Downloading and Installing the Software
          1. Setting Up a Previous Version of Dart Editor
        2. Dart Editor and the Software Development Environment
          1. Opening and Running an Example
        3. Creating Your First Application
          1. Creating a Web Application
          2. Creating Command-Line Applications
        4. Summary
    12. Part II: Dart Tools
      1. Chapter 3: Making the Most of the Dart Editor
        1. The Dart Editor in Detail
        2. Opening Some Examples
        3. Creating Applications
        4. Dart Editor Options and Main Views
          1. Preferences and Views
        5. Running Applications
          1. How Does this Sample Application Run?
          2. Advanced Examples
        6. Debugging Applications
          1. Inspecting the SDK
        7. Summary
      2. Chapter 4: Using Pub and dart2js to Compile Applications to JavaScript
        1. Reviewing the Compliation Process
        2. Pub build
        3. dart2js
        4. Pub Serve
        5. Summary
      3. Chapter 5: Application Launches
        1. Manage Launches
        2. Dart Command-Line Launch
        3. Dartium Launch
        4. Chrome App Launch
        5. Browser Launch
        6. Android Mobile Launch
        7. Summary
      4. Chapter 6: Using the Dart Pub Package Manager
        1. What is Pub?
        2. Digging Deeper
          1. Working With Commands and Packages
        3. Additional Pub Commands
          1. Pub Build
          2. Pub Cache
          3. Pub Deps
          4. Pub Get
          5. Pub Global
          6. Pub Publish
          7. Pub Run
          8. Pub Serve
          9. Pub Upgrade
          10. Pub Uploader
          11. Pub Downgrade
          12. Pub help
          13. Pub version
        4. Summary
      5. Chapter 7: Optimizing for Dart VM and Dartium
        1. Dart Virtual Machine
        2. Dartium
        3. Checked Mode
          1. Summary
      6. Chapter 8: Cleaning up with Dart Formatter
        1. Dart Formatter
        2. Summary
      7. Chapter 9: Generating Dart Code Documentation
        1. docgen
          1. DocGen Options
        2. Summary
      8. Chapter 10: Monitoring Your Applications with Observatory
        1. Observatory
        2. Observatory and Command-Line Applications
        3. Observatory and Web Applications
        4. Summary
    13. Part III: The Dart Language: Basics
      1. Chapter 11: The Dart Comment System
        1. Comments Overview
        2. Inline Comments
        3. Block Comments
          1. Documentation Comments
        4. Markdown
          1. Links
          2. Block Styles
          3. Inline Styles
        5. Summary
      2. Chapter 12: Understanding Operators and Expressions
        1. An Introduction to Dart Operators
          1. Operator Types
          2. Arithmetic
          3. Equality and Relational
          4. Type Test
          5. Assignment
          6. Conditional
          7. Bit
          8. Others
        2. An Introduction to Expressions
          1. Conditional
          2. Logical
          3. Bit
          4. Equality
          5. Relational
          6. Bitwise
          7. Addition
          8. Multiplication
          9. Pre-Expressions and Post-Expressions
          10. Assignment
        3. How to Create Your Own Operators
        4. Summary
      3. Chapter 13: Mastering Dart’s Variables and Data Types
        1. An Introduction to Variables and Data Types
        2. Variables Definition
          1. Types of Variables: Final and Const
        3. Data Types
          1. Numbers
          2. Strings
          3. Lists
          4. Maps
        4. Date and Time
        5. Summary
      4. Chapter 14: Flow Control Statements
        1. If and Else
        2. Switch Statement
        3. For Loop
        4. While Loop
        5. Summary
      5. Chapter 15: Working with Functions
        1. Defining Functions
        2. Positional Optional Parameters
        3. Named Optional Parameters
        4. Default Values
        5. Return Values
        6. Recursive Functions
        7. Summary
      6. Chapter 16: A Syntax Summary and Cheat Sheet
    14. Part IV: The Dart Language: Advanced
      1. Chapter 17: Processing Exceptions and Error Control
        1. Exceptions and Error Control
        2. Exceptions Types
        3. Error Types
        4. Exceptions and Error Definitions
        5. Summary
      2. Chapter 18: Understanding Dart Classes
        1. Instance Variables
        2. Constructors
        3. Methods
          1. Inheritance
          2. Variables and Static Methods
        4. Summary
      3. Chapter 19: Implicit Interfaces and Abstract Classes
        1. Summary
      4. Chapter 20: Implementing Generics and Typedefs
        1. Generics
          1. Typedef
        2. Summary
      5. Chapter 21: Using Dart’s Libraries
        1. Using Libraries
        2. Creating Libraries with Multiple Files
        3. Re-exporting Libraries
        4. Summary
      6. Chapter 22: Leveraging Isolates for Concurrency and Multi-Processing
        1. Summary
      7. Chapter 23: Asynchronous Programming with Dart
        1. What is Asynchronous Programming?
        2. Future
        3. Working with Future
        4. Stream
        5. Working with Stream
        6. Creating Asynchronous Functions
        7. Summary
      8. Chapter 24: An Advanced Syntax Summary
        1. Exceptions and Errors
        2. Classes
    15. Part V: Dart and Other Web Technologies
      1. Chapter 25: Integrating Dart and HTML5
        1. Working with HTML
        2. Event Management
        3. Summary
      2. Chapter 26: Integrating Dart and CSS
        1. Working with CSS
        2. Visual Effects
          1. FadeIn and FadeOut
          2. Flashing Effect
          3. Expand and Collapse Items
        3. Summary
    16. Part VI: Dart and the Web Server
      1. Chapter 27: Combining Web Services with Dart
        1. Asynchronous HTTP Requests with Dart
        2. Using JSON in Dart
        3. Summary
      2. Chapter 28: Dart on the Server Side
        1. The I/O Dart Library
          1. Creating a Server Application
        2. Handling Requests
        3. Working with Processes
        4. Sockets
        5. Summary
    17. Part VII: Dart’s Future
      1. Chapter 29: Implementing Design Patterns and Creating Web Components
        1. Web Components
          1. Polymer.dart
          2. What is the Shadow DOM?
        2. Working with Polymer.dart
        3. Summary
      2. Chapter 30: Developing a Dart App
        1. Designing the Application
        2. Creating the Application
        3. Coding the Application
        4. Summary
    18. Index