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

Explore introducing builder-pattern to event creation #170

Open
tyiu opened this issue Jul 15, 2024 · 0 comments
Open

Explore introducing builder-pattern to event creation #170

tyiu opened this issue Jul 15, 2024 · 0 comments

Comments

@tyiu
Copy link
Contributor

tyiu commented Jul 15, 2024

Many different kinds of Nostr events have overlap in how it is constructed, including semantic meaning of certain tags.

The current pattern of having one distinct creation function in the EventCreating protocol per kind makes it difficult to promote code sharing in the implementation.

For the developer who would be using Nostr SDK, it may be difficult to use the SDK to create events. It may make it harder for them to write maintainable or DRY (don't repeat yourself) code.

Let's explore if it's possible to use a builder pattern to solve these problems.

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

1 participant