SlideShare a Scribd company logo
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!

More Related Content

What's hot (20)

PPTX
New microsoft office power point presentation
teach4uin
 
PDF
SharePoint App Types at a Glance
David J Rosenthal
 
PPTX
Salesforce UI API (TDXGG'18)
Rahul Malhotra
 
PPTX
MVC-3 Vs Webform
Jitendra Soni
 
PPTX
Introduction ASP
FaTin GhaZmi
 
PPTX
Mulesoft Salesforce Connector - OAuth 2.0 JWT Bearer
Vince Soliza
 
PPTX
Essential Knowledge for SharePoint Add-Ins
InnoTech
 
PPTX
Everybody loves Swagger
BizTalk360
 
DOCX
Domain and hostion
university of Gujrat, pakistan
 
PPTX
ECS 2018: Introduction to Azure Web Applications
Eric Shupps
 
PPTX
Benefits of developing single page web applications using angular js
Harbinger Systems - HRTech Builder of Choice
 
PPTX
SenchaCon 2016: Cross-Platform Mobile App Development with Cordova and Visual...
Sencha
 
PPTX
Apps for SharePoint 2013
Melick Baranasooriya
 
PPT
Active Server Page(ASP)
Keshab Nath
 
PPTX
Azure basics
Jitendra Soni
 
PPTX
Introducing Office Web Apps as a Tool for Developing Content Rich Applications
Ryan McIntyre
 
PDF
[Struyf] Automate Your Tasks With Azure Functions
European Collaboration Summit
 
PPTX
Mule integration with linkedin
Khasim Saheb
 
PPTX
Dreamforce 2018 Locker Service
Rahul Malhotra
 
PPTX
Mule Anypoint API Gateway
rkulandaivel
 
New microsoft office power point presentation
teach4uin
 
SharePoint App Types at a Glance
David J Rosenthal
 
Salesforce UI API (TDXGG'18)
Rahul Malhotra
 
MVC-3 Vs Webform
Jitendra Soni
 
Introduction ASP
FaTin GhaZmi
 
Mulesoft Salesforce Connector - OAuth 2.0 JWT Bearer
Vince Soliza
 
Essential Knowledge for SharePoint Add-Ins
InnoTech
 
Everybody loves Swagger
BizTalk360
 
Domain and hostion
university of Gujrat, pakistan
 
ECS 2018: Introduction to Azure Web Applications
Eric Shupps
 
Benefits of developing single page web applications using angular js
Harbinger Systems - HRTech Builder of Choice
 
SenchaCon 2016: Cross-Platform Mobile App Development with Cordova and Visual...
Sencha
 
Apps for SharePoint 2013
Melick Baranasooriya
 
Active Server Page(ASP)
Keshab Nath
 
Azure basics
Jitendra Soni
 
Introducing Office Web Apps as a Tool for Developing Content Rich Applications
Ryan McIntyre
 
[Struyf] Automate Your Tasks With Azure Functions
European Collaboration Summit
 
Mule integration with linkedin
Khasim Saheb
 
Dreamforce 2018 Locker Service
Rahul Malhotra
 
Mule Anypoint API Gateway
rkulandaivel
 

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

PDF
From Web APIs to Cross-Device Web Sites
Restlet
 
PDF
APIdays San Francisco, 06/22/2013
Jerome Louvel
 
PDF
Role of Rest vs. Web Services and EI
WSO2
 
PPTX
Mini-Training: Let's have a rest
Betclic Everest Group Tech Team
 
PPTX
Azure Functions Real World Examples
Yochay Kiriaty
 
PPTX
SharePoint 2013 - What's New
AdventosConsulting
 
PPTX
The future of web development write once, run everywhere with angular.js and ...
Mark Roden
 
PDF
The future of web development write once, run everywhere with angular js an...
Mark Leusink
 
PDF
REST API Recommendations
Jeelani Shaik
 
PPTX
Custom Development in SharePoint – What are my options now?
Talbott Crowell
 
PPTX
Progressive Web Apps and React
Mike Melusky
 
PPTX
Angular jS Introduction by Google
ASG
 
PDF
apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...
apidays
 
PPTX
Web Applications Development with MEAN Stack
Shailendra Chauhan
 
PDF
Escaping the yellow bubble - rewriting Domino using MongoDb and Angular
Mark Leusink
 
PPTX
ASP.NET Mvc 4 web api
Tiago Knoch
 
PDF
Single page applications with backbone js
Gil Fink
 
PPTX
Developer’s Independence Day: Introducing the SharePoint App Model
bgerman
 
PPTX
What's New in .Net 4.5
Malam Team
 
PPTX
Meanstack overview
Adthasid Sabmake
 
From Web APIs to Cross-Device Web Sites
Restlet
 
APIdays San Francisco, 06/22/2013
Jerome Louvel
 
Role of Rest vs. Web Services and EI
WSO2
 
Mini-Training: Let's have a rest
Betclic Everest Group Tech Team
 
Azure Functions Real World Examples
Yochay Kiriaty
 
SharePoint 2013 - What's New
AdventosConsulting
 
The future of web development write once, run everywhere with angular.js and ...
Mark Roden
 
The future of web development write once, run everywhere with angular js an...
Mark Leusink
 
REST API Recommendations
Jeelani Shaik
 
Custom Development in SharePoint – What are my options now?
Talbott Crowell
 
Progressive Web Apps and React
Mike Melusky
 
Angular jS Introduction by Google
ASG
 
apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...
apidays
 
Web Applications Development with MEAN Stack
Shailendra Chauhan
 
Escaping the yellow bubble - rewriting Domino using MongoDb and Angular
Mark Leusink
 
ASP.NET Mvc 4 web api
Tiago Knoch
 
Single page applications with backbone js
Gil Fink
 
Developer’s Independence Day: Introducing the SharePoint App Model
bgerman
 
What's New in .Net 4.5
Malam Team
 
Meanstack overview
Adthasid Sabmake
 
Ad

Recently uploaded (20)

PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
PDF
Market Insight : ETH Dominance Returns
CIFDAQ
 
PPTX
Agentic AI in Healthcare Driving the Next Wave of Digital Transformation
danielle hunter
 
PDF
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
PPTX
Agile Chennai 18-19 July 2025 | Workshop - Enhancing Agile Collaboration with...
AgileNetwork
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PDF
TrustArc Webinar - Navigating Data Privacy in LATAM: Laws, Trends, and Compli...
TrustArc
 
PDF
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PPTX
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
PDF
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PPTX
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
PPTX
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
PPTX
AVL ( audio, visuals or led ), technology.
Rajeshwri Panchal
 
PDF
RAT Builders - How to Catch Them All [DeepSec 2024]
malmoeb
 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
Market Insight : ETH Dominance Returns
CIFDAQ
 
Agentic AI in Healthcare Driving the Next Wave of Digital Transformation
danielle hunter
 
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
Agile Chennai 18-19 July 2025 | Workshop - Enhancing Agile Collaboration with...
AgileNetwork
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
TrustArc Webinar - Navigating Data Privacy in LATAM: Laws, Trends, and Compli...
TrustArc
 
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
The Future of Artificial Intelligence (AI)
Mukul
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
AVL ( audio, visuals or led ), technology.
Rajeshwri Panchal
 
RAT Builders - How to Catch Them All [DeepSec 2024]
malmoeb
 
Ad

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