Skip to main content

Architecture of Angular Application

All right... now you know what angular is lets take a look at architecture of angular applications.
a lot of modern applications have at-least two parts front-end and back-end.
The front-end also called the client is the part that runs on the web browser and this is what the user sees and interact with. It essentially includes the user interface or UI of our application.
We use HTML / CSS / TypeScript / Angular to build the front-end and the back-end sits on a web server or multiple web servers on the cloud and it is responsible for storing the data and doing any kind of processing.
Our front- end or the client application talks to the back-end to get or save the data.
One of the question that lot of beginners have is how do we save our data in angular?...Well you don't in most of the cases you don't save the data on the client because it can easily disappear as the user clears the browser data or moves to different computer thats why we store the data on the server.
Let's see the Architecture of Angular



Architecture of Angular applications
Here we often have one or more databases and a bunch of  HTTP services or API's to make this data available to the clients. in case if you don't know API's? it stands for application programming interface, now if you put this fancy name aside these http services or api's are essentially end-points that are accessible via the HTTP protocol. We can call them using simple http requests to get or to save the data, is this too much technical jargon here??? - lets see a real world example, think of a port where ships load or unload these are the points to get load in & load out of the town, now imagine that these ports are http endpoints, ships are http requests and load are data. so just like we can send the ships to port to get some load and bring it to us.
A client app sends an http request to an end-point to get some data so this is how the BIG picture works.
Our web applications have a front-end and a back-end on the back-end we have one or more databases and API's that make the data available to the clients, for a large applications around a complex domain this is where we implement a business logic of the application, like calculating the tax& shipping cost based on the various parameters.
The front end of the client is all about the presentation, so here we have our HTML templates as well as the presentation logic of our application, this logic is all about displaying data & responding to user actions, like what should happen when the user clicks on the button or navigates over a page these are the examples of the presentation logic or the logic that all about presentation aspect of our application.
Now in terms of the implementation building the back end requires requires similarly other languages and frameworks and this is completely outside the scope of building client applications with angular, so as an angular or front-end developer you don't have to worry about it, this is a job of back-end developer or a full stack developer who knows both the front-end and the back-end, for now just focus on front-end, if you want to know more about back-end just go for any high-level language like c# and c# web api's. but for know just focus on only one thing and do it well.
Any suggestions are highly appreciable.
Thank you...!

Comments

Popular posts from this blog

Setting Up the Development Environment

In this article i'm gonna show you how to setup your development envirnoment and create your first angular project. The first thing you need to install is the latest version of the  node , if you have never worked with node before, it's basically a runtime envirnoment for executing javascript code outside the browser. Here in angular we are not going  to work with node but node provides some tools that we need to build angular projects. For installation of node just go to nodejs.org  on this page you can see the latest version of node for your operating system here in my case the latest stable version is v8.9 and the latest version is v9.5 now this latest  version has more features but its not stable yet so just go ahead and install the latest stable version v8.9 when you do that open up the terminal on mac or command prompt on windows (let me show you few commands) and type  ~ $node --version (on mac👈😉)  v8.9.4 so you can see on my machine i'm run...