osgi / bugzilla-archive

Archive of OSGi Alliance Specification Bugzilla bugs. The Specification Bugzilla system was decommissioned with the move to GitHub. The issues in this repository are imported from the Specification Bugzilla system for archival purposes.
0 stars 1 forks source link

[rfc 243] Naming of ConnectFrameworkFactory vs ConnectFramework #3009

Closed bjhargrave closed 4 years ago

bjhargrave commented 4 years ago

Original bug ID: BZ#3142 From: @cziegeler Reported version: R8

bjhargrave commented 4 years ago

Comment author: @cziegeler

I think the naming of ConnectFrameworkFactory and ConnectFramework is a little bit confusing. ConnectFrameworkFactory is not creating a ConnectFramework - ConnectFramework is rather input to the factory.

I think ConnectFrameworkFactory as a name is fine, maybe ConnectAwareFrameworkFactory would be slightly better.

But I suggest to rename ConnectFramework to something else to avoid the naming confusing mentioned above. As a none native speaker ConnectEnvironment is the first option that comes to my mind.

bjhargrave commented 4 years ago

Comment author: @tjwatson

I agree, and it becomes difficult when reading the specification to even differentiate THE Framework from the connect framework.

My vote is to change the ConnectFramework name. I suggest changing it to Connector:

org.osgi.framework.connect.Connector

A Connector connects a bundle location with a ConnectModule or Connection (bug BZ#3141)

So you would have the following:

public interface Connector { Connector initialize(File storage, Map<String,String> configuration);

Optional<Connection> connect(String location) throws BundleException;

Optional<BundleActivator> createBundleActivator();

}

bjhargrave commented 4 years ago

Comment author: Richard Hall <heavy@ungoverned.org>

Not that it really matters, but I think pushing down the "Connect" name here is what is causing the confusion.

OSGi Connect and pojoSR came about when this was focused more on being a service registry without the module layer and we were going to "connect" components via services. The new approach is very much like my virtual bundle approach, which was a way of making non-bundle things look like bundles.

To me, it seems like it would make more sense to call ConnectFramework something like ConnectModuleFactory, which is a way to get a ConnectModule.

bjhargrave commented 4 years ago

Comment author: @tjwatson

(In reply to Richard Hall from comment BZ#2)

Not that it really matters, but I think pushing down the "Connect" name here is what is causing the confusion.

OSGi Connect and pojoSR came about when this was focused more on being a service registry without the module layer and we were going to "connect" components via services. The new approach is very much like my virtual bundle approach, which was a way of making non-bundle things look like bundles.

To me, it seems like it would make more sense to call ConnectFramework something like ConnectModuleFactory, which is a way to get a ConnectModule.

While the reason for calling it Connect may have changed over time I still think the idea of a Connector or Connection is a concept that can be applied to the current design. For me the confusion is around calling it a framework (because we already have a framework) and I don't like factory because it is not really a factory that keeps creating new widgets each time you call it. It really seems like a connector because it connects things together.

bjhargrave commented 4 years ago

Comment author: @cziegeler

Connector sounds good to me

bjhargrave commented 4 years ago

Comment author: @rotty3000

(In reply to Carsten Ziegeler from comment BZ#4)

Connector sounds good to me

I'm starting to gravitate toward Connector as well.

bjhargrave commented 4 years ago

Comment author: @tjwatson

(In reply to Raymond Auge from comment BZ#5)

(In reply to Carsten Ziegeler from comment BZ#4)

Connector sounds good to me

I'm starting to gravitate toward Connector as well.

At the CPEG call we agreed to rename ConnectFramework to ModuleConnector

bjhargrave commented 4 years ago

Comment author: @tjwatson

Spec, CT, RI updated with ModuleConnector name change.