Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Angular2 with ASP.NET Core
Search
David M Pine
April 07, 2017
Programming
61
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Angular2 with ASP.NET Core
David M Pine
April 07, 2017
More Decks by David M Pine
See All by David M Pine
You don't need glasses to C#
ievangelist
1
92
2016 //build/ recap
ievangelist
0
47
Other Decks in Programming
See All in Programming
Rでドレミ/Do-Re-Mi_with_R
florets1
0
130
Agents on Rails - Rails at Scale 2026
irinanazarova
0
560
AWSに止められる覚悟してますか?
morizo_1984
2
540
Verilogで学ぶCPU自作入門
uyuki234
8
4.1k
月間100万人のサービス刷新で、 技術選定をHonoに振り切った話
yutobara
8
6.6k
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
220
Findy - エンジニア向け会社紹介/Findy Company Deck
findyinc
6
400k
TechTown - Creating Composable Callables in Contemporary C++
rollbear
0
130
FactoryBotをやめればRSpecは速くなるのか?
yuta_onishi_97
0
460
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3.7k
SalesForceを内製化!? ~ HR事業を支える顧客管理基盤のインフラを大公開 ~
oku053
0
180
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
260
Featured
See All Featured
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.2k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
550
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
430
Crafting Experiences
bethany
1
380
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
950
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
310
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
800
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
520
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
730
We Are The Robots
honzajavorek
0
400
The Limits of Empathy - UXLibs8
cassininazir
2
720
Transcript
ANGUL AR2 WITH AN ASP.NET CORE BACKEND, HAPPINESS ENSUES... B
Y DAV I D P I N E
AGENDA • Introduction • Set the stage • Angular2 •
ASP.NET Core • The “I Do’s” – marriage ceremony • Question & Answers
DAVID PINE { @davidpine7 } < TECHNICAL EVANGELIST /> •
http://davidpine.net • https://github.com/ievangelist • http://stackoverflow.com/users/2410379/david-pine • https://www.linkedin.com/in/dpine
SET THE STAGE T H E WO R L D
- W I D E W E B ? !
LEGACY WEB HyperText Markup Language [ HTML, 1993 ] Cascading
Style Sheets [ CSS, 1996 ] JavaScript [ JS, 1995 ] Originally designed to serve as a static document. Applications were typically a few hundred lines at most…
DEAD-TO-ME WEB ASP.NET Proper • WebForms – ViewState, Page Lifecycle,
Postbacks, HTML abstraction, etc… • MVC – System.Web, Global mutable state, Page Load/Request, API vs MVC
THINGS THEY GOT RIGHT MVC • Testable • Separation of
concerns • Stateless • HTTP verbs • CSHTML (somewhat) WEBFORMS
MODERN WEB / ARCHITECTURE Single Page Application [ SPA, 2003
] • Initial page load is a drag… ¯\_(ツ)_/¯ • Client-side routing • Full control over HTML • Closer to the problem domain (web dev)
OF APPROVAL ANGULAR Is built with TypeScript VISUAL STUDIO CODE
Is built with Chromium
None
OPEN SOURCE Angular –https://github.com/angular TypeScript –https://github.com/microsoft/typescript ASP.NET Core –https://github.com/aspnet
OPEN SOURCE watch branch compare code commit pull request merge
star
ANGULAR (2+) N OT A N G U L A
R J S ( 1 + )
ANGULAR •Modules •Components •Pipes •Templating
Angular Modules help organize an application into cohesive blocks of
functionality. app.module.ts MODULES
import { NgModule } from '@angular/core'; import { RouterModule }
from '@angular/router'; import { UniversalModule } from 'angular2-universal'; import { AppComponent } from './components/app/app.component‘ import { HomeComponent } from './components/home/home.component'; @NgModule({ bootstrap: [ AppComponent ], declarations: [ AppComponent, HomeComponent ], imports: [ UniversalModule, // Imports BrowserModule, HttpModule, and JsonpModule RouterModule.forRoot([ { path: '', redirectTo: 'home', pathMatch: 'full' }, { path: 'home', component: HomeComponent }, { path: '**', redirectTo: 'home' } ]) ] }) export class AppModule { }
Angular Component are the most basic building block of an
UI in an Angular application. app.component.ts COMPONENTS
import { Component } from '@angular/core'; @Component({ selector: 'home', templateUrl:
'./home.component.html' }) export class HomeComponent { } <div> <home></home> </div> Component Class Impl Example Usage
Angular Pipes transform displayed values within a template. datetime.pipe.ts PIPES
import { Pipe, PipeTransform } from '@angular/core'; @Pipe({ name: date'
}) export class DatePipe implements PipeTransform { transform(date: Date, format?: string): string { // Omitted for brevity ... } } <div> {{ dateOfBirth | date:shortDate }} // Outputs as 7/7/1984 </div> Pipe Class Impl Example Usage
Angular Templates in Angular, the component plays the part of
the controller/viewmodel, and the template represents the view. home.component.html TEMPLATING
HTML Plus Interpolation ( {{...}} ) Template expressions Template statements
Binding syntax Property binding ( [property] ) Attribute, class, and style bindings Event binding ( (event) ) Two-way data binding ( [(...)] ) Built-in directives Built-in attribute directives NgClass NgStyle NgModel ([(ngModel)]) Built-in structural directives NgIf NgFor Template input variables Microsyntax The NgSwitch directives Template reference variables ( #var ) Input and output properties ( @Input and @Output ) Template expression operators pipe ( | ) safe navigation operator ( ?. )
ASP.NET CORE N OT A S P. N E T
5
ASP.NET CORE • Middleware • Dependency Injection • Strongly-typed Config
• Logging • Web API • C#
PUTTING IT ALL TOGETHER Azure DocumentDb (Data Store) ASP.NET Core
(Web Server) Angular (Clients)
DEMO (ALL THE THINGS) – “I DO’S”
{ THANK YOU } < source code /> https://github.com/ievangelist/IEvangelist.Angular