Thursday, February 18, 2016

Re: DataGrid/CellTable with several tbody elements - frustation on trying to implement

I don't agree 100% with that, at least not in GWT. The framework should provide a "good enough" default implementation that covers most of the user cases, but not forbid the developer from extending it - I'm not talking about making everything public, but making everything extensible. The developer who is extending it is (or should be) aware he is modified something internal of the framework, that could change or break in future versions.

As I said, in pure Java, making a field or method private doesn't prevent you from calling it outside, by using reflection. So that kind of consideration (making everything as closed as possible) on a framework is annoying but not a show-stopper. You still can extend it when you know what are you doing. In GWT, even if you know what are you doing, and even if what you are trying to do is supported by the specs, you just can't.

And as a side note, since the 2.X version is supposed to not involve anymore after 2.8, maintaining everything as closed as possible because "it could break in the future" doesn't apply anymore.

On Thursday, February 18, 2016 at 5:01:07 PM UTC-2, Jens wrote:

Why GWT is designed that way, so hard to extend? Is that a reflection of a desperate need for contributors to the project, by having to "fork the whole thing"? Or is it to force the developers to use paid frameworks built on top of GWT?
Why package-scoped classes?
Why private fields on classes that are supposed to be extended?

Because it is generally a good practice to start as closed as possible and then open up APIs you feel comfortable with. As a library / toolkit / SDK you can not blindly make everything public because then you can never refactor that API as it would break lots of people who became dependent on these public APIs in the mean time.

But you can always bring up specific cases on the gwt-contrib mailing list so it can be discussed and maybe its fine to open up the API a bit here and there.

-- J.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment