Difference between GWT.create(SomeClass.class) and new SomeClass()
2012-02-29 18:07
435 查看
GWT.createis used by the GWT compiler for deferred binding. Deferred binding is a feature of the GWT compiler that works by generating many versions of code at compile time, only one of which needs to be loaded by a particular client during
bootstrapping at runtime. if the implementation doesn't change for different locale/browsers, use new, if there will be multiple implementations use create.
Coding Basics - Deferred Binding
Deferred binding is a feature of the GWT compiler that works by generating many versions of code at compile time, only one of which needs to be loaded by a particular clientduring bootstrapping at runtime. Each version is generated on a per browser basis,along with any other axis that your application defines or uses. For example, if you were tointernationalize your application using
GWT's Internationalization module, the GWT compiler would generatevarious versions of your application per browser environment, such as "Firefox in English", "Firefox in French", "Internet Explorer in English", etc... As a result, the deployedJavaScript
code is compact and quicker to download than hand coded JavaScript, containing only the code and resources it needs for a particular browser environment.
相关文章推荐
- Difference between new (delete) and malloc (free)
- Some major differences between C and Java
- What are the differences between struct and class in C++?
- What is the difference between Class Path and Build Path
- What is the difference between new and malloc()?
- difference between "create group for any added .." and "create folder references ..."
- The difference between NoClassDefFoundError and ClassNotFoundException
- Difference Between Class.forName() and ClassLoader.loadClass()
- 【转载】#445 - Differences Between an Interface and an Abstract Class
- What is difference between abstract class and interface
- difference between abstract class and interface
- iPhone SDK difference between isKindOfClass and isMemberOfClass
- What is the difference between NoClassDefFoundError and ClassNotFoundException?
- difference between Abstract class and interface in java
- LINQ and some difference between XDocument and XElement
- Difference between new and [[alloc]init] in iOS
- The Difference of Class.forName()、Class.forName().newInstance() and New in Java
- Summary: Arrays vs. Collections && The differences between Collection Interface and Collections Class
- .NET Basics:difference between new and override in inherite
- Difference between NoClassDefFoundError and ClassNotFoundException