This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Review of friend API for Visual SQL Editor | ||
---|---|---|---|
Product: | obsolete | Reporter: | _ jimdavidson <jimdavidson> |
Component: | visualweb | Assignee: | _ jimdavidson <jimdavidson> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | abadea, apireviews, davidvc, jbaker |
Priority: | P3 | Keywords: | API, API_REVIEW_FAST |
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://wiki.netbeans.org/wiki/view/VisualSQLEditorFunctionalSpecification | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 90447 | ||
Attachments: | Initial JavaDoc for proposed API |
Description
_ jimdavidson
2007-03-13 16:54:25 UTC
Created attachment 39449 [details]
Initial JavaDoc for proposed API
[RK01] I do not see what is VisualSQLEditorMetaData good for. API users cannot create or obtain instance of this class so you can't call its methods and they will always pass null to VisualSQLEditorFactory.createVisualSQLEditor. Let me see if I can clarify: First, note that VisualSQLEditorMetaData is an interface. API users will create a class that implements the interface. They will not *use* the methods of VSEMD; rather, they will *implement* them. The VisualSQLEditor will use the metadata instance. This is intended to allow performance optimizations with respect to metadata retrieval, which can be slow. For example, the caller may elect to retrieve all the metadata in advance, and share it across several instances of the VisualSQLEditor. If you have further questions, please let us know. Let me see if I can clarify: First, note that VisualSQLEditorMetaData is an interface. API users will create a class that implements the interface. They will not *use* the methods of VSEMD; rather, they will *implement* them. The VisualSQLEditor will use the metadata instance. This is intended to allow performance optimizations with respect to metadata retrieval, which can be slow. For example, the caller may elect to retrieve all the metadata in advance, and share it across several instances of the VisualSQLEditor. If you have further questions, please let us know. If you expect that other modules will implement VisualSQLEditorMetaData then it belongs to SPI rather than to API. As a result it means that you need to plug your implementation through this SPI in order to be able to use the API effectively. Is this tight coupling what you expect? Yes, that's how the API should be used. The VisualSQLEditorMetaData interface is a workaround for the lack of a database metadata model in NetBeans. I started implementing such a model in issue 61441, but never got the permission to finish it. With the model there would not have been a VSEMD interface at all. But it must be there, and it is the very reason why this API is not public. The visual web component (which is the only client of the visual SQL editor API) caches database metadata anyway, so it makes sense for it to pass the metadata on to the visual editor. Otherwise the editor would have to retrieve the metadata itself on each invocation, leading to worse performance. As to whether this is SPI or API: in this case the service provider is the same as the client, so I don't see any point in separating VSEMD into a separate SPI. This has been on apireviews for more than a month now, so it can probably be closed. Closing. |