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

Update class hierarchy on tree-shaking branch #1415

Closed
lawrence-forooghian opened this issue Aug 2, 2023 · 1 comment
Closed

Update class hierarchy on tree-shaking branch #1415

lawrence-forooghian opened this issue Aug 2, 2023 · 1 comment
Assignees

Comments

@lawrence-forooghian
Copy link
Collaborator

lawrence-forooghian commented Aug 2, 2023

Introduce classes BaseRest, BaseRealtime, DefaultRealtime into #1400, such that:

  • DefaultRest extends BaseRest
  • DefaultRealtime extends BaseRealtime extends BaseRest

The aim of this (vs the single BaseClient class introduced in #1400) is to give us a place to put the functionality that’s common to BaseClient and DefaultRest.

@sync-by-unito
Copy link

sync-by-unito bot commented Aug 2, 2023

➤ Automation for Jira commented:

The link to the corresponding Jira issue is https://ably.atlassian.net/browse/SDK-3768

lawrence-forooghian added a commit that referenced this issue Aug 2, 2023
We add the prefix "Base" to the names of the Rest and Realtime classes,
and we introduce new classes DefaultRest and DefaultRealtime.

The Base* classes will be exported by the upcoming tree-shakable variant
of the library. The Default* classes become the exports of the current
(i.e. non tree-shakable) variant.

As we make the library tree-shakable, we will extract functionality from
the Base* classes and move them into modules exported by the
tree-shakable variant of the library. Whatever functionality we remove
from the Base* classes will be reintroduced in their Default*
counterparts.

Resolves #1415.

Co-authored-by: Owen Pearson <owen.pearson@ably.com>
lawrence-forooghian added a commit that referenced this issue Aug 15, 2023
We rename the Rest class to BaseClient, introduce a new class BaseRest,
and add the prefix "Base" to the name of the Realtime class.

The BaseRest and BaseRealtime classes will be exported by the upcoming
tree-shakable variant of the library. The Default* classes become the
exports of the current (i.e. non tree-shakable) variant.

As we make the library tree-shakable, we will extract functionality from
the BaseClient and BaseRealtime classes and move them into modules
exported by the tree-shakable variant of the library. Whatever
functionality we remove from the Base* classes will be reintroduced in
their Default* counterparts.

The purpose of the BaseRest class is probably not immediately obvious,
since it adds no functionality on top of BaseClient. However, upon
introducing the tree-shakable version of the library, which will split
the REST functionality into a separate module that Realtime can
optionally use, we will use the BaseRest class to ensure that even in
the tree-shakable version of the library, the BaseRest class always
includes REST functionality.

Resolves #1415.

Co-authored-by: Owen Pearson <owen.pearson@ably.com>
lawrence-forooghian added a commit that referenced this issue Oct 26, 2023
We rename the Rest class to BaseClient, introduce a new class BaseRest,
and add the prefix "Base" to the name of the Realtime class.

The BaseRest and BaseRealtime classes will be exported by the upcoming
tree-shakable variant of the library. The Default* classes become the
exports of the current (i.e. non tree-shakable) variant.

As we make the library tree-shakable, we will extract functionality from
the BaseClient and BaseRealtime classes and move them into modules
exported by the tree-shakable variant of the library. Whatever
functionality we remove from the Base* classes will be reintroduced in
their Default* counterparts.

The purpose of the BaseRest class is probably not immediately obvious,
since it adds no functionality on top of BaseClient. However, upon
introducing the tree-shakable version of the library, which will split
the REST functionality into a separate module that Realtime can
optionally use, we will use the BaseRest class to ensure that even in
the tree-shakable version of the library, the BaseRest class always
includes REST functionality.

Resolves #1415.

Co-authored-by: Owen Pearson <owen.pearson@ably.com>
lawrence-forooghian added a commit that referenced this issue Nov 1, 2023
We rename the Rest class to BaseClient, introduce a new class BaseRest,
and add the prefix "Base" to the name of the Realtime class.

The BaseRest and BaseRealtime classes will be exported by the upcoming
tree-shakable variant of the library. The Default* classes become the
exports of the current (i.e. non tree-shakable) variant.

As we make the library tree-shakable, we will extract functionality from
the BaseClient and BaseRealtime classes and move them into modules
exported by the tree-shakable variant of the library. Whatever
functionality we remove from the Base* classes will be reintroduced in
their Default* counterparts.

The purpose of the BaseRest class is probably not immediately obvious,
since it adds no functionality on top of BaseClient. However, upon
introducing the tree-shakable version of the library, which will split
the REST functionality into a separate module that Realtime can
optionally use, we will use the BaseRest class to ensure that even in
the tree-shakable version of the library, the BaseRest class always
includes REST functionality.

Resolves #1415.

Co-authored-by: Owen Pearson <owen.pearson@ably.com>
lawrence-forooghian added a commit that referenced this issue Nov 6, 2023
We rename the Rest class to BaseClient, introduce a new class BaseRest,
and add the prefix "Base" to the name of the Realtime class.

The BaseRest and BaseRealtime classes will be exported by the upcoming
tree-shakable variant of the library. The Default* classes become the
exports of the current (i.e. non tree-shakable) variant.

As we make the library tree-shakable, we will extract functionality from
the BaseClient and BaseRealtime classes and move them into modules
exported by the tree-shakable variant of the library. Whatever
functionality we remove from the Base* classes will be reintroduced in
their Default* counterparts.

The purpose of the BaseRest class is probably not immediately obvious,
since it adds no functionality on top of BaseClient. However, upon
introducing the tree-shakable version of the library, which will split
the REST functionality into a separate module that Realtime can
optionally use, we will use the BaseRest class to ensure that even in
the tree-shakable version of the library, the BaseRest class always
includes REST functionality.

Resolves #1415.

Co-authored-by: Owen Pearson <owen.pearson@ably.com>
@sync-by-unito sync-by-unito bot closed this as completed Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant