Skip to content

(__Code Readability__): Function Aliases in Push Protocol implementation #6

@Madjarx

Description

@Madjarx

Push protocol is a great tool but the thing is it has a lot of methods/functions with similar names

subscribe & unsubscribe look pretty similar when you skim over them and when you have a lot of stuff on your mind

I've come to the point where i have methods such as:
unsubscribeFromChannel and subscribeToChannel and you might argue that it is a bad naming convention and i do share some opinions on that. Visually they are hard to distinguish when working.

I would say that a temporary solution would be method aliasing in the main ./lib/PushService.js with proper and quite visible documentation, such as alias of subscribeToChannel could be optIn, vice versa optOut

This could be a temporary solution until we refactor the class and break it down into smaller pieces that are user / channel / specific-field-oriented

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requesthelp wantedExtra attention is neededquestionFurther information is requested

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions