--
Google UK Limited
Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W 9TQ
Registered in England Number: 3977902
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors
That being said, the Activity interface is currently really nice and
it doesn't tie us down to a single class for inheritance.
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors
I don't know since I don't know what your plans are, will just have to
trust you.
That being said, the Activity interface is currently really nice and
it doesn't tie us down to a single class for inheritance.
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors
I guess I don't understand how you're making it better then. I'm
currently working on Android and I have two problems that I hope won't
be introduced in GWT:
1. The activity class is huge. Anything that doesn't seem to fit
somewhere else either goes in Context or Activity (with Activity
inheriting from Context)
2. Activity isn't Guice friendly because the framework creates
activities for you, we don't get absolute control of the ctors. It's
driving me insane. It's nice we don't have to worry about creating
activities and other system level objects but kind of sucks that we
can't get any kind of support beyond that.
Your argument about keeping the class simple helps reassure #1 won't
come true... for now at least, I'm more worried about the implications
of someone else becoming the steward of such a class. I can only hope
#2 will remain like it is now in GWT and not like Android.
> Were you unable to use the abstract class? If the Activity interface were
> documented to encourage you to do so, would you have? When we break your
> app, will you be okay with that?
The abstract class didn't provide anything useful so multiple abstract
base classes were made. In all, I have list, detail and edit abstract
base activities and each define a view interface. Each of those
scenarios provided a better, more suitably precise implementation than
what's already in AbstractActivity. So even if you add breaking
changes to Activity here, and I'm assuming by changes, you mean new
methods with a default implementation, otherwise an abstract class
wouldn't do much better, I have at most 3 classes to fix. All other
activities are rooted in one of those 3 and are pretty light.
But again, I wanted to voice my concern, not really trying to change
the tide. I don't really mind Activity becoming a class under the
conditions you mentioned. At first, I was just a little bit worried
of getting something that, sooner or later, would match the stature of
android's activity class.
I don't want to speak for anybody else but not to me no. What
AbstractActivity provides is so little that it's either sufficient or
not. In my case, it's not. Introducing IsActivity doesn't make it
any more useful to me. For list and edit, you can edit, so we need to
take charge of all the Activity entry point in order to provide the
user with a message about discarding changes. For details, it's fine,
but it hasn't really saved us much now has it?
I'm just surprised that you would want to make it an abstract class.
If we were to re-live the gwt 2.1.0 development cycle, I would have to
say that the activity package of classes was one of the most volatile
out there. Why? Because making an activity that is both useful and
generic for everyone out there is extremely hard and complex.
AbstractActivity is certainly generic enough for everyone but how
useful is it in its current implementation? If you want to improve on
that, great, but how much experimentation would be involved in such a
process? I'm just saying that anything added to an abstract Activity
that works for all GWT users/applications would have to be out of this
world crazy good or be benign like it currently is.
That being said, I don't know what new additions you're planning.
Basically we don't know exactly how we want to change the thing, but have a feeling something will be needed. Re: composition or delegation, it always happens, but I'm not sure that's a concrete issue yet. We could introduce an IsActivity interface, but I don't see anywhere in the current GWT code we would actually call it. People implement their own ActivityMappers by hand, so they could use that convention themselves.Sounds like there aren't super strong feelings on this, so today for 2.1.1 I'm inclined to
- drop the interface
- rename AbstractActivity to Activity
- document as being forbidden from developing any non-trivial behavior
- and perhaps document the intent to retroactively introduce an interface when it's had a chance to settle
Last passionate objections?
public void __do_not_implement_this_interface_extend_FooImpl_instead();
I'm far from convinced I like it, but it sure is right in your face in
case you don't read javadocs! ;)
Philippe
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors
Nnnnnnnnevermind. I think it's too late for me to make this not-terribly-popular change. It's already more widely adopted than I realized internally, so I have to assume that's even more true externally. I can't imagine such a break being well received.
I think it's for the best.
> (Yes, we're making more significant changes to RequestFactory in 2.1.1, but
> I suspect that has a lower adoption rate so far, and client side the impact
> is actually fairly minimal, except for the dropped UserInfo stuff.)
That and RequestFactory on the server is still pretty hellish effort wise.
Just ran into an interesting little hack today. Basically, the interface includes a method:
public void __do_not_implement_this_interface_extend_FooImpl_instead();
I'm far from convinced I like it, but it sure is right in your face in case you don't read javadocs! ;)
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors