5

I am reading a book (Getting MEAN by Simon Holmes) about MEAN Stack which talks about different architectures that can be used while developing an app in MEAN Stack and I got a little confused with that.

First I'll tell you how I develop applications in MEAN:

  • My Front-End is a templating engine like EJS or Jade.
  • I render pages through my Node/Express.js Server.

  • I also use AngularJS on the front-end, I have angularJS controllers to manage the scope and functionalities of different features in the app and I use Angular Services to communicate with my Node.js Server and make HTTP calls to my routes.

  • I create a Node.js Server using Express.JS and then create a REST API.
  • I create API routes using Express.js
  • I use MongoDB for database and mongoose for database connections etc

The above described architecture is the one I use but the book I am reading talked about a few more and I am confused about how they are setup and work.

The 3 different architectures described in the book are:

  • A Node.js and Express Application

  • A Node.js and Express Application with AngularJS additions for interactivity

  • An AngularJS SPA (Single Page Application)

Heres the image representation of the 3 architecture in the book:

enter image description here

Can anyone explain how these 3 approaches are different from what I do and how they are setup?

  • 3
    The difference between the three architectures is the technology that is chosen for the front-end. No, really. You've already stated the reason for the existence of three different frontend architectures in your question. If you want a more specific answer than this, ask a more specific question. – Robert Harvey Jul 31 '16 at 18:29
1

MEAN stands for MongoDB, Express, Angular and Node, which gives us the following:

  • The top using only Node, Express and MongoDB isn't a MEAN application because it doesn't use Angular.

  • The middle is a MEAN app since it uses all technologies, but its different from the last one as it uses Angular features but not single page application, SPA.

  • The bottom one is also a MEAN app, and it uses SPA, which contains the whole application in one page, as opposed to the middle one which have more than one page.

I would say you are using the middle one in your architecture, since its perfectly alright to add on other techniques in a MEAN app.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.