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

Bug 345601

Summary: [client] Review symbolic service names
Product: [ECD] Orion Reporter: Simon Kaegi <simon_kaegi>
Component: ClientAssignee: John Arthorne <john.arthorne>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: bokowski, mamacdon, susan
Version: 0.2   
Target Milestone: 0.2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Simon Kaegi CLA 2011-05-12 09:50:19 EDT
At the moment we have a mixture of "I" names and simple names for our services. This is not going to cut it in the long haul and we should review the names at some point soon-ish.
Comment 1 Boris Bokowski CLA 2011-05-12 09:58:10 EDT
I would prefer us using simple names, not something that starts with the letter "I".
Comment 2 Mark Macdonald CLA 2011-05-12 14:33:18 EDT
By "simple names" are we ruling out some kind of hierarchical naming convention for services?
Comment 3 John Arthorne CLA 2011-05-12 14:52:40 EDT
I think it has to be hierarchical. Otherwise as Orion itself and the ecosystem grows it would become unmanageable. Something like:

orion.core.* for basic Eclipse Application Services
orion.git.* for git services
orion.sites.* for site management services
orion.editor.* for editor related services
Comment 4 John Arthorne CLA 2011-05-20 14:56:51 EDT
Here are the current service names that I could find:

This first set of services are effectively "extension points". The caller will process all available implementations to somehow customize/augment the page behaviour:

editorAction
IFileService
IContentAssistService
ISyntaxHighlight
fileCommands
openWith
primaryNavigation
landingTasks

These are currently treated as singleton services. Callers assume there can only be one in a given system. Some of these are really extension points but we assume a single extension:

testRunner
IGitService
IProblemProvider
Selection
ICommandService
IPreferenceService
IFavorites
IDialogService
IStatusReporter
ISshService
IUsersService
IOutlineProvider
IEditorSyntaxChecker

We recently talked about a two-level convention for everything (orion.someService). However after reviewing how many names we already have, I really like the idea of being able to group together related services and avoid a single "melting pot" of services.I think in the long term two-level names would break down and become confusing for consumers ("which of these 300 services involves customizing the editor??"). Anyway, there is an initial suggestion:

All services are three levels: orion.category.someService. If a service is mostly used on a specific page, then the "category" would be the name of the page. There are a couple of extra categories for cross-cutting services. I have avoided junk terms like "service", "provider", etc. I have made all names singular to avoid falling into the trap of assuming some services as defacto-singletons while others potentially have multiple implementations.

Services that have no specific relation to user interface elements:

IFileService -> orion.core.file
IPreferenceService -> orion.core.preference
IUsersService -> orion.core.user
IProblemProvider -> orion.core.marker

Services related to editing and the editor:

editorAction -> orion.edit.command
IContentAssistService -> orion.edit.contentAssist
ISyntaxHighlight -> orion.edit.highlighter
IOutlineProvider -> orion.edit.outline
IEditorSyntaxChecker -> orion.edit.validator

Services related to navigation and the navigate page:

fileCommands -> orion.navigate.command
openWith -> orion.navigate.openWith
landingTasks -> orion.navigate.landingTask
IFavorites -> orion.navigate.favorite
primaryNavigation -> orion.navigate.link

General "ui" services that would be used by any page:

Selection -> orion.page.selection
ICommandService -> orion.page.command
IDialogService -> orion.page.dialog
IStatusReporter -> orion.page.message

Miscellaneous:

testRunner -> orion.test.runner
IGitService -> orion.git.provider
ISshService -> orion.team.ssh
Comment 5 Boris Bokowski CLA 2011-05-20 15:19:44 EDT
Excellent. Thanks, John. I like it!
Comment 6 Simon Kaegi CLA 2011-05-20 15:44:36 EDT
Yep agree. These look good -- even the camelCase. Go for it.
Comment 7 Susan McCourt CLA 2011-05-23 12:41:47 EDT
Great!

I like it, but...

I don't see the general issue of "navigating through Orion" as being related to the thing we call the "navigator page."  I'd like the orion.navigate.* namespace to be similar to orion.edit.* namespace, more page-specific.  In my mind, the general issue of navigation is really more general (orion.core.*, orion.page.*) and the stuff for the file navigator should be grouped separately.  That would mean:

primaryNavigation -> orion.page.link  
IFavorites -> orion.core.favorite  (the favorites service is really just a specialized form of preferences and doesn't have a UI.  We also have a favorites UI component but that is not what IFavorites refers to)
landingTasks -> orion.welcome.tasks  (the landing page isn't really just a navigation thing.  It feels "misc" to me, and I could see us extending it in other ways.  Using "welcome" since we've used that in eclipse)
Comment 8 John Arthorne CLA 2011-05-24 08:39:36 EDT
Thanks for the feedback Susan. I tried at first to make it consistently orion.<page>.<service>, but ran into trouble when I hit several services that cut across all pages (primaryNavigation, favorites, etc). Your revisions make sense. Instead of orion.welcome.task I have changed it to orion.help.task. I can see "help" having a cluster of related services once we get into context-sensitive help, cheat sheets, etc.

So the new list is:

Services that have no specific relation to user interface elements:

IFileService -> orion.core.file
IPreferenceService -> orion.core.preference
IUsersService -> orion.core.user
IProblemProvider -> orion.core.marker
IFavorites -> orion.core.favorite

Services related to editing and the editor:

editorAction -> orion.edit.command
IContentAssistService -> orion.edit.contentAssist
ISyntaxHighlight -> orion.edit.highlighter
IOutlineProvider -> orion.edit.outline
IEditorSyntaxChecker -> orion.edit.validator

Services related to the navigate page:

fileCommands -> orion.navigate.command
openWith -> orion.navigate.openWith

General "ui" services that would be used by any page:

Selection -> orion.page.selection
ICommandService -> orion.page.command
IDialogService -> orion.page.dialog
IStatusReporter -> orion.page.message
primaryNavigation -> orion.page.link

Miscellaneous:

testRunner -> orion.test.runner
IGitService -> orion.git.provider
ISshService -> orion.team.ssh
landingTasks -> orion.help.task
Comment 9 Susan McCourt CLA 2011-05-24 11:31:30 EDT
(In reply to comment #8)
> So the new list is:

+1
Comment 10 John Arthorne CLA 2011-05-24 17:44:52 EDT
Small update:

After reviewing the code, orion.team.ssh didn't feel right. There is nothing inherently "team" about doing SSH communication. I changed this to:

ISshService -> orion.net.ssh
Comment 11 John Arthorne CLA 2011-05-24 17:57:08 EDT
I have pushed all the renaming changes. I am leaving this open for now until the list of services is documented somewhere.
Comment 12 Susan McCourt CLA 2011-05-24 20:23:20 EDT
(In reply to comment #11)
> I have pushed all the renaming changes. I am leaving this open for now until
> the list of services is documented somewhere.

Are you sure you pushed this?  I don't see the changes.
Here's my guess:
- you had to go to Eclipse to do the global search/replace
- so you changed some local git repo
- maybe not the one you pushed from Orion?
Comment 14 John Arthorne CLA 2011-05-25 09:20:01 EDT
By the way, renaming the service called "Selection" was a massive pain - there were hundreds of search results. I've done some basic testing but still fear I could have broken something. Most of the others were relatively easy search/replace.
Comment 15 Simon Kaegi CLA 2011-05-25 09:28:15 EDT
All good now. Thanks John.
Comment 16 Susan McCourt CLA 2011-05-25 11:20:09 EDT
I'll make sure to touch the selection scenarios today.
Comment 17 John Arthorne CLA 2011-06-04 14:33:59 EDT
This was done.