Meteor Vs SailsJs

Hi,
I am new to Meteor and not even a full time developer, When I discovered meteor about six months back I was very excited to see what could be done with it in a matter of hours, which use to take days using php (for me)

Now I came across SailsJS and want to compare the two, so that I can go ahead in the direction which works for me.
Here’s how I would compare the two, but would like to know more from the community

Meteor JS
Pros

  • Easy to understand and write.
  • Optimistic UI
  • pub/sub is built in and ready to use ( Reactivity)
  • Better community support and illustrative examples available online as compared to sailsjs

Cons

  • works with only mongodb (at least officially production ready db)
  • Own package structure
  • Would use more CPU and RAM to achieve Pub/Sub using DDP instead of socket.io ? ( not certain on this)
  • Not frontend agnostic (Community and MDG had to build to support for angular and react )
  • No out of the box API framework (although this could be a pro for some )

SailsJs
Pros

  • Uses npm packages directly
  • Database agnostic , supports mongo, sql, orientDB
  • Frontend agnostic (Angular/Ember and almost anything may be used)
  • Out of the box blueprint and API models available
  • better suited for IoT due to built in support for socket.io ? (not certain)

Cons

  • Pub/Sub functionality using socket.io is comparatively more time consuming to write than meteor
1 Like

Obviously I’m biased since I work at Meteor! Now that I’ve gotten that out of the way:

Would use more CPU and RAM to achieve Pub/Sub using DDP instead of socket.io

It depends on what you want to build. Part of Meteor’s goal is to save you the hassle of building that stuff in the first place, and we’ve put a ton of effort into optimizing it. Perhaps you could achieve better optimizations by building pub-sub that’s specific to your needs, but it would take some effort. Also, consider what happens when you have more than one application server in production; pub-sub becomes quite a bit more complex then.

Not frontend agnostic (Community and MDG had to build to support for angular and react)

I’d say it’s actually more frontend agnostic than this makes it sound. If you look at both the Angular and React integrations, they contain exactly two things:

  1. Build plugins - JSX for React, and Angular templates for Angular. These are necessary even if you use Sails, since you still would need to compile JSX somehow!
  2. A thin layer to wire up Meteor’s reactive data sources to your UI. In React this is just one mixin: https://github.com/meteor/react-packages/blob/devel/packages/react-meteor-data/meteor-data-mixin.jsx

You’ll probably need to write just as much code to make your favorite view layer work with Sails, unless someone else has already done it.

No out of the box API framework (although this could be a pro for some)

I guess it depends on what you mean by “out of the box”.

Conclusion

If you use Sails, it sounds like you will have to write and maintain more code yourself to rebuild parts of Meteor. But you will probably understand more of the stack so it could be easier to diagnose issues.

3 Likes

The “frontend agnostic” thing is important only if you actually want to work with a frontend framework that wouldn’t be supported by Meteor. Also most of popular frontend frameworks are supported by now.