Closed hwillson closed 7 years ago
I'm not sure updating the guide to reference the todo's package would be ideal as I believe the re-write was done for a specific purpose based on how the tests were written in the todos app. Not to mention the wide adoption of dburles:factory
. Plus I am slightly biased here of course.
I think I need to make some time to figure out a plan with @tmeasday to move forward.
We need to answer these questions:
dburles:factory
.dburles:factory
to work like todos/factory (does the new tree
method do this?)dburles:factory
simply dropping in todos/factory, however I don't think that's really ideal as dburles:factory
is more feature rich.Phew. :)
Hmm, just thinking about it a little, maybe the simplest way to answer most of those questions would be to drop dburles:factory
into the todos app and try to make it work. I'll make some time to do that.
@dburles That would be awesome! Let me know if I can help with anything. Thanks!
Recall the reason as to why it was rewritten
Basically I wanted to build a version that worked when you wanted to build associated data client side without saving to a database. That's why the new version did a lot of work to build a "dataset" for you.
I guess that same idea is way more natural in the GraphQL world (and pretty trivial with graphql-anywhere
, I guess?) so I don't think it's worth pursuing any further in livedata-land.
Also, using stub-collections
is another pretty good way (if slightly hacky) to achieve the same result.
Basically I wanted to build a version that worked when you wanted to build associated data client side without saving to a database. That's why the new version did a lot of work to build a "dataset" for you.
I think the tree
method should be able to handle that, though the result shape does differ https://github.com/versolearning/meteor-factory#tree
I guess that same idea is way more natural in the GraphQL world (and pretty trivial with graphql-anywhere, I guess?) so I don't think it's worth pursuing any further in livedata-land.
I'm inclined to agree, so I think the path of least resistance might be to simply use dburles:factory
in the todos app. I've switched it out in this PR https://github.com/meteor/todos/pull/202
WFM!
Excellent @dburles! Merged and closing this off. Thanks very much!
This is a related to the discussion in meteor/docs#96.
The short term plan is to extract the local
factory
package and publish it as a Troposhpere/Atmosphere based package, then update both the todos app and Guide to refer to this new package.The longer term plan (if someone has the time) is to potentially look into merging the todos app
factory
package with thedburles:factory
package, and coming up with a new factory package offering. See meteor/todos#138.