cottz-publish-relations icon indicating copy to clipboard operation
cottz-publish-relations copied to clipboard

What are the advantages over reywood:publish-composite package

Open vladejs opened this issue 6 years ago • 5 comments

I wonder what are the advantages regarding performance and flexibility.

I'am considering one of these to start a new project.

vladejs avatar Aug 08 '17 16:08 vladejs

when I write this package I saw publish-composite first and I didn't like it, because it's using the observers in a bad way. Most of the times you only need to use observeChanges as Meteor does by default (they always use observe), I explain that here and you can see their implementation here.

They also have some warnings but with publish-relations as long as you follow the recommendations you should never have performance problems

lfades avatar Aug 08 '17 16:08 lfades

publish-relations also allow you to have non reactive cursors and joins, very useful when you're sure you don't need reactive data in some places :D (and very performant friendly)

lfades avatar Aug 08 '17 16:08 lfades

They also have some warnings but with this package as long as you follow the recommendations you should never have performance problems

You mean theirs or yours?

Talking about recommendations, I read the Performance section and saw that inmediatelly deprecates your first usage example of the package with joins. Why not teach to use joins from the start?

Could you document a complete example on using joins without nested this.cursor? For example, an Artist has multiple Images, and every image has artistId and Comments has imageId.

vladejs avatar Aug 08 '17 17:08 vladejs

I fixed the typo, thanks.

I have a note under the example that points to the recommendations, there is the same example but with a join.

When I have free time I could check the README again but I'm a little busy at the moment, also my english was really bad when I created this package in 2015 (I was 17)

lfades avatar Aug 08 '17 17:08 lfades

Thanks for your time @Goluis , I speak spanish as well so if you are willing to create a README_ES and explain it better I definitely will read it 🥇

vladejs avatar Aug 08 '17 18:08 vladejs