GWT's RPC mechanism uses an "IsSerializable" marker interface for denoting
classes that can be serialized. Many users wish to reuse code with GWT
that they have already written, and that uses the standard java.io.Serializable
marker interface. Since both interfaces are empty marker interfaces, there
is no technical reason why GWT's RPC mechanism could not use the standard
java.io.Serializable. However, there are good reasons to choose not to do
so:
Those are the reasons why the GWT team made the decision to use a separate IsSerializable interface. If you have another argument for or against IsSerializable, let us know in the Discussion Group!
- The semantics of GWT's serialization are much less sophisticated than standard Java serialization, and so to use java.io.Serializable as the marker interface would imply that GWT's serialization system is capable of more than it actually is.
- Conversely, GWT's serialization mechanism is simpler than standard Java's, and so to use java.io.Serializable would imply that users have more to worry about (such as serialization version IDs) than they actually do.
- GWT implements only a subset of the full Java JRE classes, and specifically implements nothing in java.io. To use java.io.Serializable as the GWT RPC serialization marker interface dilutes the message that java.io is not usable within a GWT application.
Those are the reasons why the GWT team made the decision to use a separate IsSerializable interface. If you have another argument for or against IsSerializable, let us know in the Discussion Group!