IstoraMandiri / app-dump

Quick in-app database dump and restore for Meteor
33 stars 6 forks source link

Is it possible to use "Meteor method with transport ajax" instead of "Router"? #16

Closed thearabbit closed 8 years ago

thearabbit commented 9 years ago

Excuse me, Is it possible to use Meteor method with transport ajax instead of Router to down/up?

...............
ajax: {
            data: function (params) {
                return params;
            },
            transport: function (args) {
                // Meteor method call
                Meteor.call('methodUp_Down', args.data, function (err, results) {
                    if (err) {
                        args.error(err);
                        return;
                    }

                    args.success(results);
                });
            },
            results:...........

What do you think?

IstoraMandiri commented 9 years ago

Sounds interesting but I'm a little confused -- what are the pros/cons over the current implementation?

Are you using DDP instead of REST, or as well as?

It'd be great to see an example or PR!

thearabbit commented 9 years ago

I am not sure, I think that it is good if don't use router.

IstoraMandiri commented 8 years ago

Hi, thanks for contributing @thearabbit but I will close this issue for now.

Please let me know if there is a genuine advantage and I will reopen it.

Thanks!