Google I/O 2008 - JavaScript and DOM Programming in GWT

36 884
261.6
Следующее
Популярные
27 дней – 4 4440:15
Run AI locally, with Gemma!
Опубликовано 10 июня 2008, 23:05
Surprisingly Rockin' JavaScript and DOM Programming in GWT
Bruce Johnson (Google)

You may already know about GWT's nifty JavaScript Native Interface (JSNI), which allows you to define native Java methods with handwritten JavaScript. In GWT 1.5, there's an even more powerful way to program close to the metal. You can now model arbitrary JavaScript types directly as Java classes (specifically, as subclasses of GWT's JavaScriptObject class), yet there is no overhead in size or speed. You can code against any JavaScript object as if it were a regular old Java object. So, what does that buy you?

* It's never been easier to integrate with external JS libraries; just define a Java class that models the JS object you want to interact with. Nice Java syntax, no overhead.
* Freely use low-level native JS data structures (JS arrays, for example) by exposing them with a Java-friendly API. You can even apply Java generics to JS types!
* Superimpose strongly-typed Java classes on JSON objects, giving you IDE code completion, refactoring and compile-time type checking.
* GWT uses this new ability to provide a complete cross-browser DOM class hierarchy based on the W3C's Java HTML bindings. Programming straight to the DOM has never been more productive.

Come learn about this unusual and powerful new capability that you can use to squeeze every drop of performance and interop out of your GWT projects.
Случайные видео
03.04.23 – 6 9004:55
AMD Xilinx Video SDK Overview
20.02.17 – 2 348 6915:15
What's inside FARTING Golf Balls?
автотехномузыкадетское