Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 196511

Summary: Feedback on API so far
Product: z_Archived Reporter: Alex Blewitt <alex.blewitt>
Component: MylynAssignee: Mik Kersten <mik.kersten>
Status: RESOLVED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P4 CC: shawn.minto, steffen.pingel
Version: unspecified   
Target Milestone: 3.0   
Hardware: All   
OS: All   
Whiteboard:

Description Alex Blewitt CLA 2007-07-13 17:47:26 EDT
There's a lot of reliance on URLs in the current API set that needs implementing. This seems more to do with how it evolved rather than any particular benefit. It would be much nicer if there was a way of representing relationships between Tasks and Repositories; and a lot easier to implement new connectors.

For example, not all bug tracking systems have a web-based interface, or use 'urls' at all. However, one might have an API to query and get a set of results back, or indeed to navigate parent/child relationships (e.g. records in a database). Having methods like 'getUrlFromTaskUrl' don't really have any concept here, whereas (e.g.) TaskRepository.getTask(id): Task would be trivial to implement.

Navigation the other way (e.g. getUrl(repository,taskid) is just as difficult when dealing with the abstract identifiers. On theother and, representing such parent/child links (and their navigation) is easy. If you really needed a unique identifier for each item, you could have Task.getId() or Repository.getId(), but it needn't be the primary form of navigation.

It's also not clear what the purpose of URLs are if there's no web-based interface to it, and thus won't be openable by the system.

Lastly, some URLs (e.g. bugzilla, sourceforge) don't have the mapping stored in the URL anyway. So if you wanted to get the task container URL from the task, it's going to involve a server trip or cache to the object relationship to derive the result, when chances are the caller will then go back and hit getObjectFor(url)

I'm mostly throwing this in for feedback if you decide to revisit the API for Mylyn 3.0, and not something that I appreciate is going to change any time soon.
Comment 1 Mik Kersten CLA 2007-10-11 20:14:58 EDT
Will review for 3.0 API changes.
Comment 2 Mik Kersten CLA 2008-05-13 13:36:14 EDT
Steffen: please read through this since the input is relevant to the API revisions that we're making.  Since we now have connectors repositories that are not web based (e.g. Microsoft Outlook) we should make sure that the API and/or Javadoc makes the fact that this is supported obvious enough.

*** This bug has been marked as a duplicate of bug 227660 ***