Introduction
What is Angular
- A framework for building client applications in HTML/CSS and Javascript/TypeScript
- Angular is written in typescript
- Typescript, a language that compiles to javascript
Why Angular
- Existing web applications are built with Javascript/Jquery.
- As applications becomes complex, code becomes hard to maintain.
- We need to way to properly structure our application.
- Javascript Patterns for structuring - Revealing Module Pattern, Prototype Pattern, hard to understand
- Hard to test the application
Benefits of using Angular
- Gives application a clean and loosely coupled structure - easy to understand & maintain
- Includes a lot of re-usable code - Brings a lot of utility code that we can reuse in various application - user navigation and browser history
- Makes our applications more testable - Write automated test to test various part of application
Architecture of Angular
- Modern Applications has atleast 2 parts Front End & Back End
- Front-end or Client that runs on browser
- User sees and interacts with
- It includes UI
- Built using Html, CSS, Typescript, Angular
- Html Templates + Presentation Logic
- Displaying data and responding to user actions
- Back-end
- Sits on webserver or multiple servers on cloud -
- Responsible for storing data and processing
- Includes Databases and Http Services/API
- Includes business Logic - eg calculation tax and shipping cost
- Http Services/Api
- Application Programming Interface
- Endpoints that are accessible via HTTP Protocol
- Call them with simple http request to get or save data
- Make data available to clients
- Front End - talks - Backend - get or save data