Introduction of ASP.NET MVC
and AngularJS
Core concepts and case study
Beginner Level
By: Mohamed Elkhodary
AGENDA
• ASP.NET MVC
• What is MVC?
• Separation of concern.
• Create a new app.
• Add a controller.
• Add a view.
• Add a model.
• AngularJS
• What is AngularJS?
• Directives.
• Downloading the libraries.
• Definitions.
• Case Study
• Using ASP.NET MVC and AngularJS in one of company’s product.
ASP.NET MVC
Introduction
MVC | What is MVC?
The ASP.NET MVC is a web application framework developed by
Microsoft, which implements the model–view–controller (MVC)
pattern.
• A model represents the classes that represent the data of the app and that
use validation logic to enforce business rules for that data. .
• A controller represents the classes that handle browser requests, retrieve
model data, and then specify view templates that return a response to the
view.
• A view accepts necessary information from the controller and renders a user
interface to display that information.
MVC | Separation of concern
• Separate the different aspects of the app (input logic, business logic,
and UI logic).
• Provide a loose coupling between these elements.
• This separation helps you manage complexity, because it enables you
to work on one aspect of the implementation at a time without
impacting the code of another.
• For example, you can work on the view code without depending on
the business logic code.
MVC | Create a new app
MVC | Create a new app
MVC | Create a new app
MVC | Create a new app
MVC | Model – View - Controller
MVC | Add a controller
MVC | Add a controller
MVC | Add a controller
When you run the app and don’t supply any URL segments, it defaults
to the “Home” controller and the “Index” method specified in the
template line highlighted below that can be find in the Startup.cs file.
MVC | Add a controller
The controller now doing the “VC” portion of MVC - that is, the view
and controller work. The controller is returning HTML directly.
MVC | Add a view
MVC | Add a view
• The Index method below uses a view template to generate an HTML
response to the browser.
• Controller methods (also known as action methods), such as the
Index method below, generally return an IActionResult (or a class
derived from ActionResult), not primitive types like string.
Controller
MVC | Add a view
View
Controller
MVC | Add a view
Displayed data “Hello from our View Template!” is hard-coded.
The MVC application has a “V” (view) and you’ve got a “C” (controller),
but how to pass dynamic data?
MVC | Passing data from the controller to the
view
Controller
View
MVC | Passing data from the controller to the
view
MVC | Controller vs View
• Controllers are responsible for providing whatever data or objects are
required in order for a view template to render a response to the
browser.
• A best practice: A view template should never perform business logic
or interact with a database directly.
• A view template should work only with the data that’s provided to it
by the controller.
• Maintaining this “separation of concerns” helps keep your code clean,
testable and more maintainable.
MVC | Add a model
• In Solution Explorer, right click the Models folder > Add > Class.
AngularJS
Introduction
AngularJS | What is AngularJS?
• AngularJS or Angular.js is an open-source web application framework
mainly maintained by Google.
• A client-side JavaScript Framework for adding interactivity to HTML.
• It aims to simplify both the development and the testing of such
applications by providing a framework for client-side model–view–
controller (MVC) architecture.
AngularJS | What is AngularJS?
How do we tell our HTML when to trigger our JavaScript?
AngularJS | What is AngularJS?
How do we tell our HTML when to trigger our AngularJS?
AngularJS | Directives
A Directive is a marker on a HTML tag that tells Angular to run or
reference some JavaScript code.
AngularJS | Downloading the libraries
https://angularjs.org/
AngularJS | Try it in Plunker!
https://embed.plnkr.co/dbCEOw/
AngularJS | Definitions
Directives
HTML annotations
that trigger
JavaScript
behaviors
Modules
Where our
application
components live
Controllers
Where we add
application
behavior behind
the DOM
Expressions
How values get
displayed within the
page
Case Study
Let’s discover how ASP.NET MVC and AngularJS can work together.
References
• http://www.asp.net/mvc
• https://angularjs.org/
Thank You

More Related Content

PPTX
AngularJS Scopes
PPTX
Building great spa’s with angular js, asp.net mvc and webapi
PPTX
ASP.NET MVC, AngularJS CRUD for Azerbaijan Technical University
PPTX
Angular on ASP.NET MVC 6
PDF
End to-End SPA Development Using ASP.NET and AngularJS
PDF
Introduction to ASP.NET MVC
PPTX
Introduction to ASP.NET MVC
PPTX
Valentine with Angular js - Introduction
AngularJS Scopes
Building great spa’s with angular js, asp.net mvc and webapi
ASP.NET MVC, AngularJS CRUD for Azerbaijan Technical University
Angular on ASP.NET MVC 6
End to-End SPA Development Using ASP.NET and AngularJS
Introduction to ASP.NET MVC
Introduction to ASP.NET MVC
Valentine with Angular js - Introduction

What's hot (20)

PPTX
Angular vs React: Building modern SharePoint interfaces with SPFx
PPTX
Webinar MVC6
PPTX
Getting started with MVC 5 and Visual Studio 2013
PDF
Angular js - 10 reasons to choose angularjs
PPTX
Angular js tutorial slides
PPTX
Latest Javascript MVC & Front End Frameworks 2017
PPTX
Javascript Frameworks Comparison - Angular, Knockout, Ember and Backbone
PPTX
Discuss About ASP.NET MVC 6 and ASP.NET MVC 5
PPTX
MVC 6 Introduction
PPTX
React or Angular and SharePoint Framework Development
PPTX
Asp.net mvc 5 course module 1 overview
PPTX
Angular 4
PPTX
AngularJS vs React JS vs Node JS: Which is Best For Web Development ?
PPTX
AngularJS is awesome
PDF
SpringPeople Introduction to Spring Framework
PPTX
Introducing ASP.NET Core 2.0
PPTX
ASP.NET 5 Overview for Apex Systems
PDF
Introduction to React Native
PPTX
Modern Applications With Asp.net Core 5 and Vue JS 3
PPTX
Building rest services using aspnetwebapi
Angular vs React: Building modern SharePoint interfaces with SPFx
Webinar MVC6
Getting started with MVC 5 and Visual Studio 2013
Angular js - 10 reasons to choose angularjs
Angular js tutorial slides
Latest Javascript MVC & Front End Frameworks 2017
Javascript Frameworks Comparison - Angular, Knockout, Ember and Backbone
Discuss About ASP.NET MVC 6 and ASP.NET MVC 5
MVC 6 Introduction
React or Angular and SharePoint Framework Development
Asp.net mvc 5 course module 1 overview
Angular 4
AngularJS vs React JS vs Node JS: Which is Best For Web Development ?
AngularJS is awesome
SpringPeople Introduction to Spring Framework
Introducing ASP.NET Core 2.0
ASP.NET 5 Overview for Apex Systems
Introduction to React Native
Modern Applications With Asp.net Core 5 and Vue JS 3
Building rest services using aspnetwebapi
Ad

Viewers also liked (8)

PDF
Client Side MVC & Angular
PDF
Einführung in React
PDF
AngularJS 101 - Everything you need to know to get started
PDF
PMP Chap 7 - Project Cost Management - Part 2
PDF
PMPProcessGroupTasks
PPTX
Introduction to Web Architecture
PDF
PMBOK-5th ed: PMP- Flashcards Part1/5
PDF
PMP Chap 7 - Project Cost Management - Part 1
Client Side MVC & Angular
Einführung in React
AngularJS 101 - Everything you need to know to get started
PMP Chap 7 - Project Cost Management - Part 2
PMPProcessGroupTasks
Introduction to Web Architecture
PMBOK-5th ed: PMP- Flashcards Part1/5
PMP Chap 7 - Project Cost Management - Part 1
Ad

Similar to Introduction of ASP.NET MVC and AngularJS (20)

PPT
Asp.net mvc
PPTX
MVC Framework
PPTX
Model view controller (mvc)
PDF
ASP.Net | Sabin Saleem
PPTX
Intoduction to Angularjs
PPTX
Introduction to mvc architecture
PDF
Top 40 MVC Interview Questions and Answers | Edureka
PPTX
Single page application 03
PPT
Web engineering - MVC
PPT
Mvc 130330091359-phpapp01
PPTX
PDF
Asp 1a-aspnetmvc
PDF
Aspnetmvc 1
PPTX
Technoligent providing custom ASP.NET MVC development services
PPT
Mvc architecture
PPTX
Angularjs overview
PPTX
Sitecore mvc
PPTX
Very basic of asp.net mvc with c#
PPTX
Asp.net mvc
MVC Framework
Model view controller (mvc)
ASP.Net | Sabin Saleem
Intoduction to Angularjs
Introduction to mvc architecture
Top 40 MVC Interview Questions and Answers | Edureka
Single page application 03
Web engineering - MVC
Mvc 130330091359-phpapp01
Asp 1a-aspnetmvc
Aspnetmvc 1
Technoligent providing custom ASP.NET MVC development services
Mvc architecture
Angularjs overview
Sitecore mvc
Very basic of asp.net mvc with c#

Recently uploaded (20)

PPTX
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
PPTX
"Secure File Sharing Solutions on AWS".pptx
PPTX
Download Adobe Photoshop Crack 2025 Free
PPTX
Introduction to Windows Operating System
PDF
Topaz Photo AI Crack New Download (Latest 2025)
PDF
Ableton Live Suite for MacOS Crack Full Download (Latest 2025)
PDF
Microsoft Office 365 Crack Download Free
PPTX
Tech Workshop Escape Room Tech Workshop
PDF
AI/ML Infra Meetup | LLM Agents and Implementation Challenges
PDF
MCP Security Tutorial - Beginner to Advanced
PDF
Practical Indispensable Project Management Tips for Delivering Successful Exp...
PDF
Visual explanation of Dijkstra's Algorithm using Python
PPTX
GSA Content Generator Crack (2025 Latest)
PDF
Wondershare Recoverit Full Crack New Version (Latest 2025)
PPTX
Cybersecurity: Protecting the Digital World
PDF
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
PPTX
Computer Software - Technology and Livelihood Education
PDF
AI/ML Infra Meetup | Beyond S3's Basics: Architecting for AI-Native Data Access
PDF
EaseUS PDF Editor Pro 6.2.0.2 Crack with License Key 2025
PDF
iTop VPN Crack Latest Version Full Key 2025
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
"Secure File Sharing Solutions on AWS".pptx
Download Adobe Photoshop Crack 2025 Free
Introduction to Windows Operating System
Topaz Photo AI Crack New Download (Latest 2025)
Ableton Live Suite for MacOS Crack Full Download (Latest 2025)
Microsoft Office 365 Crack Download Free
Tech Workshop Escape Room Tech Workshop
AI/ML Infra Meetup | LLM Agents and Implementation Challenges
MCP Security Tutorial - Beginner to Advanced
Practical Indispensable Project Management Tips for Delivering Successful Exp...
Visual explanation of Dijkstra's Algorithm using Python
GSA Content Generator Crack (2025 Latest)
Wondershare Recoverit Full Crack New Version (Latest 2025)
Cybersecurity: Protecting the Digital World
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
Computer Software - Technology and Livelihood Education
AI/ML Infra Meetup | Beyond S3's Basics: Architecting for AI-Native Data Access
EaseUS PDF Editor Pro 6.2.0.2 Crack with License Key 2025
iTop VPN Crack Latest Version Full Key 2025

Introduction of ASP.NET MVC and AngularJS

  • 1. Introduction of ASP.NET MVC and AngularJS Core concepts and case study Beginner Level By: Mohamed Elkhodary
  • 2. AGENDA • ASP.NET MVC • What is MVC? • Separation of concern. • Create a new app. • Add a controller. • Add a view. • Add a model. • AngularJS • What is AngularJS? • Directives. • Downloading the libraries. • Definitions. • Case Study • Using ASP.NET MVC and AngularJS in one of company’s product.
  • 4. MVC | What is MVC? The ASP.NET MVC is a web application framework developed by Microsoft, which implements the model–view–controller (MVC) pattern. • A model represents the classes that represent the data of the app and that use validation logic to enforce business rules for that data. . • A controller represents the classes that handle browser requests, retrieve model data, and then specify view templates that return a response to the view. • A view accepts necessary information from the controller and renders a user interface to display that information.
  • 5. MVC | Separation of concern • Separate the different aspects of the app (input logic, business logic, and UI logic). • Provide a loose coupling between these elements. • This separation helps you manage complexity, because it enables you to work on one aspect of the implementation at a time without impacting the code of another. • For example, you can work on the view code without depending on the business logic code.
  • 6. MVC | Create a new app
  • 7. MVC | Create a new app
  • 8. MVC | Create a new app
  • 9. MVC | Create a new app
  • 10. MVC | Model – View - Controller
  • 11. MVC | Add a controller
  • 12. MVC | Add a controller
  • 13. MVC | Add a controller When you run the app and don’t supply any URL segments, it defaults to the “Home” controller and the “Index” method specified in the template line highlighted below that can be find in the Startup.cs file.
  • 14. MVC | Add a controller The controller now doing the “VC” portion of MVC - that is, the view and controller work. The controller is returning HTML directly.
  • 15. MVC | Add a view
  • 16. MVC | Add a view • The Index method below uses a view template to generate an HTML response to the browser. • Controller methods (also known as action methods), such as the Index method below, generally return an IActionResult (or a class derived from ActionResult), not primitive types like string. Controller
  • 17. MVC | Add a view View Controller
  • 18. MVC | Add a view Displayed data “Hello from our View Template!” is hard-coded. The MVC application has a “V” (view) and you’ve got a “C” (controller), but how to pass dynamic data?
  • 19. MVC | Passing data from the controller to the view Controller View
  • 20. MVC | Passing data from the controller to the view
  • 21. MVC | Controller vs View • Controllers are responsible for providing whatever data or objects are required in order for a view template to render a response to the browser. • A best practice: A view template should never perform business logic or interact with a database directly. • A view template should work only with the data that’s provided to it by the controller. • Maintaining this “separation of concerns” helps keep your code clean, testable and more maintainable.
  • 22. MVC | Add a model • In Solution Explorer, right click the Models folder > Add > Class.
  • 24. AngularJS | What is AngularJS? • AngularJS or Angular.js is an open-source web application framework mainly maintained by Google. • A client-side JavaScript Framework for adding interactivity to HTML. • It aims to simplify both the development and the testing of such applications by providing a framework for client-side model–view– controller (MVC) architecture.
  • 25. AngularJS | What is AngularJS? How do we tell our HTML when to trigger our JavaScript?
  • 26. AngularJS | What is AngularJS? How do we tell our HTML when to trigger our AngularJS?
  • 27. AngularJS | Directives A Directive is a marker on a HTML tag that tells Angular to run or reference some JavaScript code.
  • 28. AngularJS | Downloading the libraries https://angularjs.org/
  • 29. AngularJS | Try it in Plunker! https://embed.plnkr.co/dbCEOw/
  • 30. AngularJS | Definitions Directives HTML annotations that trigger JavaScript behaviors Modules Where our application components live Controllers Where we add application behavior behind the DOM Expressions How values get displayed within the page
  • 31. Case Study Let’s discover how ASP.NET MVC and AngularJS can work together.

Editor's Notes

  • #20: Let’s check this example. The ViewData dictionary object contains data that will be passed to the view.
  • #21: Let’s check this example. The ViewData dictionary object contains data that will be passed to the view.