[TYPESCRIPT][TypeScript Revealed].pdf
(
3661 KB
)
Pobierz
www.ebookee.org
For your convenience Apress has placed some of the front
matter material after the index. Please use the Bookmarks
and Contents at a Glance links to access them.
www.ebookee.org
Contents at a Glance
About the Author �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
xi
About the Technical Reviewer �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
xiii
Acknowledgments �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
xv
Introduction �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
xvii
■
Chapter 1: Getting Up to Speed with TypeScript �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
1
■
Chapter 2: The New Syntax �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
27
■
Chapter 3: Working with TypeScript �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
61
■
Appendix A: Webliography�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
77
Index �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
81
v
www.ebookee.org
Introduction
Anders Hejlsberg has a lot to answer for. Perhaps not as well known as Bjarne Stroustrup
(C++) or Dennis Ritchie (C), he’s responsible for the creation of Turbo Pascal, Delphi,
J++, and C#. And, as the creator of the language that the majority of .NET developers
have been using for the past ten years, it is fair to say that he knows a fair bit about
language design.
October 1, 2012 heralded the start of the journey for another Hejlsberg creation.
TypeScript is a superset of JavaScript that brings to it an additional object-oriented-like
syntax familiar to .NET programmers that compiles down into JavaScript that any browser
can run today. As I write this three weeks since its announcement, it’s interesting to see
how, with hindsight, the loudest reactions have been, “Why do we need this?” or “Not
in my backyard,” and so on—the naysayers getting their dimes’ worth before this Friday,
when Windows 8 is officially launched and they can copy and paste the same reactions
back into their slightly revised pieces about the new touch interface that isn’t called
Metro. Now that the dust has settled, my personal favorite response to all the initial
negativity was simply, “But this is Anders.”
TypeScript is an interesting project, considering the forces that will work at it and the
target at which it is aimed.
•
•
•
•
Its mission statement is “JavaScript for application-scale
development.”
It’s an open source project, so there’s direct input from its users.
It’s a standard in its own right.
It’s a proof of concept for, and therefore will/should react to, parts
of the ECMAScript 6 standard.
It’s inevitably a well-timed boost for the development of Windows 8 applications
using HTML and JavaScript rather than C# and XAML, or a hybrid approach between the
two for lack of JavaScript structure.
How TypeScript is allowed to evolve will be interesting. In the meantime, we have
the initial v0.8.x releases that this book targets. It covers the following:
•
•
•
The language features in TypeScript additional to those in
JavaScript
The tooling and community support for TypeScript development
How TypeScript can be included in ASP.NET, and Windows 8
application development projects
xvii
www.ebookee.org
■
IntroduCtIon
Who Is This Book For?
This book is for .NET and JavaScript developers who want to get a head start
incorporating TypeScript into their applications. I explain the tools and language features
you need to get up to speed quickly and also the current, soon to be ex-limitations of
TypeScript as it makes its way toward a version 1.0 release.
What Do You Need to Know Before You
Read This Book?
You need a good knowledge of an object-oriented language such as C#, ideally from
creating ASP.NET web applications or Windows 8 applications. TypeScript tooling is, in
the main, based on Visual Studio, so a familiarity with that would also be good.
You also need a basic familiarity with JavaScript, but advanced JavaScript skills are
not necessary.
What Software Do You Need for This Book?
Technically, you don’t need anything more than a text editor such as Notepad to write
TypeScript applications. However, to take full advantage of the tooling that exists, you’ll
need a copy of a non-Express version of Visual Studio 2012. If you don’t have access to
that, there is support for Visual Studio 2012 Express for Web and also for Sublime Text 2,
Vim, and eMacs, which are all free downloads.
You’ll learn where to download and how to install TypeScript in Chapter 1.
What Is the Structure of the Book?
This is a primer to get you started on TypeScript. As TypeScript is at such an early stage in
its adoption and development, this book does not aim to be a comprehensive tutorial and
focuses instead on the three key topics that you’ll need to consider in order to determine
whether you’ll want to start using TypeScript now, and if so, how to do it:
•
Chapter 1: Getting Up to Speed with TypeScript
Just exactly what is TypeScript, and how does it fit in to your
projects? In this chapter, you’ll look at the aims of TypeScript,
how it compares to its perceived competition, and what
exactly it does and does not do. You’ll also see how to install
it, what you get, and how to run through creating a simple
TypeScript-based page.
xviii
www.ebookee.org
Plik z chomika:
nimtiz
Inne pliki z tego folderu:
[HTML][HTML5 Canvas. Graphics. Animation and Game Development].pdf
(29804 KB)
[CSS][CSS3 Foundations].pdf
(23466 KB)
[JAVASCRIPT][Professional AngularJS].pdf
(21169 KB)
[HTML][HTML5 Foundations].pdf
(32597 KB)
[JAVASCRIPT][Beginning JavaScript Charts].pdf
(19671 KB)
Inne foldery tego chomika:
Books
Fruity Loops
Prywatne
Virtual Machines
Workout Books
Zgłoś jeśli
naruszono regulamin