Code Monkey home page Code Monkey logo

Comments (8)

mizzao avatar mizzao commented on May 21, 2024

If anything, I think the right approach would be to integrate hooks into smart collections themselves rather than using the monkey-patching approach here. There are two reasons for this. First, they are not part of core, so using a top-to-bottom programming approach would be easier to push through. Second, it would further raise the benefits of smart collections so that core would really have to consider bringing them in along with the collection hooks.

Also, see https://groups.google.com/forum/#!topic/meteor-core/jG1KLObX1bM

from meteor-collection-hooks.

matb33 avatar matb33 commented on May 21, 2024

I looked through @arunoda's code quickly and it seems I might be able to plug some hooks into his infrastructure more easily than with core. Not 100% sure yet, was just a quick glance. Should be doable

from meteor-collection-hooks.

gabrielhpugliese avatar gabrielhpugliese commented on May 21, 2024

Arunoda will not make any more features for SC. I don't think this makes sense anymore. What you think ?

from meteor-collection-hooks.

matb33 avatar matb33 commented on May 21, 2024

Agreed

from meteor-collection-hooks.

wizonesolutions avatar wizonesolutions commented on May 21, 2024

Ah. Is Smart Collections going into core or something? cc @arunoda

from meteor-collection-hooks.

arunoda avatar arunoda commented on May 21, 2024

Nop. SmartCollections will not going into core. But smart collection's core feature oplog support will be come with Meteor 1.0
So SmartCollections can retire peacefully after that :)

I used it in production and some other people use it, since it's the only way we can scale meteor now. But SmartCollections have limitations and it's does not have full meteor feature set. So once 1.0 comes we all can safely move into that.

from meteor-collection-hooks.

craig-l avatar craig-l commented on May 21, 2024

Sort of related..
A lot of people are using collection2 so I wanted to share how I was working with both packages...

testCollectionBase = new Meteor.Collection("testCollection");
testCollectionBase.after.insert( function (userId, doc) {
    console.log("This was inserted:");
    console.log(doc);
});

testCollection = new Meteor.Collection2(testCollection, {
    schema: {
        name: {
            type: String,
            label: "Name"
        }
    }
});

Is there anything wrong with doing this?
If not maybe add it to the readme as I'm sure most people will be extending standard collections.

p.s. I'm new to github so hopefully this is a good place to post this.

from meteor-collection-hooks.

matb33 avatar matb33 commented on May 21, 2024

@craig-l you're approaching it correctly. Simply having you post this here may be enough for people to find. If people continue to be confused with how to have Collection2 interoperate with collection hooks, I'll consider a note

from meteor-collection-hooks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.