danba
danba

Reputation: 877

SailsJS versus BreezeJS for SPA with backend validation

I'm new to the full stack javascript application development, have read a lot of posts and documentation to all sorts of things but am a bit stuck on the following issue:

There are two frameworks that seem to offer quite similar functionality but are never contrasted against one another on the internet (as far as I could tell)

SailsJS - server side MVC framework built on Express BreezeJS (+AngularJS) - client side MVC

Apparently I can combine Sails with Angular, there are a few attempt in NPM but none using Breeze in addition, is that due to redundancy or is it just a stupid idea?

I was thinking of developing a SPA that has computation intensive backend processes ( e.g. machine learning on large data sets ~ millions of mongo documents ) on something like

Mongo  - Node : { Express - Sails } - Breeze - Angular

I'm looking for feedback on whether this kind of stack (particularly the Breeze / Sails part) is a bad idea or not. Also I'm really thankful for any advice / links to advice on javascript full stack architecture design decisions.

Thanks!

Upvotes: 3

Views: 866

Answers (1)

bredikhin
bredikhin

Reputation: 9025

Basically, all the software you have mentioned can be used in one product. It's the important though to understand the purpose/strength of each component:

1. MongoDB

This one is pretty clear: database engine.

2. Node.js

This one too: server-side Javascript which will power your API.

3. Express.js

Now it's getting more interesting. Express is a server-side web-application framework for Node.js, but a very minimalistic one, which means it provides some basic functionality, no hidden magic and other fancy stuff.

4. Sails.js

On the contrary, Sails provides a lot of magic, starting with the API out of the box and ending with sockets. Even though it's built on top of Express, Sails is a server-side Javascript framework which follows a completely different approach, with convenience over simplicity. If we talking about a SPA, then the most useful thing Sails has to offer is, definitely, API out of the box: you'll be able to get it up and running in less then 5 minutes.

5. Angular.js

Here we are getting onto the client side. Angular helps you better organize your client-side Javascript and easily perform some pretty complex tasks in the browser. And, of course, Angular (or a similar framework, like Backbone, Ember, Knockout, etc.) is a must-have nowadays if we are talking about rich client applications.

6. Breeze.js

Finally, Breeze provides you with a way to organize / access data from your thick client Web application. Whether you are using Angular, Backbone or Knockout, Breeze will help you manage your data in a way similar to ORM / ActiveRecord concepts.

So, all these components can easily work together, no doubts (sometimes people are talking about MEAN, MEANS, BMEAN stacks, where every letter is a first letter in the name of a framework / component). But ultimately, it's up to you to decide how many of them you should use in your product. As an example of approach, you can start with Mongo / Node base, and then choose necessary frameworks by asking yourself for the each one, whether it simplifies your life (especially, long-term-wise) or complicates it.

Upvotes: 8

Related Questions