EXT-GWT Question:
Explain what is the purpose of the IsSerializable interface in GWT?
Answer:
A user-defined class is serializable if all of the following apply:
It is assignable to IsSerializable or Serializable, either because it directly implements one of these interfaces or because it derives from a superclass that does
All non-final, non-transient instance fields are themselves serializable, and
As of GWT 1.5, it must have a default (zero argument) constructor (with any access modifier) or no constructor at all.
One key difference though is that , for security reasons, all Serializable classes must be included in a serialization policy, which is generated at compile time, while IsSerializable classes do not have that requirement.
If your interest is purely in GWT, and you don\'t e.g. share your model classes between the web application and another application, I suggest you have your model classes/DTOs implement IsSerializable.
It is assignable to IsSerializable or Serializable, either because it directly implements one of these interfaces or because it derives from a superclass that does
All non-final, non-transient instance fields are themselves serializable, and
As of GWT 1.5, it must have a default (zero argument) constructor (with any access modifier) or no constructor at all.
One key difference though is that , for security reasons, all Serializable classes must be included in a serialization policy, which is generated at compile time, while IsSerializable classes do not have that requirement.
If your interest is purely in GWT, and you don\'t e.g. share your model classes between the web application and another application, I suggest you have your model classes/DTOs implement IsSerializable.
Previous Question | Next Question |
Do you know how to use RequestBuilder? | Explain how GWT Navigation works? |