[gwt-contrib] Re: When to use Serializbale / IsSerializable
Clever. I don't see any reason that'd be bad... anybody else? On Fri, Nov 21, 2008 at 10:38 AM, dflorey <[EMAIL PROTECTED]> wrote: > > So is it an option to let IsSerializable extend the Serializable > marker interface? > > On 21 Nov., 16:16, John LaBanca <[EMAIL PROTECTED]> wrote: > > That's a good question, and I has to ask around myself. Here is the best > > explanation: > > > > "In early versions of GWT, IsSerializable was the *only* way you could > mark > > a class as serializable by the RPC subsystem. The theory was that Java's > > Serializable interface implied semantics that GWT simply couldn't > implement > > (readObject(), writeObject(), etc), so it was better to be absolutely > clear > > that it wasn't precisely the same as Java Serializable. We were > eventually > > convinced otherwise by many people who had existing POJOs that > implemented > > Serializable and *didn't* require these specialized semantics, and really > > wanted it to work out of the box. So we added support for both." > > > > So based on this, IsSerializable may be deprecated at some point in favor > of > > Serializable. In the meantime, we run into these unfortunate cases where > > you want a class to extent either IsSerializable or Serializable, but > there > > is no way to specify that in Java. > > > > Thanks, > > John LaBanca > > [EMAIL PROTECTED] > > > > On Thu, Nov 20, 2008 at 6:34 AM, dflorey <[EMAIL PROTECTED]> > wrote: > > > > > I don't know if it's the only place where this question comes up, but > > > right now the SerializableResponse from the table model requires its > > > wrapped row values to implement the IsSerializable interface. > > > So every row value object that implement Serializable (and as such can > > > be serialized) cannot be used in SerializableResponse as long as it > > > will not extend the IsSerializable interface. > > > When using Serializable instead the same problem will arise with > > > classes implementing IsSerializable. > > > Any ideas? > > > --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: When to use Serializbale / IsSerializable
So is it an option to let IsSerializable extend the Serializable marker interface? On 21 Nov., 16:16, John LaBanca <[EMAIL PROTECTED]> wrote: > That's a good question, and I has to ask around myself. Here is the best > explanation: > > "In early versions of GWT, IsSerializable was the *only* way you could mark > a class as serializable by the RPC subsystem. The theory was that Java's > Serializable interface implied semantics that GWT simply couldn't implement > (readObject(), writeObject(), etc), so it was better to be absolutely clear > that it wasn't precisely the same as Java Serializable. We were eventually > convinced otherwise by many people who had existing POJOs that implemented > Serializable and *didn't* require these specialized semantics, and really > wanted it to work out of the box. So we added support for both." > > So based on this, IsSerializable may be deprecated at some point in favor of > Serializable. In the meantime, we run into these unfortunate cases where > you want a class to extent either IsSerializable or Serializable, but there > is no way to specify that in Java. > > Thanks, > John LaBanca > [EMAIL PROTECTED] > > On Thu, Nov 20, 2008 at 6:34 AM, dflorey <[EMAIL PROTECTED]> wrote: > > > I don't know if it's the only place where this question comes up, but > > right now the SerializableResponse from the table model requires its > > wrapped row values to implement the IsSerializable interface. > > So every row value object that implement Serializable (and as such can > > be serialized) cannot be used in SerializableResponse as long as it > > will not extend the IsSerializable interface. > > When using Serializable instead the same problem will arise with > > classes implementing IsSerializable. > > Any ideas? --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: When to use Serializbale / IsSerializable
That's a good question, and I has to ask around myself. Here is the best explanation: "In early versions of GWT, IsSerializable was the *only* way you could mark a class as serializable by the RPC subsystem. The theory was that Java's Serializable interface implied semantics that GWT simply couldn't implement (readObject(), writeObject(), etc), so it was better to be absolutely clear that it wasn't precisely the same as Java Serializable. We were eventually convinced otherwise by many people who had existing POJOs that implemented Serializable and *didn't* require these specialized semantics, and really wanted it to work out of the box. So we added support for both." So based on this, IsSerializable may be deprecated at some point in favor of Serializable. In the meantime, we run into these unfortunate cases where you want a class to extent either IsSerializable or Serializable, but there is no way to specify that in Java. Thanks, John LaBanca [EMAIL PROTECTED] On Thu, Nov 20, 2008 at 6:34 AM, dflorey <[EMAIL PROTECTED]> wrote: > > I don't know if it's the only place where this question comes up, but > right now the SerializableResponse from the table model requires its > wrapped row values to implement the IsSerializable interface. > So every row value object that implement Serializable (and as such can > be serialized) cannot be used in SerializableResponse as long as it > will not extend the IsSerializable interface. > When using Serializable instead the same problem will arise with > classes implementing IsSerializable. > Any ideas? > > > --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---