SlideShare una empresa de Scribd logo
1 de 15
Build Modern Web Apps using 
ASP.NET Web API & AngularJS 
Taiseer Joudeh 
Senior IT Team Lead at Aramex 
Twitter : @tjoudeh 
Blog: http://bitof tech.net
Agenda 
• Deep dive into ASP.NET Web API 
• REST Specifications 
• Build RESTful HTTP service using Web API 
• Single Page Applications Overview 
• SPA Frameworks 
• Build simple SPA using AngularJS 
• Host the project on Microsoft Azure
What is ASP.NET Web API? 
• Framework for building HTTP based services 
• Use HTTP is application protocol 
• Designed for broad reach (To any client speaks HTTP!) 
• HTTP != REST 
• The framework does not enforce an architectural style 
• Can be used with: 
• ASP.NET Web Forms 
• ASP.NET MVC
ASP.NET Web API Features 
• Built on top of ASP.NET Stack 
• Native Support for ASP.NET Routing 
• Convention over Configuration 
• Native abstraction on top of raw HTTP protocol 
• Brand new HTTP client toolkit 
• High level of scalability on architecture and on the cloud 
• Easily build RESTful compliant Services
What is RESTful Services? 
• REST = Representation State Transfer 
• Stateless architect which runs over HTTP (Not a protocol) 
• Four basic design principals for RESTful services: 
1. Use HTTP Verbs only to interact with resources 
2. Interaction with resources is stateless, request/response contain all 
information 
3. Resources identified by URIs only (Services Discovery) 
4. Content Negotiation (Support for XML/JSON)
Resources in RESTful Services 
Operation HTTP Verb ResourceURI 
Get all students GET /api/students 
Create a new student POST /api/students 
Get a student GET /api/students/{username} 
Update a student PUT /api/students/{username} 
Delete a student DELETE /api/students/{username}
Why to build RESTful Services? 
• Can be easily consumed by any client (Mobile Apps, SPA, Desktop 
Apps, Service to Service, etc…) 
• Lightweight (No XML parsing, less bandwidth, just the payloads) 
• Easier to learn and build, you can get up running quickly. 
• Closer to Web design specification, all about HTTP protocol.
Demo
To implement a Web API….. 
• Derive from API Controller 
• Implement your HTTP Methods 
• Maps URI space to your API controllers 
• Ex: api/{controller}/{id} 
• {controller} + “Controller ” = ApiController Type Name 
• Simple types are taken from URI 
• Route data, query parameters 
• Complex types come from the body 
• MediaTypeFormaters are configured to deserialize request body based on content 
type 
• JSON, XML, and form-url-encoded are supported out of the box
Demo
What is SPA? 
• Single Page Application – Bad Name maybe! (Rich Web 
Applications) 
• Load all necessary resources up-front with single page load (shell 
page) 
• Bring the desktop experience to the web – Partial loads 
• Built entirely with JS and HTML
Motivations to build SPA 
• Rich user experience – faster responses 
• Reduce round tripping between client and the server 
• Reach – SPAs can reach different users on different platforms.
SPA Architecture Philosophy 
• Thin Stateless Server 
• Role is a service (RESTful API is important) 
• Stateless server…easy to scale 
• Strong separation of concerns which leads to lower network latency, less 
bandwidth usage, snappy response 
• MVC at the Client 
• View: sets on top of the architecture (Think of page). 
• Model: set at the bottom of the architecture, holds the data for the view 
• Controller: Sets in between, orchestrator between View and Model, handle 
business logic
SPA Frameworks 
• Consider framework with features: 
• Browser history management (Support for back button) 
• Templating engine (Mustache, Handlebars, etc…) 
• Two way data binding 
• Routing service 
• Framework examples: 
• AngularJS 
• EmberJS 
• BackboneJS
Thank You!

Más contenido relacionado

La actualidad más candente

New microsoft office power point presentation
New microsoft office power point presentationNew microsoft office power point presentation
New microsoft office power point presentationteach4uin
 
SharePoint App Types at a Glance
SharePoint App Types at a GlanceSharePoint App Types at a Glance
SharePoint App Types at a GlanceDavid J Rosenthal
 
Salesforce UI API (TDXGG'18)
Salesforce UI API (TDXGG'18)Salesforce UI API (TDXGG'18)
Salesforce UI API (TDXGG'18)Rahul Malhotra
 
Mulesoft Salesforce Connector - OAuth 2.0 JWT Bearer
Mulesoft Salesforce Connector -  OAuth 2.0 JWT BearerMulesoft Salesforce Connector -  OAuth 2.0 JWT Bearer
Mulesoft Salesforce Connector - OAuth 2.0 JWT BearerVince Soliza
 
Essential Knowledge for SharePoint Add-Ins
Essential Knowledge for SharePoint Add-InsEssential Knowledge for SharePoint Add-Ins
Essential Knowledge for SharePoint Add-InsInnoTech
 
Everybody loves Swagger
Everybody loves SwaggerEverybody loves Swagger
Everybody loves SwaggerBizTalk360
 
ECS 2018: Introduction to Azure Web Applications
ECS 2018: Introduction to Azure Web ApplicationsECS 2018: Introduction to Azure Web Applications
ECS 2018: Introduction to Azure Web ApplicationsEric Shupps
 
SenchaCon 2016: Cross-Platform Mobile App Development with Cordova and Visual...
SenchaCon 2016: Cross-Platform Mobile App Development with Cordova and Visual...SenchaCon 2016: Cross-Platform Mobile App Development with Cordova and Visual...
SenchaCon 2016: Cross-Platform Mobile App Development with Cordova and Visual...Sencha
 
Active Server Page(ASP)
Active Server Page(ASP)Active Server Page(ASP)
Active Server Page(ASP)Keshab Nath
 
Introducing Office Web Apps as a Tool for Developing Content Rich Applications
Introducing Office Web Apps as a Tool for Developing Content Rich ApplicationsIntroducing Office Web Apps as a Tool for Developing Content Rich Applications
Introducing Office Web Apps as a Tool for Developing Content Rich ApplicationsRyan McIntyre
 
Mule integration with linkedin
Mule integration with linkedinMule integration with linkedin
Mule integration with linkedinKhasim Saheb
 
Dreamforce 2018 Locker Service
Dreamforce 2018 Locker ServiceDreamforce 2018 Locker Service
Dreamforce 2018 Locker ServiceRahul Malhotra
 
Mule Anypoint API Gateway
Mule Anypoint API GatewayMule Anypoint API Gateway
Mule Anypoint API Gatewayrkulandaivel
 

La actualidad más candente (20)

New microsoft office power point presentation
New microsoft office power point presentationNew microsoft office power point presentation
New microsoft office power point presentation
 
SharePoint App Types at a Glance
SharePoint App Types at a GlanceSharePoint App Types at a Glance
SharePoint App Types at a Glance
 
Salesforce UI API (TDXGG'18)
Salesforce UI API (TDXGG'18)Salesforce UI API (TDXGG'18)
Salesforce UI API (TDXGG'18)
 
MVC-3 Vs Webform
MVC-3 Vs WebformMVC-3 Vs Webform
MVC-3 Vs Webform
 
Introduction ASP
Introduction ASPIntroduction ASP
Introduction ASP
 
Mulesoft Salesforce Connector - OAuth 2.0 JWT Bearer
Mulesoft Salesforce Connector -  OAuth 2.0 JWT BearerMulesoft Salesforce Connector -  OAuth 2.0 JWT Bearer
Mulesoft Salesforce Connector - OAuth 2.0 JWT Bearer
 
Essential Knowledge for SharePoint Add-Ins
Essential Knowledge for SharePoint Add-InsEssential Knowledge for SharePoint Add-Ins
Essential Knowledge for SharePoint Add-Ins
 
Everybody loves Swagger
Everybody loves SwaggerEverybody loves Swagger
Everybody loves Swagger
 
Domain and hostion
Domain and hostionDomain and hostion
Domain and hostion
 
ECS 2018: Introduction to Azure Web Applications
ECS 2018: Introduction to Azure Web ApplicationsECS 2018: Introduction to Azure Web Applications
ECS 2018: Introduction to Azure Web Applications
 
Benefits of developing single page web applications using angular js
Benefits of developing single page web applications using angular jsBenefits of developing single page web applications using angular js
Benefits of developing single page web applications using angular js
 
SenchaCon 2016: Cross-Platform Mobile App Development with Cordova and Visual...
SenchaCon 2016: Cross-Platform Mobile App Development with Cordova and Visual...SenchaCon 2016: Cross-Platform Mobile App Development with Cordova and Visual...
SenchaCon 2016: Cross-Platform Mobile App Development with Cordova and Visual...
 
Apps for SharePoint 2013
Apps for SharePoint 2013Apps for SharePoint 2013
Apps for SharePoint 2013
 
Active Server Page(ASP)
Active Server Page(ASP)Active Server Page(ASP)
Active Server Page(ASP)
 
Azure basics
Azure basicsAzure basics
Azure basics
 
Introducing Office Web Apps as a Tool for Developing Content Rich Applications
Introducing Office Web Apps as a Tool for Developing Content Rich ApplicationsIntroducing Office Web Apps as a Tool for Developing Content Rich Applications
Introducing Office Web Apps as a Tool for Developing Content Rich Applications
 
[Struyf] Automate Your Tasks With Azure Functions
[Struyf] Automate Your Tasks With Azure Functions[Struyf] Automate Your Tasks With Azure Functions
[Struyf] Automate Your Tasks With Azure Functions
 
Mule integration with linkedin
Mule integration with linkedinMule integration with linkedin
Mule integration with linkedin
 
Dreamforce 2018 Locker Service
Dreamforce 2018 Locker ServiceDreamforce 2018 Locker Service
Dreamforce 2018 Locker Service
 
Mule Anypoint API Gateway
Mule Anypoint API GatewayMule Anypoint API Gateway
Mule Anypoint API Gateway
 

Similar a Build Modern Web Apps Using ASP.NET Web API and AngularJS

APIdays San Francisco, 06/22/2013
APIdays San Francisco, 06/22/2013APIdays San Francisco, 06/22/2013
APIdays San Francisco, 06/22/2013Jerome Louvel
 
From Web APIs to Cross-Device Web Sites
From Web APIs to Cross-Device Web SitesFrom Web APIs to Cross-Device Web Sites
From Web APIs to Cross-Device Web SitesRestlet
 
Role of Rest vs. Web Services and EI
Role of Rest vs. Web Services and EIRole of Rest vs. Web Services and EI
Role of Rest vs. Web Services and EIWSO2
 
Azure Functions Real World Examples
Azure Functions Real World Examples Azure Functions Real World Examples
Azure Functions Real World Examples Yochay Kiriaty
 
The future of web development write once, run everywhere with angular js an...
The future of web development   write once, run everywhere with angular js an...The future of web development   write once, run everywhere with angular js an...
The future of web development write once, run everywhere with angular js an...Mark Leusink
 
The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...Mark Roden
 
REST API Recommendations
REST API RecommendationsREST API Recommendations
REST API RecommendationsJeelani Shaik
 
Custom Development in SharePoint – What are my options now?
Custom Development in SharePoint – What are my options now?Custom Development in SharePoint – What are my options now?
Custom Development in SharePoint – What are my options now?Talbott Crowell
 
Progressive Web Apps and React
Progressive Web Apps and ReactProgressive Web Apps and React
Progressive Web Apps and ReactMike Melusky
 
Angular jS Introduction by Google
Angular jS Introduction by GoogleAngular jS Introduction by Google
Angular jS Introduction by GoogleASG
 
apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...
apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...
apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...apidays
 
Web Applications Development with MEAN Stack
Web Applications Development with MEAN StackWeb Applications Development with MEAN Stack
Web Applications Development with MEAN StackShailendra Chauhan
 
Escaping the yellow bubble - rewriting Domino using MongoDb and Angular
Escaping the yellow bubble - rewriting Domino using MongoDb and AngularEscaping the yellow bubble - rewriting Domino using MongoDb and Angular
Escaping the yellow bubble - rewriting Domino using MongoDb and AngularMark Leusink
 
ASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiTiago Knoch
 
Single page applications with backbone js
Single page applications with backbone jsSingle page applications with backbone js
Single page applications with backbone jsGil Fink
 
Developer’s Independence Day: Introducing the SharePoint App Model
Developer’s Independence Day:Introducing the SharePoint App ModelDeveloper’s Independence Day:Introducing the SharePoint App Model
Developer’s Independence Day: Introducing the SharePoint App Modelbgerman
 
What's New in .Net 4.5
What's New in .Net 4.5What's New in .Net 4.5
What's New in .Net 4.5Malam Team
 

Similar a Build Modern Web Apps Using ASP.NET Web API and AngularJS (20)

APIdays San Francisco, 06/22/2013
APIdays San Francisco, 06/22/2013APIdays San Francisco, 06/22/2013
APIdays San Francisco, 06/22/2013
 
From Web APIs to Cross-Device Web Sites
From Web APIs to Cross-Device Web SitesFrom Web APIs to Cross-Device Web Sites
From Web APIs to Cross-Device Web Sites
 
Role of Rest vs. Web Services and EI
Role of Rest vs. Web Services and EIRole of Rest vs. Web Services and EI
Role of Rest vs. Web Services and EI
 
Mini-Training: Let's have a rest
Mini-Training: Let's have a restMini-Training: Let's have a rest
Mini-Training: Let's have a rest
 
Azure Functions Real World Examples
Azure Functions Real World Examples Azure Functions Real World Examples
Azure Functions Real World Examples
 
SharePoint 2013 - What's New
SharePoint 2013 - What's NewSharePoint 2013 - What's New
SharePoint 2013 - What's New
 
The future of web development write once, run everywhere with angular js an...
The future of web development   write once, run everywhere with angular js an...The future of web development   write once, run everywhere with angular js an...
The future of web development write once, run everywhere with angular js an...
 
The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...
 
REST API Recommendations
REST API RecommendationsREST API Recommendations
REST API Recommendations
 
Custom Development in SharePoint – What are my options now?
Custom Development in SharePoint – What are my options now?Custom Development in SharePoint – What are my options now?
Custom Development in SharePoint – What are my options now?
 
Progressive Web Apps and React
Progressive Web Apps and ReactProgressive Web Apps and React
Progressive Web Apps and React
 
Angular jS Introduction by Google
Angular jS Introduction by GoogleAngular jS Introduction by Google
Angular jS Introduction by Google
 
apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...
apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...
apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...
 
Web Applications Development with MEAN Stack
Web Applications Development with MEAN StackWeb Applications Development with MEAN Stack
Web Applications Development with MEAN Stack
 
Escaping the yellow bubble - rewriting Domino using MongoDb and Angular
Escaping the yellow bubble - rewriting Domino using MongoDb and AngularEscaping the yellow bubble - rewriting Domino using MongoDb and Angular
Escaping the yellow bubble - rewriting Domino using MongoDb and Angular
 
ASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiASP.NET Mvc 4 web api
ASP.NET Mvc 4 web api
 
Single page applications with backbone js
Single page applications with backbone jsSingle page applications with backbone js
Single page applications with backbone js
 
Developer’s Independence Day: Introducing the SharePoint App Model
Developer’s Independence Day:Introducing the SharePoint App ModelDeveloper’s Independence Day:Introducing the SharePoint App Model
Developer’s Independence Day: Introducing the SharePoint App Model
 
What's New in .Net 4.5
What's New in .Net 4.5What's New in .Net 4.5
What's New in .Net 4.5
 
Meanstack overview
Meanstack overviewMeanstack overview
Meanstack overview
 

Último

Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 

Último (20)

Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 

Build Modern Web Apps Using ASP.NET Web API and AngularJS

  • 1. Build Modern Web Apps using ASP.NET Web API & AngularJS Taiseer Joudeh Senior IT Team Lead at Aramex Twitter : @tjoudeh Blog: http://bitof tech.net
  • 2. Agenda • Deep dive into ASP.NET Web API • REST Specifications • Build RESTful HTTP service using Web API • Single Page Applications Overview • SPA Frameworks • Build simple SPA using AngularJS • Host the project on Microsoft Azure
  • 3. What is ASP.NET Web API? • Framework for building HTTP based services • Use HTTP is application protocol • Designed for broad reach (To any client speaks HTTP!) • HTTP != REST • The framework does not enforce an architectural style • Can be used with: • ASP.NET Web Forms • ASP.NET MVC
  • 4. ASP.NET Web API Features • Built on top of ASP.NET Stack • Native Support for ASP.NET Routing • Convention over Configuration • Native abstraction on top of raw HTTP protocol • Brand new HTTP client toolkit • High level of scalability on architecture and on the cloud • Easily build RESTful compliant Services
  • 5. What is RESTful Services? • REST = Representation State Transfer • Stateless architect which runs over HTTP (Not a protocol) • Four basic design principals for RESTful services: 1. Use HTTP Verbs only to interact with resources 2. Interaction with resources is stateless, request/response contain all information 3. Resources identified by URIs only (Services Discovery) 4. Content Negotiation (Support for XML/JSON)
  • 6. Resources in RESTful Services Operation HTTP Verb ResourceURI Get all students GET /api/students Create a new student POST /api/students Get a student GET /api/students/{username} Update a student PUT /api/students/{username} Delete a student DELETE /api/students/{username}
  • 7. Why to build RESTful Services? • Can be easily consumed by any client (Mobile Apps, SPA, Desktop Apps, Service to Service, etc…) • Lightweight (No XML parsing, less bandwidth, just the payloads) • Easier to learn and build, you can get up running quickly. • Closer to Web design specification, all about HTTP protocol.
  • 9. To implement a Web API….. • Derive from API Controller • Implement your HTTP Methods • Maps URI space to your API controllers • Ex: api/{controller}/{id} • {controller} + “Controller ” = ApiController Type Name • Simple types are taken from URI • Route data, query parameters • Complex types come from the body • MediaTypeFormaters are configured to deserialize request body based on content type • JSON, XML, and form-url-encoded are supported out of the box
  • 10. Demo
  • 11. What is SPA? • Single Page Application – Bad Name maybe! (Rich Web Applications) • Load all necessary resources up-front with single page load (shell page) • Bring the desktop experience to the web – Partial loads • Built entirely with JS and HTML
  • 12. Motivations to build SPA • Rich user experience – faster responses • Reduce round tripping between client and the server • Reach – SPAs can reach different users on different platforms.
  • 13. SPA Architecture Philosophy • Thin Stateless Server • Role is a service (RESTful API is important) • Stateless server…easy to scale • Strong separation of concerns which leads to lower network latency, less bandwidth usage, snappy response • MVC at the Client • View: sets on top of the architecture (Think of page). • Model: set at the bottom of the architecture, holds the data for the view • Controller: Sets in between, orchestrator between View and Model, handle business logic
  • 14. SPA Frameworks • Consider framework with features: • Browser history management (Support for back button) • Templating engine (Mustache, Handlebars, etc…) • Two way data binding • Routing service • Framework examples: • AngularJS • EmberJS • BackboneJS