Loading...
Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

How to isolate servlet side code from gwt side

blessed geek
1 decade ago Dec 30, 2009 9:30am
Marko Grönroos
1 decade ago Dec 30, 2009 3:53pm

blessed r geek: So successful, so much so that now I have trouble understanding how to decouple gwt client from the server.

There are routines that I wish to write solely for the server side - but I am unable to because vaadin requires every class that I write be serializable.

No, they don't have to be serializable, unless you want to run them in some cloud environment, such as GAE, which requires that everything is serializable. That serialization, which is actually server-to-server-serialization, has nothing to do with the GWT client-server communications. Also Eclipse likes to be able to serialize the application state to do hot code replacement.

I'm not sure if I understood your problem correctly; I hope you have not misunderstood the serialization in Vaadin.

So, there are two totally different cases of serialization:

  • When you develop entirely new custom components using GWT, which is not a typical use-case for Vaadin, you need to implement serialization of the component state between the server and the client. This is not done using the Serializable interface.
  • When you fulfill the server-side Serializable interface to allow running the application in cloud environments that require server-to-server serialization
blessed geek
1 decade ago Jan 03, 2010 11:20am
Dmitri Livotov
1 decade ago Jan 03, 2010 1:14pm