I read that for GWT, specifying methods to return a specific implementation, for example:
public ArrayList<String> getList();
instead of the usually preferred "abstract interface", for example:
public List<String> getList();
leads to the fact that GWT generates less compiled javascript file, since the client code (ie, js) does not serve all known implementation of the interface (in this example List, the client code must be able to handle the LinkedList, ArrayList, Vector, and so on), so it can optimize js without compiling unused implementations.
My close questions:
- It's true? (the following questions suggest that this is true)
- Is there an optimization for each class using interfaces, or for each application? i.e
- Do I see an advantage just by rebuilding one class? or
- I see only advantages when all client classes are reorganized not to use interfaces?
source
share