@rgoomar linked me to this thread, seems pretty intense.
@skini26 @anbuselvan @kahmali I agree with you that Restivus is pretty awesome, I also like
cfs:http-methods. It seems to have a lot of functionality and options that people would be looking for in an official REST implementation. I think it would be great to somehow promote these packages as a community solution to this commonly requested feature, until Meteor has it built in.
@spicemix I see your point about REST support not necessarily needing to be in core, but I think there are actually some ways that it could be integrated well into the framework. Some examples are having an official solution for HTTP-based authentication, automatically having an HTTP equivalent for your DDP based APIs, etc. Also, there’s a marketing concern - people might feel that Meteor doesn’t really “support” REST if it’s not part of core.
@KrishnaPG @skini26 Regarding Meteor’s performance as a REST API backend, I can’t think of anything that would make it slower than any other Node app when handling HTTP requests. Meteor has many features beyond just DDP, and it would be great for people to use it even if all they need is a REST API for their mobile app. As you said, there are a lot of benefits - Meteor has great built-in functionality for handling collections, easy deployment, fast development with server reloading/hot code push/meteor shell/meteor debug, etc. Plus, if you decide that you want a webapp or PhoneGap/Cordova app to go alongside your native mobile app, you can easily build a DDP frontend to the same data.
I don’t think DDP and HTTP need to be enemies. There are a lot of cases where DDP is the right solution, and some where you need HTTP. It would be great if this wasn’t even a point of discussion for people when deciding whether to try out Meteor - it should be just as good or better to build your REST backend with Meteor as with Express or Rails, then everyone wins because you don’t need to choose your server by first deciding on DDP vs. HTTP.
I’m currently working on a package for Meteor that will make it ultra-easy to have the exact same API for your app over DDP and HTTP: https://meteor.hackpad.com/Meteor-Hack-Week-REST-APIs-with-Meteor-XK2NNXqhUvj
That way, you can just write your app using the normal Meteor stuff like publish, methods, allow/deny, etc. and then consume it over whatever protocol you like.