Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] p2 UI API

Thanks, John.
Yes, I had this same heretical thought a couple weeks ago on a p2 call. But I agree completely that we should not expand the operations API to cover harder cases. I've really adopted "keep the simple things simple" as the mantra for this API, and the challenge is drawing the line. If operations become too complex, then we haven't really won anything.

At what point does a client enter the den of the lower level API? I think that as we release the p2 API, we should really encourage folks doing simple things to move to operations and see if we can find that line (ie, are there simple changes that would let more folks use operations?).

I'll use the bugs to respond to the other issues, thanks for the thorough review...

susan

Inactive hide details for John Arthorne ---11/23/2009 08:17:08 AM---Hi Susan,John Arthorne ---11/23/2009 08:17:08 AM---Hi Susan,



          John Arthorne <John_Arthorne@xxxxxxxxxx>
          Sent by: p2-dev-bounces@xxxxxxxxxxx

          11/23/2009 08:16 AM
          Please respond to P2 developer discussions



To: P2 developer discussions <p2-dev@xxxxxxxxxxx>
cc:
Subject: Re: [p2-dev] p2 UI API



Hi Susan,

I reviewed the operation API this morning and it looks great! In particular I really like the install/uninstall/update operations, since as you noted this vastly simplifies client code for these simple use cases. It even gave me the heretical thought that we could defer turning the complicated IPlanner/IEngine stuff into real API in this release, but I'm not sure this is possible because there are several clients doing some more complicated things. Rather than expanding the operation API to cover all these fringe cases, it's probably best to keep this operation API simple and leave the complex stuff to the lower level API.

I have released some minor fixes directly in the branch, and opened bugs for a couple of other issues, but overall I really like it. I just wanted to send some positive feedback here because if you see the bug reports you only get the negative feedback...

John



Susan Franklin McCourt <susan_franklin@xxxxxxxxxx>
Sent by: p2-dev-bounces@xxxxxxxxxxx

11/19/2009 06:46 PM

Please respond to
P2 developer discussions <p2-dev@xxxxxxxxxxx>
To
P2 developer discussions <p2-dev@xxxxxxxxxxx>
cc
Subject
[p2-dev] p2 UI API




I've finished the javadoc for the API coming out of the p2 UI.
It is released to the R3_6_api_cleanup branch.

The relevant bundles are

org.eclipse.equinox.p2.common (which may or may not continue to live as a separate bundle)
org.eclipse.equinox.p2.operations
org.eclipse.equinox.p2.ui

I'm reasonably happy with the shape of the API, but I've been working with it for a few weeks straight so I've lost all objectivity.
What's interesting to me about the shape is:

- the SDK UI is now a "good citizen" as far as using only API. I wasn't sure we could get there.
- it is still expected that clients will have to use internals if they want to reuse more fine-grained pieces of the UI (ie, the admin UI, PDE reusing some composites, etc.)
- the examples have been able to survive some significant class movement in core. For the most part, examples only need to know now about metadata and core. This is really good news.
- simple stuff is now simple. For example, checking for updates to the currently running profile is done like this:


UpdateOperation op = new UpdateOperation(provisioningSession);
IStatus result = op.resolveModal(monitor);
if (result.isOK()) {
op.getProvisioningJob(monitor).schedule;
}


Contrast that to the code here [1].

I invite anyone interested to review the code in the branch and open a bug with comments (or correct any errors you see...thanks John for spotting some already).

susan

[1]
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.equinox/p2/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/P2Util.java?root=RT_Project&view=markup_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev
_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev

GIF image

GIF image

GIF image


Back to the top