On Sat, Jul 4, 2009 at 12:36 PM, BobV <[email protected]> wrote:

> Thanks for taking a look. I've updated my client.
>
>
> I think the dev/ comments have been subsumed by the latest version of
> the patch at:
>  http://gwt-code-reviews.appspot.com/46801/show
>

Yeah, I think so too.

All other comments fine, but

> Pair: shouldn't there be a common place for this, outside the deRPC server
> > context?
>
> There should be, but I don't really know where it would go.  I would
> have put this in the dev.util.collect package, but that's not bundled
> with gwt-user or gwt-servlet.
>

Point taken, but that's not a great reason.  At the least, that may argue
for creating com.google.gwt.user.util[.collect] or the like, so we could
have a utility place for user code as well as for compiler code?  Or for
bundling com.google.gwt.util.** into both gwt-dev-* and also
gwt-user/gwt-servlet?  (The logical extreme is to create gwt-util.jar as a
requirement of either-or-both; I'm not going that far.

I won't kick and scream about Pair, but it does suggest this is a general
class that may be a larger issue for a more interesting example.



> > RPCServlet.java: Since we need matching e.g. X-GWT-Module-Base strings in
> > multiple places, should we have a shared Constants class for them?
>
> Right now gwt-servlet.jar has all of the client code packed into it.
> If this were to change, the Constants class would cause runtime-only
> breaks.


Sorry, how so?  (Or rather, how so in a way that wouldn't likewise break
today?)

Today, we have multiple copies of the constants, which if changed would have
to separately be found and corrected (search-and-replace, easy, I know... if
you know there are multiple copies.)  With Constants, we'd have one copy,
which would be replicated by the build system into gwt-user.jar, and into
gwt-servlet.jar which is a strict subset of gwt-user.jar.  Server code would
at runtime[1] use the copy from gwt-servlet.jar; hosted or web-compiled code
would use the copy from gwt-user.jar, and web-compiled would bake that value
in... but in terms of changes, that's the same behavior as what we have
today.

[1] Actually, it's not at runtime... javac inlines final constants anyway,
so the server code values are still baked in at (server) compile time.

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to