elasticmagic-js icon indicating copy to clipboard operation
elasticmagic-js copied to clipboard

Contributions

Open ishanarora04 opened this issue 4 years ago • 3 comments

Hey @kindermax Are you accepting PRs? Can we have a formal issue list to pick? I am currently reading the code and fixing a few things based on your TODO comments in the code. So where should I start?

ishanarora04 avatar Jan 07 '21 06:01 ishanarora04

Hi, glad to to see your interest in this project. Although I am working on a different project right now, and can not make an active development, I can help you with an advices, issues, ideas and code. It would be cool if you have some plans to use library in some own project. This would give us an opportunity to test library and also to make a reasonably prioritised features roadmap. I think I will back to active contribution to this project in the future.

As for project itself, since it is a port of a original python library, it makes a lot of sense to keep this project in sync with python version. I know python’s lib author in person. He has a good vision of how elasticmagic should evolve, and I second him in that. You can text me if you have any questions.

kindermax avatar Jan 07 '21 19:01 kindermax

First issue is a design issue. According to the example, we have to declare two sets of fields in document class, one - static, for query building and second for data population. This pattern is very convenient in python because in this case class attributes and instance attributes are interchangeable, but not in js. My proposition is somehow to separate query building and data population. We can use pattern called data mapper. In this case, query builder is responsible for query building and data fetching, and another class will be used to populate it with data fetched using query builder.

kindermax avatar Jan 07 '21 20:01 kindermax

Thanks for replying. I can start fixing the design thingy. Let me also checkout the python elasticmagic, it will give a closer look at the vision of the project.

ishanarora04 avatar Jan 08 '21 04:01 ishanarora04