In my last post I described how the design of meteor's pub/sub can lead to unnecessary development and maintenance burden. It is this problem that the find-from-publication package tries to address.
You can see this commit for the changes using this package and how much simpler things are. First, there is no more the twin loaded and limit reactive vars. Second, there is no more duplication of the mongo query in the server and client. This, in my opinion, is just a more intuitive way of thinking of publications.
The disadvantages? Queries on the client need to perform an extra find() on the collection to filter the documents for the publication specified. I haven't used it much to know if there are other problems with it, but I have seen posts that claim that there are cases where the package doesn't work with meteor v1.3.
In summary, so far this package makes meteor make sense for me, so I use it now for all publications that are not filtered by id.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.