万本电子书0元读

万本电子书0元读

顶部广告

Dart By Example电子书

售       价:¥

13人正在读 | 0人评论 9.8

作       者:Davy Mitchell

出  版  社:Packt Publishing

出版时间:2015-09-25

字       数:181.5万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Design and develop modern web applications with Google's bold and productive language through engaging example projects About This Book Full of engaging and varied example projects to equip you to build your own web applications Learn the Dart language and key libraries Productively create fast and reliable web applications Who This Book Is For If you are a front- or back-end web developer who is looking to build complex full-featured web applications without the quagmire of disconnected JavaScript frameworks, this book is a practical walkthrough of substantial applications that will have you and your team coding Dart in a productive manner. This book will give you a compiled, optional typed, scalable environment to rapidly develop applications. As Dart was designed to be familiar, any developer with even a small amount of knowledge of JavaScript or another programming language will be at home with the language immediately and will be coding quickly. What You Will Learn 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 Run and debug the Dart server and web applications and compile them in JavaScript Handle form data and encryption Build and deploy server applications on the major OSes and implement the REST API 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 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. This book 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. With example code projects such as a live data monitoring and viewing system, a blogging system, a slides presentation application, and more, then this book will walk you through step by step through building data-driven web applications with ease and speed. Style and approach A varied collection of compelling practical Dart projects that are developed progressively with full explanations of concepts and implementation. Each project introduces features of the language and environment, demonstrating how Dart can be used in rich structured web applications.
目录展开

Dart By Example

Table of Contents

Dart By Example

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

Errata

Piracy

Questions

1. Starting the Text Editor

Defining Dart

History of Web scripting

The origins of Dart

Downloading the tools

Introducing the WebStorm IDE

Alternative development environments

Help starting a project

Elsewhere in the SDK

Building your first application

Exploring the Web project structure

Unwrapping packages

A look at Pubspec

Putting Dart into the web page

Importing packages

Variable declarations

Writing the event handler

Loading the saved text

Saving the text

Running in the browser

Editing and reloading

Extending the interface

Using the CSS editor

Debugging a Dart application

Working in harmony with JavaScript

Commenting in the code

Summary

2. Advancing the Editor

The next steps for the text editor

Starting point

Dart classes

Structuring the project

Building the dialog package

The package project structure

Adding a local package reference

Understanding the package scope

Defining the base dialog box

The alert dialog box

The About dialog box

Using the confirmation dialog box

Counting words using a list

The Word Frequency feature

Understanding the typing of Dart code

The file download feature

The clock feature

Executing Dart code

Multi-processing the VM

The class designer

Building a more complicated dialog

Constructing the class

Understanding the flow of events

Launching the application

The command-line app for source code statistics

The command-line project structure

Processing the source code

File handling with the dart:io package

Debugging the command-line program

Integrating the statistics

HTML5 and the canvas

Drawing the pie chart

Building web interfaces with Dart

Compiling to JavaScript

Minification of JavaScript output

Summary

3. Slideshow Presentations

Building a presentation application

Laying out the application

Defining the presentation format

Parsing the presentation

A sample presentation

Presenter project structures

Launching the application

Building bullet point slides

Accessing private fields

Using true getters and setters

Mixin' it up

Defining the core classes

Transforming data into HTML

Editing the presentation

Displaying the current slide

Navigating the presentation

Handling the button key presses

Using the Function type

Staying within the bounds

Using the slider control

Responding to keyboard events

Showing the key help

Listening twice to event streams

Changing the colors

Adding a date

Timing the presentation

Introducing the Stopwatch class

Implementing the presentation timer

An overview of slides

Handout notes

Comparing optional positional and named parameters

Summary

4. Language, Motion, and Sound

Going fullscreen

Request fullscreen

Updating the interface for fullscreen

Updating keyboard controls for fullscreen

Adding mouse controls

Adding metadata

Creating a custom annotation

Translating the user interface text

Exploring the intl package

Locating strings to translate

Extracting the strings

Running commands with Dart pub

Obtaining translations

Integrating the translations text

Changing the language of the user interface

Adding a language combo box

Working with dates

Formatting for the locale

Animating slides

Using a timer

Playing sound in the browser

Producing sound effects

Creating sound files

Loading sounds

Playing back sounds

Summary

5. A Blog Server

The Hello World server example

A blog server

Introducing the HTTP protocol

Starting up the server

Storing the blog posts format

Reading text files

Reading a folder of files

Request handling

Serving text

Robots.txt

Rendering a single blog post

Rendering the index page

Serving images

Locating the file

Serving a single image file

Serving a 404 error

Introducing Dart's server frameworks

Redstone

Rikulo

Shelf

Deployment

Dependencies

Deploying on Unix

Using the screen command

Launching a screen

Deploying on Windows

Using the NSSM tool

Using a Microsoft solution

Load testing

Building a simple load tool

Summary

6. Blog Server Advanced

Logging

Writing text files

Extracting request information

A blog editor

Password protection

Encryption

Handling more complex forms

Processing the form

Saving data to a disk

Serving a default graphic

Refreshing the blog

Caching

Watching the filesystem

XML feed generation

Serving the RSS

The JSON feed generation

Serving the JSON

Consuming the JSON feed

Static generation

Freezing the website

Introducing the await and async keywords

Joining file paths

Creating an output folder

Generating the front page

Writing the static version

Load testing revisited

Updating the load tester

Summary

7. Live Data Collection

Kicking off the earthquake monitoring system

Introducing the data source

Exploring the GeoJSON format

Fetching and recording the data

Logging

A simple example of logging

Data monitor logging

Saving to the database

Installing a database system

Using PostgreSQL from Dart

Introducing the pgAdmin GUI

Creating the database and login

Defining the table

Inserting data

Running the program

Maintaining a database

Managing command line arguments

Retrieving data

Deleting data

Observing the Dart VM internals

Unit testing

Running unit tests

Writing unit tests for the data monitor

Grouping tests together

Examining the test results

Summary

8. Live Data and a Web Service

Freeing the data

Reworking the data collector

Adding a new data table

Filtering the data

Converting the feature to JSON

Improving the data maintenance

Storing the single feature

Running the data application

Creating the web service

Using the package rpc

Initiating the API server

Exposing methods

Error handling of incorrect requests

Serving the latest information

Supplying the data

Discovering the API

Running the web service

Recapping the system so far

Consuming application

Packaging the grid

Initiating the real-time updates

Performing the update

Fetching the JSON

Configuring the grid view control

Formatting the time

Working with date and time

Building the table

Showing the page

Summary

9. A Real-Time Visualization

Iteration overview

Application overview

Drawing the map image

Plotting on the map

Animating the display

Fetching the data

Updating the map indicators

Mouse over popups

Zooming into the display

Notifying the user of an update

Plotting the user's location

Sorting the feature list

Documenting Dart code with dartdoc

Summary

10. Reports and an API

Recapping the earthquake system

Advancing the REST API

Passing parameters to the API

Posting on the API

Connecting to an API client

Varying the data

Returning to the map

Reporting on the data

The ReportSite project

Report classes

Creating a printable report

Charting the data

Exporting to CSV

Summary

Index

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部