0

I've been a rails developer for a bit now, and I've started to get into the MEAN stack through a tutorial.

I kinda understand Angular and Node and the purposes they both serve, but I'm not sure I get express yet. Does rails do all of these things in the background?

My understanding:

Angular is does most of your views, routing, etc. Node is your webserver.

Am I not getting those either?

1
  • I haven't had much experience with it yet myself, nor do I have the Rails experience for an apt comparison, though my understanding was that Angular only handles client side routing, while express handles server-side routing. Also, while Node.js acts as a raw http server infrastructure, Express acts as the application layer which handles routing and server side logic.
    – Rotem
    Sep 13 '15 at 13:31
1

I am not familiar with Rails, but I believe it uses server side HTML templating (injecting variables into HTML code). Angular uses client side templating. So there is paradigm shift which is probably confusing you.

Angular is best suited for so called Single Page Applications, which does all the routing and templating on client without need for full refresh of the site. Your back-end is just CRUD layer (most commonly REST) which is called via AJAX from client.

If you are used to Rails Rapid development, look into Loopback framework. It's framework for creating REST APIs on stereoids. It is using Express under the hood and is created by company StrongLoop, which also maintains Express project itself now.

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.