kitql Extensibility #58
Replies: 2 comments
-
Hi, thank you for your feedback. I don't know much about dependecy injection, but willing to learn 💪 Let's exchange here |
Beta Was this translation helpful? Give feedback.
-
I just finished working with it for today on my branch. I can go with a draft PR here. The whole idea is to make a common interface for use in kitQL client, then receiving it as a dependency in constructor, you can switch various implementations. In this case we can prepare various ways of caching, and let user switch between classes used for caching. |
Beta Was this translation helpful? Give feedback.
-
👋 I just discovered this repository few days ago, while reading SvelteKit blog post as usually first days of month. I'm impressed of the idea, really like it.
I'm fitting in kitql to my project and saw few places for improvements. I'm courious what do you think about it.
As KitQLClient is a class it can be made with a dependecy injection patternm, so everyone could extend or change behavior in some points.
For example, first place which is almost ready for it is Cache system. I saw you are planning to extend it for multiple stores systems. I think we can provide a general interface of a CacheData. Let it stay "browser only in memory cache", but then we can provide all sorts of solutions DBs, localstorage, IndexedDB, Redis. .. etc.
Also rest maybe is capble to be exported as a class, and then provided to client, so in specific use cases it can be switched to another one without extending a whole class and overriding few methods.
I'm open to help,
Beta Was this translation helpful? Give feedback.
All reactions