Book Image

Dart By Example

By : David Mitchell
Book Image

Dart By Example

By: David Mitchell

Overview of this book

Table of Contents (17 chapters)
Dart By Example
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

History of Web scripting


The high sophistication of current web pages with animations, dynamic content, fades, 3D effects, responsive designs, and clever navigation make it easy to forget that the early web was mostly textual pages, dumb forms, and images that often took a while to load. Then, along came JavaScript, in the form of a script interpreter built into the browser, providing form data validation, news ticker moving displays, animation, and games. For small projects, it succeeded in spicing up static websites without requiring server-side CGI scripts.

Developers enjoyed the near instant edit and refresh cycle—changing a line of code and hitting F5 (refresh) in the browser to see the result. JavaScript did not stay in the browser and was soon found on the server side of web applications. It also became a general purpose script for use outside the browser.

Note

Fun fact: JavaScript was written in just ten days by Brendan Eich for the Netscape browser and was originally called LiveScript. Dart has been renamed too—originally, it was called Dash.

Considering the timescale it was written under, JavaScript is a great technical achievement, but in 20 years it has not advanced very much, while web applications have rapidly progressed. Web applications can contain thousands of lines of JavaScript code. Outside of very simple pages, plain JavaScript is not enough anymore, as evidenced by the number of tools and libraries that have sprung up to assist development.

Many of these solutions are created to fix problems with JavaScript, ranging from syntax and features to design and productivity. The language simply was not designed for the type of web application that the modern web requires.

Recent advances in JavaScript engines have produced great leaps forward in performance. The V8 engine that powers the Chrome browser and Node.js has shown great improvement in making new kinds of applications viable. However, the returns from JavaScript virtual machine optimizations have been diminishing over time.