On 2012/01/04 19:52:29, jat wrote:
I have only glanced over the files, but I have a general comment. If
possible,
it would be nice if shared code could operate on typed arrays. That
would mean
defining most things in interfaces in shared, and then in the places
that need
it using super-source to provide the pure Java implementations
(probably using
ByteBuffers). You would probably have to move the creation out to a
factory
class, which would also give the possibility of an emulation for
browsers that
don't support typed arrays as well.
What do you think?
I think extracting interfaces and place them in shared won't be the problem. I'll do that for the next patch set. I have some questions about that: - Where is the best place to implement the factory methods? In a nested factory in the interfaces? One big factory class with "createXXX" methods? - Is it possible to place the native code to create the instances used by the factory in the shared package? Is that working in the Java only part? Is it necessary to place this stuff to the client and call it from shared if(GWT.isClient()). Then the methods in client must be public, right? - Shouldn't we move the isSupported() stuff to shared too and return false if called on the server side? - What to do if somebody calls the factory from server side, as we currently have no emulated implementation? Throw an UnsupportedOperationException? http://gwt-code-reviews.appspot.com/1621803/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
