由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - Microsoft augments JavaScript for large-scale development
相关主题
October Headline: Dart enters the top 20 for the first time (转载)Re: Why are all java IDEs written in jav
有必要弄深入javascript和python么?做java的eclipse 气死我了!
Who can recommend me a JavaScript IDEComplaint about Java class package
请问哪里有FREE JavaScript IDE?JavaBean variable name standard
最近迷上了javascriptJAVA IDE ?
各位Java Developer是不是都是Oracle、liunx、JavaScript等大牛?Oracle Tries to Pull Apache Back to Java Group
急请教:程序从Eclipse 的 Workspaces拷到别处不工作了全球码农向CCTV春晚宣战?
any tools for ...疯狂除夕夜,编程抢红包!
相关话题的讨论汇总
话题: javascript话题: typescript话题: microsoft话题: hejlsberg话题: developers
进入Java版参与讨论
1 (共1页)
r********r
发帖数: 208
1
http://www.infoworld.com/print/203737
Microsoft augments JavaScript for large-scale development
By IDG News Service staff
Created 2012-10-01 01:53PM
Equipping JavaScript to build more complex applications, Microsoft has
augmented JavaScript with a set of advanced development capabilities
typically found in more mature programming languages, such as C++ and Java.
These new capabilities, packaged as a JavaScript superset called TypeScript,
offers static typing, classes and modularization.
"Over the last five years we've increasingly heard from customers that
writing application-scale JavaScript is just too hard," said Anders
Hejlsberg, Microsoft chief architect for Microsoft's C# language. TypeScript
should pave the way for new ways to aid JavaScript code development,
providing the basis for code prediction, superior debugging, refactoring and
easier navigation through the thickets of large sets of program code, he
said.
[ How much do you know about this stalwart developer tool? Find out in
InfoWorld's JavaScript IQ test [1]. | Learn how to work smarter, not harder
with InfoWorld's roundup of all the tips and trends programmers need to know
in the Developers' Survival Guide [2]. Download the PDF today! | Keep up
with the latest developer news with InfoWorld's Developer World newsletter [
3]. ]
Overall, Microsoft engineers spent over two years developing this
functionality, Hejlsberg said. The company released the specification of
TypeScript, as well as an open source compiler on the CodePlex repository [4
]. The company also developed a TypeScript plug-in for Visual Studio.
TypeScript is not an entirely new language, but rather a superset of
JavaScript, Hejlsberg said. Developers code in JavaScript, using the
TypeScript parts as needed. They then run the code through the TypeScript
compiler, which emits standard JavaScript.
"All JavaScript code is TypeScript code and all JavaScript libraries just
work with TypeScript," said Hejlsberg. "TypeScript compiler emits idiomatic
JavaScript. The resulting code runs on any browser."
TypeScript was designed to accommodate an increasing number of developers
who are interested in using JavaScript to build large-scale Web applications
to run in a browser, rather than on the desktop.
"JavaScript was created as a scripting language. It [wasn't designed] to
structure medium- to large-scale code bases such as classes or modules,
Hejlsberg said. "JavaScript is an entirely dynamic language that has no
static typing, and static typing is really the thing that powers today's
rich IDEs."
Static typing requires that developers assign a specific data type to each
variable they create. JavaScript itself is a dynamically typed language, in
which variables do not have to be assigned a data type beforehand,
simplifying coding for the less experienced.
With static typing, however, the compiler can provide more detailed reports
on coding errors, as well better predict what the program might need,
because it can determine the type of data a variable should be assigned. In
Visual Studio, for instance, TypeScript will allow IntelliSense to
anticipate what coders need when writing JavaScript, to a similar degree
that IntelliSense does now with C# and other statically typed languages.
TypeScript's type annotation is flexible as well. Developers can add type
annotations only where they want it, to their own code, or to specific
libraries.
In addition to static typing, TypeScript also offers modularity and the
ability to do class declarations, both following the specifications now
being settled on by the developers of the next version of ECMAScript, the
standard reference upon which JavaScript is based.
Classes will allow developers to reuse existing functionality in the program
. Modularity can help them organize large codebases, as well as make it easy
to swap in updates to one part of the code with little impact to other
parts of the program.
Microsoft is not the first company to tackle the problem of making
JavaScript more robust. Google has also confronted the shortcomings of
JavaScript for complex application development, most notably by developing a
new language to handle more complex Web applications, called Dart [5].
TypeScript could be advantageous over Dart in that it does not require
developers to learn an entirely new language. Rather they can continue to
use JavaScript and just learn the specific rules around the TypeScript
language, Hejlsberg said.
Another potential advantage to TypeScript is that no new technology is
needed on browsers, given that the finished TypeScript code is compiled into
regular JavaScript, which then can be run on any browser. TypeScript
carries no additional performance lag on runtime, due to the fact that the
TypeScript additions "compile away," said Hejlsberg.
The TypeScript specification is available, at no cost, under the Open Web
Foundation OWFa 1.0 Specification Agreement, and Microsoft is seeking
community consultation for further development. The compiler is licensed
under the Apache 2.0 license.
Joab Jackson covers enterprise software and general technology breaking news
for The IDG News Service. Follow Joab on Twitter at @Joab_Jackson [6]. Joab
's e-mail address is J**********[email protected] [7]
1 (共1页)
进入Java版参与讨论
相关主题
疯狂除夕夜,编程抢红包!最近迷上了javascript
请教:使用javascript制作online database的方法各位Java Developer是不是都是Oracle、liunx、JavaScript等大牛?
Re: 怎样才支持JDBC2.0?急请教:程序从Eclipse 的 Workspaces拷到别处不工作了
Re: JDBC, Java vs. Javascriptany tools for ...
October Headline: Dart enters the top 20 for the first time (转载)Re: Why are all java IDEs written in jav
有必要弄深入javascript和python么?做java的eclipse 气死我了!
Who can recommend me a JavaScript IDEComplaint about Java class package
请问哪里有FREE JavaScript IDE?JavaBean variable name standard
相关话题的讨论汇总
话题: javascript话题: typescript话题: microsoft话题: hejlsberg话题: developers