Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the basic differences and similarities between Angular js and Express js? [closed]

So I am a bit confused in regards to the aim of Angular js vs Express js. From my understanding we use Node.js to serve Angular js but we are not entirely limited/forced to use Node.js for serving it. Express js on the other hand seems like it accomplishes something similar to the more traditional MVC framework.

So is Angular Js a type of non-server-specific MVC framework? and does this limits Angular js backend server capabilities or ease of use?

like image 726
BluePython Avatar asked Sep 15 '13 21:09

BluePython


People also ask

What is the difference between Express and Angular?

Though there is a fundamental difference between the way these frameworks are used in developing web applications, for example, Express is primarily used for backend purposes, while Angular is known for frontend capabilities.

What is difference between AngularJS and NodeJS?

AngularJS is a client-side framework. Node. js is a cross-platform runtime environment. AngularJS supports two-way data binding but cannot support database query writing features.

What is AngularJS How is AngularJS similar or different to JavaScript?

JavaScript has an extensive user interface that includes sliders and other features. On the other hand, AngularJS is a data-driven framework that's used to create web applications. JavaScript is a powerful and complex programming language. On the other hand, AngularJS is a simple and effective framework.


1 Answers

Express

Express is a web framework, inspired by the Ruby project 'Sinatra'. It's one of many web frameworks in Node

AngularJs

AngularJS is a MVC framework that defines numerous concepts to properly organize your web application. Your application is defined with modules that can depend from one to the others. It enhances HTML by attaching directives to your pages with new attributes or tags and expressions in order to define very powerful templates directly in your HTML. It also encapsulates the behavior of your application in controllers which are instanciated thanks to dependency injection.

AngularJS helps you structure and test your Javascript code very easily.

Answer to your comment which i saw.

So would you say they are for different purposes client-side vs server-side implementations and therefore mutually exclusive or do you see a scenario in which one could use Angular Js, Expression js, and Node.js in the same application?

Yes, they are for different purpose, but they both are MVC based framework. Yes, we can where you can use Angular router, views and controller for front end and use express as your base model to communicate with MongoDB or anyother Database. But yet again its your choice, as you can achieve everything without even bothering AnagularJs.

Adding more.

AngularJS is a beautiful client-side framework, highly testable, that combines tons of cool stuff such as MVC, dependency injection, data binding and much more. If you want to fully take advantage of the AngularJS features you may consider coding the server side using a RESTful approach. you can take advantage of their resource factory, which creates an abstraction of your server side RESTful API and makes server-side calls such as get, post, put, delete etc.

You can use AngularJS for defining your client-side behavior[Views and Controllers] and then write up the REST-Services which AngularJS client can interact with. The client runs on the web browser[AngularJS], and does asynchronous communication to the server. The server[ExpressJS] then retrieves and stores data for the client.

Maintaining a clear distinction between client and server makes the app easier to maintain and test. Adding to it, it all depends upon what you are trying to build and how best you can leverage both of them.

like image 74
Thalaivar Avatar answered Oct 05 '22 16:10

Thalaivar