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

Create non-backbone query-engine build/fork #16

Open
jgornick opened this issue Aug 14, 2012 · 6 comments
Open

Create non-backbone query-engine build/fork #16

jgornick opened this issue Aug 14, 2012 · 6 comments

Comments

@jgornick
Copy link

Now that query-engine requires backbone, it starts to get to heavy for simple use-cases with simple arrays. I understand the reason why backbone is now required is because of the live collections. This make sense, but if you remove the live collections feature from query-engine, does that trim it down enough to not warrant backbone? I personally don't need the concept of live collections.

Thoughts?

@jgornick
Copy link
Author

The reason why I also bring this up is because of this issue @ crcn/sift.js#14

Query-engine does have the same features and some extra sugar, however, I'd be more in favor of a lighter version of query-engine to work with native arrays.

@balupton
Copy link
Member

It sure is possible. Adapters could be made for different frameworks (or none). The question would then become, does it warrant the additional complexity?

As the problem with history.js (another project of mine that uses adapters) is that you must test the different adapters, which is fine the node.js way as it can easily be automated, however browser end, that gets way more complicated as automation is a lot more difficult to accomplish.

Development of adapters I'm definitely keen for, although they would require automated tests for each adapter client and server side.

@balupton
Copy link
Member

Progress is being made on this and will land in one of the next versions.

While live collections will require backbone (due to the events), the querying abilities will be able to be applied to anything. The backbone and underscore dependencies will be dropped too.

@balupton
Copy link
Member

balupton commented Nov 5, 2012

Query Engine v1.4.0 no longer requires backbone or underscore.

The API for this is as follows:

var models = [{a:blah},{b:blah},{c:blah}]; // {a:{a:blah},b:{b:blah},{c:{c:blah}} also works
var criteria = new queryEngine.Criteria({queries:blah,filters:blah,pills:blah,queryString:blah,comparator:blah,paging:blah});
var passedModels = criteria.testModels(models);

@balupton balupton closed this as completed Nov 5, 2012
@balupton
Copy link
Member

balupton commented Nov 5, 2012

Actually, will leave open until the docs are done.

@balupton
Copy link
Member

Have plans for updating query-engine for a new type of ES6+ model system.

@balupton balupton self-assigned this Feb 26, 2016
@balupton balupton removed their assignment Apr 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants