Declarative API development
@patrick-tolosa is already working on this.
Since May 28, 2023.
Assessment
This issue has not been assessed yet.
Description
The case for Declerative APIs
The current API of the SDK is imperative.
@yoadsn mentioned in #382 that some users would benefit from a declarative API as well.
Points of interest
- The API should be consistent across methods (Meaning we can't pick and choose which APIs have a declarative counterpart)
- The API should avoid using magical strings since we aim to provide the best dev experience even to people with weak IDEs.
- We might relax the constraint above if we consider the declarative API for more advanced users, but this needs to be explored before deciding.
Trivial example
Imperative
new Image().resize(scale().width(100).height(100))
Declerative
new Image().resize(scale({
width: 100,
height: 100
}))
- Dominant language
- HTML
- Stars
- 56
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cloudinary/js-url-gen
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
cloudinary/js-url-gen#608 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
cloudinary/js-url-gen#606 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
cloudinary/js-url-gen#600 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
cloudinary/js-url-gen#588 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
cloudinary/js-url-gen#587 · 4 comments ·