Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[scoped-registries] CustomElementRegistry to support SDLC of generic browser entities #976

Closed
sashafirsov opened this issue Nov 7, 2022 · 6 comments

Comments

@sashafirsov
Copy link

The most of APIs for objects in browser do support CRUD operations. But for custom element registries it has been implemented only partially.

  • Create - i.e. registration covered by Scoped Custom Element Registries and partially in original API
  • Read - CustomElementRegistry.get() is partial implementation. Does not allow to
    • list the registered tags
    • watch for list changes
  • Update - replace the implementation. Facade pattern to
    • semver support in init time,
    • live app upgrade
    • translation
    • analytics
    • ...
  • Delete - unregister. The proposals been closed on several occasions. A base for Upgrade ^^

The exact API is a subject for individual discussions.

@sashafirsov
Copy link
Author

@justinfagnani , as author of Scoped Custom Element Registries, do you think the browser objects APIs should follow same patterns?

@justinfagnani
Copy link
Contributor

I'm confused by this issue. I don't know what SDLC is and I'm not sure how CRUD relates to objects or most browser APIs that are not database-like.

The Scoped CustomElementRegistry proposal is focused on associating registries with DOM trees. I think additional API changes for CustomElementRegistry, like unregistering elements, are out of scope for that proposal, and already discussed in issues like #754.

@sashafirsov
Copy link
Author

SDLC - software development life cycle. Referred here as support full life cycle of CustomElementregistry for developers and apps. Which is including creation, inspection, reuse/clone, customize, ... remove.

CRUD is not only DB term. Any object lifecycle in browser includes basic operations: creation, inspection(read), modification(update), delete. I bet there are some more. Like the string conversion for log, serialization (JSON, XML, binary,)...

The Scoped CustomElementRegistry proposal is focused on associating registries with DOM trees. I think additional API changes for CustomElementRegistry, like unregistering elements, are out of scope for that proposal, and already discussed

It is understandable that particular object (CustomElementRegistry) main behavior is the primary subject for proposal.
But symmetrical API either has to be assumed by default or outlined why there are exceptions for this kind of object.

I see the lack of operations described in story as missing symmetry in API. When other collection APIs in browser been implemented, most if not all been symmetrical.

@justinfagnani , is there a reason to break symmetry? The arguments of #754 was not accounting for generic collection capabilities, rather was an intent to artificially insulate one of collection use aspects.

@justinfagnani
Copy link
Contributor

justinfagnani commented Dec 7, 2022

Is this an issue asking to re-open #754 with a new consistency argument?

@sashafirsov
Copy link
Author

@justinfagnani , this is new consistency argument not just for #754 but also whole set of collection interfaces.

@rniwa
Copy link
Collaborator

rniwa commented Nov 21, 2024

Closing this as a duplicate of #754.

@rniwa rniwa closed this as completed Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants