Bleeding edge ASP.NET
This is a modal window.
The media could not be loaded, either because the server or network failed or because the format is not supported.
Formal Metadata
Title |
| |
Subtitle |
| |
Alternative Title |
| |
Title of Series | ||
Number of Parts | 150 | |
Author | ||
License | CC Attribution - NonCommercial - ShareAlike 3.0 Unported: You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this | |
Identifiers | 10.5446/51447 (DOI) | |
Publisher | ||
Release Date | ||
Language |
Content Metadata
Subject Area | ||
Genre | ||
Abstract |
|
00:00
Web pageTemplate (C++)AlgebraData modelApplication service providerKeyboard shortcutWeb Forms.NET FrameworkGUI widgetProjective planeAudiovisualisierungTemplate (C++)World Wide Web ConsortiumSingle-precision floating-point formatMultiplication signHome pagePoint (geometry)EmailMathematicsMobile appArithmetic meanFacebookReal numberForm (programming)Cartesian coordinate systemGraphical user interfaceType theoryEndliche ModelltheorieWebsiteGoodness of fit.NET FrameworkGame controllerCore dumpPower (physics)Bit rateFamilyInternetworkingRight angleCategory of beingOpen sourceInternet forumBitLevel (video gaming)Formal languageNumberLibrary (computing)QuicksortTape driveSource codeField (computer science)Software developerBuildingApplication service providerGoogle ChromeUMLProgram flowchart
06:43
Data modelKeyboard shortcut.NET FrameworkWeb FormsApplication service providerGUI widgetQuery languageModemUniform resource locatorInternet service providerForm (programming)Home pageSingle-precision floating-point formatMobile appWeb pageInternet service providerComputer fileNP-hardForm (programming)GradientBlock (periodic table)Multiplication signCategory of beingRight angleEndliche ModelltheorieAxiom of choiceType theoryDiagramFlow separationSelectivity (electronic)Keyboard shortcutInternet forumValidity (statistics)Game controllerMappingLevel (video gaming)MereologyHand fanSource codeMenu (computing)Boundary value problemSet (mathematics)Greatest elementThomas BayesPoint (geometry)BitHome pageProjective planeAudiovisualisierungCore dumpWorld Wide Web ConsortiumCodeTemplate (C++)Drop (liquid)Uniform resource locatorDemo (music)HookingInstallation artVisualization (computer graphics)Application service providerCuboidRewritingMobile appDot productComputer animation
13:26
Demo (music)Sample (statistics)Type theoryVisual systemScalable Coherent Interface.NET FrameworkSoftware frameworkApplication service providerPortable communications deviceLibrary (computing)Social classVisualBASICWindows PhonePoint cloudSanitary sewerData modelGUI widgetEuclidean vectorAuthenticationTemplate (C++)Form (programming)Execution unitAlgebraCore dumpEvent horizonComponent-based software engineeringPasswordFacebookGoogolWebsiteControl flowTwitterSoftware testingMobile WebAxiom of choiceProcess (computing)Module (mathematics)Configuration spaceWindowException handlingApplication service providerBitWorld Wide Web ConsortiumSingle-precision floating-point formatHome pageFacebookWeb applicationProjective planeForm (programming)Identity managementAuthenticationMultiplication signPortable communications deviceTemplate (C++)Social classInternet service providerStandard deviationAuthorizationInsertion lossInternetworkingRight angleLibrary (computing)Internet forumChemical equationEndliche ModelltheorieComputer animation
16:40
Demo (music)Right angleBootstrap aggregatingDemo (music)Software developerCuboidSlide ruleProjective planeBitTemplate (C++)Computer fileForm (programming)Flow separationInstance (computer science)TwitterWorld Wide Web ConsortiumFamilyInternet forumDisk read-and-write headArithmetic meanComputer animation
18:12
BuildingApplication service provider.NET FrameworkSoftware frameworkFreewareComponent-based software engineeringDrop (liquid)Scripting languageJava appletBootingOpen setTablet computerSpacetimeProduct (business)VideoconferencingCross-site scriptingAreaNetwork topologyMenu (computing)Data mining1 (number)Bootstrap aggregatingWebsiteBasis <Mathematik>Cross-site scriptingRegular graphForm (programming)Right angleWeb browserInstance (computer science)Default (computer science)Standard deviationGraphical user interfaceDifferent (Kate Ryan album)AreaMobile appTesselationGoodness of fitMathematicsSimilarity (geometry)BootingWorld Wide Web ConsortiumDisk read-and-write headArithmetic progressionGraphics tabletProjective planeInternet forumDrop (liquid)Sound effectMultiplicationProcess (computing)CausalityRoundness (object)Proper mapComputer animation
24:00
Execution unitTablet computerBoom (sailing)SpacetimeRadiusElectronic visual displayGlass floatBlock (periodic table)Application service providerCross-site scriptingAreaBuilding.NET FrameworkScripting languageJava appletPolygon meshVisual systemWeb pagePrincipal ideal domainWebsiteFreewareMenu (computing)Sturm's theoremWitt algebraSocial classLocal GroupHyperlinkBootingOpen setCuboidDivision (mathematics)Row (database)CodeElectronic mailing listMultiplication signSign (mathematics)WordSocial classRight angleStructural loadTelecommunicationBootstrap aggregatingRevision controlContent (media)MathematicsGroup actionWeb browserType theoryExtension (kinesiology)EmulatorExecution unitConnectivity (graph theory)AudiovisualisierungWorld Wide Web ConsortiumHome pageVisualization (computer graphics)HookingConnected spaceMultiplicationStandard deviationCross-site scriptingWebsiteDemo (music)Default (computer science)Application service providerMultilaterationPoint (geometry)Instance (computer science)Entropie <Informationstheorie>Optical disc driveCASE <Informatik>ArmGame controllerQuantumComputer animation
31:24
Web page.NET FrameworkEmulationExecution unitSoftware frameworkWebsiteBuildingComponent-based software engineeringAerodynamicsSurfaceApplication service providerThomas KuhnLibrary (computing)Extension (kinesiology)Visual systemInclusion mapGUI widgetInfinite conjugacy class propertyPhysical systemSpacetimeGeneric programmingString (computer science)SummierbarkeitClass diagramInternet service providerSocial classSource codeControl flowView (database)Web browserGauge theoryGraphical user interfaceCodeMathematical analysisCore dumpElectronic visual displayHome pageData modelCellular automatonStructural equation modelingDefault (computer science)Information managementEndliche ModelltheorieScalable Coherent InterfaceLink (knot theory)Lemma (mathematics)Convex hullMaxima and minimaIdentity managementRow (database)Template (C++).NET FrameworkCartesian coordinate systemFamilyStandard deviationInternet forumEndliche ModelltheorieContext awarenessSocial classHome pageDynamical systemSource codeElectronic visual displayDifferent (Kate Ryan album)Software frameworkView (database)Game controllerEmailAddress spacePasswordFitness functionProjective planeForm (programming)Type theoryMultiplication signSystem administratorCASE <Informatik>AuthenticationRight angleMedical imagingPhysical systemResultantError messageField (computer science)World Wide Web ConsortiumApplication service providerClosed setComputer fileExtension (kinesiology)Goodness of fitGreatest elementString (computer science)Computer animation
38:48
Color managementMaxima and minimaPrisoner's dilemmaPhysical systemString (computer science)Execution unitCausalityLoginEndliche ModelltheorieMIDINormed vector space.NET FrameworkBuildingApplication service providerComa BerenicesKey (cryptography)Gamma functionPort scannerInformation securityLink (knot theory)Data modelWindows AzureView (database)Type theoryAssembly languagePasswordFunction (mathematics)Content (media)InformationPartial derivativeEmailHTTP cookieLine (geometry)OvalBookmark (World Wide Web)Identity managementDemo (music)Application service providerEndliche ModelltheorieCategory of beingSoftware framework.NET FrameworkString (computer science)View (database)WebsitePasswordWorld Wide Web ConsortiumMobile appAuthorizationMultiplication signCartesian coordinate systemField (computer science)DatabasePlanningHuman migrationPhysical systemColor managementInternet service providerGoodness of fitComputer fileUser interfaceAdditionInformationIntrusion detection systemElement (mathematics)BitInstance (computer science)WaveHookingConfiguration spaceSoftware development kitLaptopDependent and independent variablesCodeGame controllerInternetworkingObject (grammar)Right angleProof theorySoftware testingOpen setFigurate numberTouchscreenComputer animation
46:12
Demo (music)Identity management.NET FrameworkApplication service providerLatent heatCAN busWorld Wide Web ConsortiumRoutingGroup actionAttribute grammarOperations support systemTime domainControl flowStapeldateiThermal expansionInclusion mapToken ringPhysical systemServer (computing)Portable communications devicePhysical systemIdentity managementOpen sourceType theoryFlow separationWeb applicationImplementationGame controllerProjective planeElectronic program guideWeb browserInternet service providerCodeApplication service providerWorld Wide Web ConsortiumGroup actionData storage deviceWindowPortable communications deviceCore dumpClient (computing)Template (C++)Focus (optics)HookingElectronic mailing listBit rateMereologyMountain passAttribute grammarStaff (military)Authorization10 (number)Data centerMusical ensembleArithmetic meanQuicksortMobile appRoutingComputer animation
49:10
HierarchyPhysical systemOrder (biology)Game controllerSpacetimeGroup actionRevision controlConstraint (mathematics)Demo (music)Router (computing)OvalCodeQuery languageDefault (computer science)Fluid staticsMaxima and minimaDependent and independent variablesInformationParameter (computer programming)Coma BerenicesComputer configurationWindowGame controllerGroup actionAttribute grammarSoftware testingInternet service providerSystem callKeyboard shortcutHome pageCASE <Informatik>RoutingSound effectMedical imagingWorld Wide Web ConsortiumCodeOrder (biology)Server (computing)Domain nameRevision controlLibrary (computing)Right angle2 (number)Multiplication signCore dumpHTTP cookiePasswordOnline helpWeb browserException handlingFigurate numberEmailSocial classInformationProjective planeLogicDatabaseRun time (program lifecycle phase)Shared memoryWeb applicationWeb pageHazard (2005 film)Open sourceTable (information)Information securityWebsiteSubsetUniform resource locator.NET FrameworkElectronic mailing listIntegerConstraint (mathematics)Electronic program guideSet (mathematics)Error messageImplementationComputer animation
58:41
Application service provider.NET FrameworkDisintegrationClient (computing)Graph (mathematics)Configuration spacePortable communications deviceLibrary (computing)Social classAndroid (robot)Server (computing)Standard deviationSoftware frameworkModule (mathematics)Physical systemData modelInformationUniform resource locatorTask (computing)EmailConnectivity (graph theory)Mobile appLine (geometry)State of matterProjective planeMultiplication signMiddlewareDemo (music)Chain.NET FrameworkDifferent (Kate Ryan album)WebsiteImage resolutionWritingCartesian coordinate systemCodeCASE <Informatik>Web applicationInstance (computer science)Control flowSystem callMessage passingApplication service providerModule (mathematics)Shift operatorForm (programming)Identity managementFunctional (mathematics)WeightDirected graphEntire functionElectronic program guideProgram flowchart
01:01:56
Data typeContent (media)Configuration spacePhysical systemTrigonometryTask (computing)SynchronizationInterface (computing)InformationDependent and independent variablesExpressionMedical imagingAdditionLevel (video gaming)Mathematical optimizationWorld Wide Web ConsortiumDependent and independent variablesLoginMiddlewareDifferent (Kate Ryan album)Web applicationQuicksortHookingCartesian coordinate systemElectronic signatureChainState of matterCodierung <Programmierung>Content (media)Task (computing)Link (knot theory)Line (geometry)Software frameworkHome pageCodeMobile appSign (mathematics)Web pageEntire functionComputer animation
01:05:38
AlgebraTemplate (C++)Application service providerVisual system.NET FrameworkWorld Wide Web ConsortiumIdentity managementPhysical systemAttribute grammarInternet forumBootstrap aggregatingTemplate (C++)Coma BerenicesLevel (video gaming)Identity managementWorld Wide Web ConsortiumCore dumpBuildingComputer animation
01:06:49
Computer virusApplication service providerFrequencyLink (knot theory)ConsistencyCodeFeedbackData typeExpected valueExtension (kinesiology)SpacetimeAttribute grammarBlogVisualization (computer graphics)CodeDemo (music)CASE <Informatik>Staff (military)AudiovisualisierungComputer animation
Transcript: English(auto-generated)
00:02
Oh, okay already Good morning People have warned me about this stage, and I'm feeling it. It's all wobbly up here, so if I just disappear you'll know what happened So we are gonna be talking about bleeding edge asp.net This is me
00:21
We have a podcast booth here at NDC and we're having a lot of fun with that So let's dig right in I'm gonna be talking about Just release stuff and stuff that's coming out soon, and when we've been talking about hey We've got another release visual studio 2013 more asp.net stuff Some people are kind of freaking out a little bit because they're like you know I'm barely keeping up with visual studio 2012, right?
00:46
and They feel like you know they are getting eaten alive, and they're just kind of worried They feel like they're being chased, and they just can't keep up right but What I want you to feel like is instead is you know how Google Chrome just kind of automatically updates, and you get new goodness all the time
01:04
It's like you know you're just good things just keep coming, and you're just enjoying yourself, right? So I want to instead. I want you to feel like with visual studio You know more frequent updates with more frequent asp.net updates that you're not
01:21
Getting in trouble. You're just gaining new powers, so you know you're You're just kind of leveling up And you know you can do more than you've been able to do before All right, that's about all my funny pictures for today Can't keep this rate up all day, so um
01:41
So here's what I'm going to be talking about What's new what bleeding edge asp.net for me that means what came out after asp.net and Visual studio or okay, so visual studio 2012 with asp.net 4.5 MVC 4 Web API 1 so it's you know the big thing that came out last august
02:01
So we're going to start with that and then we're going to talk about what's coming out next all right, so here's how There's release notes that are up on the site for you know what came out in 2012 2012 dot 2 so let me back up for a second how many people here are running visual studio 2012
02:24
Excellent how many of you people have upgraded to update to? Okay, that's pretty good. It makes it easier when it keeps popping up with a little balloon, right? So if you haven't updated to that I recommend you do so if you've got that installed you've got
02:41
asp.net 2012 dot 2 so the idea is You know we used to have like visual studio 2005 and that had asp.net 2.0, and then you wait a few years wait and then giant books would get written about it and then Visual studio 2008 came out and then you had asp.net 3.5
03:03
And then you wait a few more years and a few more years what they're doing now is you know big release or? They're doing big releases And then a lot of refresh updates on top of that the nice thing with that is when you get a big release a lot Of it is just stuff that has been coming out over time anyways So what was in the 2012 dot 2 release that came out in?
03:23
February Didn't change the asp.net core So that's really important to understand if you if I've got that installed if I've got visual studio 2012 dot 2 Installed I build an asp.net site. I take advantage of all the cool new features I zip up the project and I email it to you
03:41
And you haven't got that installed it'll all still work and you can deploy it to your server And that'll all still work, okay So none of the core stuff changed the things that did change our templates and tooling So templates meaning when you do file new project what you see what your project is set up with? And that mostly includes new get packages so a lot of you'll see
04:03
When you do file new project you watch the status bar, and you see all the new get packages being installed that's that's kind of how we're it used to be that a Project template was a very specialized thing and now project templates are really kind of packaging up a lot of new get packages, so
04:20
So we've got new templates we've got you know web forms signal are which graduated from an open source project to a You know real shipping thing from Microsoft web API a lot of updates on that So we saw a lot of people starting to use web API when it was officially released Last august and they wanted a lot of features and so they've been putting a lot of work into web API
04:42
And then with MBC we got two new kinds of templates we got single page application templates Like ember and knock out and all that kind of stuff So it makes it easier to build single page apps, and then we got a Facebook template also, so Then to keep up with that we've got tooling that works with all those features right and also just some cool new things
05:03
Again like I was saying chrome updates every 15 minutes And you know everybody's there's new changes all the time right and people are coming up with new languages and new libraries And so we've been updating the tooling and visual studio so that it's easier for you to take advantage of those things
05:21
Okay, I am going to point out something which is not going to sound super insanely cool But it actually is how many people here are doing web forms development? Okay, double that number because I know there's a bunch of people that don't put their hands up if you're doing web forms development You got to pay attention to this I talk to people all the time I keep bugging them and they say yeah, yeah, actually I mostly do web forms
05:43
And then I'll ask them if they know about these features And they don't and so you're really missing out if you're not taking advantage, so We've got is a little hard to see the important thing. I guess I could zoom, but I'll just tell you And trust me So what we did the old way used to do binding was you had
06:02
Data controls hooked up to some sort of data source it might have been a control or something you said in code behind and It was it was kind of you know just wired up in a weird way And then inside of your control you would set a bunch of things in quotes, and they were just strings So you'd say fill in this field with this property And it was just a string and if you misspell it you don't know until you run the page, right?
06:25
So what we've done now is data controls have a model type so the model type is Defined for that control and once you do that then you can just say item dot so you can databind to item dot first name That is strongly typed
06:41
So there's all kinds of great benefits that come out of that one is if you type it wrong You're gonna know right away. You get the red squiggly. I mean it's it's it's not compiling right Secondly you get intellisense, so you know if it's a currency type Or if it's a date time you can say you know item dot date Dot and then you can fill it you can use the properties on that very easily
07:03
There's probably a bunch of other things, but those are enough right those are good reasons to jump in now that we've got the control Strongly typed the control knows what it is binding to we can do some other cool stuff, so we've got on the on the control, so this is a repeater and
07:23
Instead of getting its data by you know on item databound or any kind of other stuff setting a data source property We can say select method equals And we give it the name of a method and the method just needs to return I queryable or I enumerable Okay, so we say repeater get your data from get customers
07:42
And then get customers is this method down at the bottom and what you'll notice about that This is I queryable, and it's just returning some data It could be pulling it from a service from any framework from and hibernate whatever okay? The important thing is this bottom block of blurry text that you can't read that says nothing about web forms
08:03
There's nothing in there if you looked at it. You'd have no idea. It's web forms. It means the data There's separation of concerns you can share the data access methods and services etc So that is cool Finally oh, and then here you can also bind in those access methods you combine to control properties
08:24
Yes, yeah So good question so so It's they work together so here up at the top We've got repeater, and then we've got item type equals blah blah blah blah blah something dot customer
08:43
And then we have select method equals get customers Exactly yeah, so those two obviously need to match up, right? Okay, then finally when you're inserting data Your since it's strongly typed
09:00
You've got a model we're able to do the exact same type of data updates that you do an MVC That includes try update model all the validation and all that stuff so that means you don't have to say Customer dot first name equals text box first name dot text blah blah blah And you don't have to do null checking and validation and all that you can use all the same MVC
09:22
update binding features All right, I have to point that out because nobody does it nobody knows about it, and it's incredibly cool One other cool thing that they bolted on top of that is Now that everything's kind of strongly typed and everything works pretty close to how things do an MVC We've got a friendly URLs package
09:43
That's included so file new project and MVC or in and web forms If you've got the the newer newest update and going forward it's going to Have this friendly URLs package that means if you've got an ASP X page You can just browse to slash album slash edit slash one you can have those same kind of
10:04
URLs that you would have in you know an MVC app so It's easy to just think okay. That's neat. This is doing URL rewriting. It's actually doing a lot more so I'm gonna fall off this stage before this is over so keep watching Okay, so this one here. I've got album edit one
10:23
This is actually binding on that and so the method here remember we were using a get Get method to populate that data It's actually able to pass that value through from the URL down into the control itself and it pipes out along for you Okay, so super easy to hook things up
10:42
When I do longer demos with this I show it I show it off and the the coolest thing is there's almost no code Everything just kind of maps together really cleanly That's all that's about all I'm talking about for web forms today, but I hope you paid attention for that part if you're using it What we did with MVC was really so you know there were a lot of like new core features and MVC for and then
11:07
In in the 2012 that to release what we did was build a bunch of templates that take advantage of those core features and The way we did that was we set up we changed the templating system if you've ever tried to build a new file new project
11:22
template it's really hard and It's actually still kind of hard, but it's a little easier We went through and changed it so it uses v6 packaging. It's a Visual Studio Installer or a Visual Studio yeah, so Visual Studio installer But it's basically just a zip file with a manifest
11:42
Okay, so a bunch of people have gone out and created other Packages community packages so now it's very easy to set up. You know use ember.js angular breeze knockout Etc Okay Anyone using those? Few people okay cool
12:01
Alright, but you want new things, so let's talk about it, and let me check my time when asp.net I'm supposed to be there at around I'm like right on the money Okay, you've all heard People talking about one asp.net kind of for a while right Scott Hanselman's been doing his Lego blocks You've seen this kind of diagram for a while
12:22
It takes a lot of work, so the idea is when you do file new project You're faced with a choice you have to say am I going to pick an MVC project Am I going to pick a web forums? I'm going to pick web API you have to make that choice well You can pick MVC because you can always just drop web forums into an MVC project pretty easily
12:43
But if you're mostly doing web forums, that's kind of a weird choice, and if you're doing Mostly web forums, but you might want to add an MVC controller. That's hard. That's a world of pain anyone do that I've done talks on it and everyone's just kind of like what are you doing? That's crazy
13:01
and So you know and then we've got all these other Lego blocks in the middle and hooking them all together is Starts to get tricky, so what we've done is kind of broken that apart So instead you can kind of pick off a menu you can say I'd mostly like you know the web forums Template, but I also like a little bit of web API and a little bit MVC
13:21
okay, so we're going to take a look at that and This is early. This is this is keep John up very late at night because the bits don't always completely work early so The dialogue that you'll see here is not beautiful yet. It's going to get better
13:40
But so we do when you do file new project. This is what you see Okay, so we have got just Web application now you've also got portable class library, and that's actually going to be out of there, too That's going to be removed, so when you do file new
14:01
Web you're going to get web application all right. That's it So if you still need to be able to go in and create The older templates that you know if you're relying on older templates They're still there, but that's kind of a you need to go look for that, okay? So generally let's create a new we'll start with a web forms project
14:21
Mostly web forms right so this is what this is going to look like now So now we've got this this choice here where we can say okay? Do we want to go empty web forms MVC web API single page Facebook or mobile right? But you can also say all right. I would like mostly web forms
14:41
But I'm also going to throw in MVC and you know might be web API now the more I check off on here the bigger my project gets it pulls in more new get Packages it does more configuration and all that But it does set all that stuff up for you, and it wires it together, and they all play nicely Okay, so this is actually kind of this alone. This was a huge effort. There are a lot of people working on this
15:07
Asp.net was never really designed for this from the beginning. I mean there were modules and handlers and and You know but mostly asp.net was kind of one thing you know and it kind of worked around web forms And it's been this long process to move to okay
15:21
You know MVC kind of decouples a lot of things and then as you see how things are working with Web API and going forward things are really kind of broken apart more So this is taking a lot of work for the team to do this now another thing in here Is this configure authentication so as I go through and set this up all of them use the same authentication?
15:42
Choices so I can go and say I can say you know no off I'll take care of it myself no off sounds kind of like oauth except nobody can log in I'm not sure Then you have individual organizational windows off so windows off is like you know your standard windows off and then Organizational you can set up to authenticate you know with oauth and things like that so different providers and again
16:03
This is all using the same identity stuff So when you configure it for you know one of these projects, and you've picked mostly web forms But also some web API and MVC they're all going to be working together with that same authentication that makes sense All right
16:21
My time got lots packed in here. Okay good so So then when I go through and click okay, it's your standard standard You know we'll create a project so let us do that before I do that We'll unzoom and make you dizzy
16:43
I've got a few kind of bounce between slides and demos for a bit because I Want to keep up with you keep you up with where we are at but most of this is demo wise so We have changed the file new project templates for all the you know all the new templates are using bootstrap now
17:00
What we had in the past was our own kind of you know everything was Microsoft written and so a lot of effort went into that and But the problem was it was its own kind of separate thing right so for instance recently web forms remember how web forms use or?
17:21
See MVC used to be like the ugly blue background And it had kind of a white box on it, and then it got rounded corners and three I think and then in four They put a lot of work and rewrote the whole template and it was responsive And it used kind of modern more modern layout and CSS, and I had a workable reset in there
17:41
But it was still only Microsoft so the problem is you can't really There there aren't a lot of resources out there Just for that like only MVC developers are writing MVC templates right and so there's not There's not a way to take advantage of that whole ecosystem so Meanwhile some guys is some folks on the Twitter team
18:02
Created something called bootstrap, so who here's using Twitter bootstrap Okay, a lot of people right and it's so it was bootstrap or was Twitter bootstrap And now those those people have actually left Twitter, and now it's just called bootstrap, so I
18:20
Forget let me see bootstrap there it is so what bootstrap does for you is a few things one it gives It has some you know kind of modern looking CSS It has support for a lot of standard things that everyone has to implement themselves for instance if you go
18:43
has things like headings and buttons and and It can even get pretty complex with things like Say progress bars right they have some animated progress bars and all kinds of things they even have Well they have badges you know colored badges so things like that
19:04
Drop-down menus is great right so and that's something that takes a lot of work to do well You know and so here like button drop-downs as an example right that takes a good amount of work to do yourself And then you end up cobbling a lot of things together you find a jQuery plug-in to do one thing you find something else
19:24
So this is kind of this is a well-maintained Actively built project, and there's there is also an ecosystem out there That's doing other themes because a complaint for a while was every bootstrap site looked like a bootstrap site
19:40
It's very kind of noticeable. What what what the design is so There are things like this, so this is boots watch and you can see on here They all still kind of have you know kind of similar big big Areas of the hero areas at the top they call them and buttons and things, but they really do have kind of different looks Okay, so when we go in here. We're back into this. Let's create our web forms and MVC app
20:07
So it's going to spin up and add in Bootstrap and you know pre-configure all that for us all that CSS is pulled in JavaScript etc
20:21
What's that? Yeah, there's one in here. There's a there's a few bootstrap Metro ones. I've been looking at There's there's one in here. It's called Cosmo. That's that's decent, but there's some really nice ones. Yeah So okay, so this is has set up for us a You know final new experience, so let's go ahead and run this and I'll show you one thing that that we can do
20:47
My default browser right now is Chrome I kind of rotate through them all on a regular basis right so So here I could say I would like to launch this with chrome and whoops doing this wrong
21:01
There is a way to multi-select there. It is browse with So I can go in and I'd say when I launch I would like to launch it with Chrome and Firefox and ie right and I can set the browser size. I'll set them all to You know 40 vice or whatever it is 684 wow that's nice
21:27
You know sometimes when it does this it's just playing with you like you say cancel I don't know that one it really did go down. How do you crash like launching the browser? That's crazy Okay, let's let's pretend that didn't happen
21:42
okay, so that's okay, so We'll start that's more fun if I launch a few browsers, but if it does that to us again. We'll just
22:02
We'll go with one And again, this is like not release these are these are you know nightly build kind of things I'll do ie in Chrome. We'll just start with those two, okay Great, so this is spinning up two browsers for us And we can see you know that they're looking the same which is nice
22:23
So one nice thing that bootstrap does that you might not think about is they have a sensible Css reset that kind of changes it removes or changes the padding and differences that browsers have between them It's not as bad anymore, but it used to be you know pretty significant changes, so
22:40
I'm going to go in and tile I'll just stack these up Because I want to show you a cool feature that you may not have seen yet I'm hoping you have not seen yet, okay, so we've got two browsers, and we're working away and one keeps popping up
23:09
We won't let that get us down I'm about to close you browser all right. You're done All right, there we go all right, so I can go in and I can edit these now
23:26
I may want to go in and you know I could I can make html changes But I want to I want to do something a little bigger I actually want to replace our bootstrap theme, so we're looking at this boots watch, so let's go pick a different one out
23:41
So there is that metro looking one. I'm actually going to go with this one here It's Amelia just because it looks you know significantly different actually there's an even there's a darker one here late superhero I'm feeling superhero today Okay, good, so See if I can mess this up
24:03
superhero download Okay, so I'm downloading that CSS now the way everything's implemented It's all CSS driven for the whole site right so I can pick that and just completely replace this CSS Now this is kind of you know how you do for a demo
24:20
I would change this I would use bundling and I would hook it up that way but but I just want to show you quickly what this is able to do, so So we've got our browser here, and then we've got ie over here, and I'm going to shrink that back down Go there, okay, so now I want to save that CSS
24:41
And I'm going to do reload so did you see what happened there? I click this little reload button in the in the toolbar in Visual Studio, and it refreshed both connected browsers Okay, which is pretty useful? What we shipped with Visual Studio 2012? 2012 was a page inspector and page inspectors been getting a lot of like live update things, but this is actually updating
25:07
Multiple connected browsers as we type okay, so now I'll go in and I will Let's change That default page will change some of that text on there Right so here. It says ASP.net. I will say is neat
25:25
Okay, and I'm going to save with I'm going to do control alt enter Now this will actually work across different things we could connect You know mobile emulator we could actually Anything that's connected to this will get those updates and the reason is Visual Studio is actually injecting
25:45
Using its injecting JavaScript that runs a signal our hub, so we'll briefly talk about signal our later, but this is signal our is Important because it's not just one-way communication right that would be good enough if it was just one way
26:02
But this is actually two-way communication between the browser and Visual Studio So we've done kind of the obvious thing first which is push updates from Visual Studio out to the browser But imagine if Visual Studio can watch what your browser is doing and say hey this page is taking too long to load or
26:20
You know we've got a conflict in your JavaScript or whatever it can monitor that right pretty cool Come on. That's cool. If that's not cool. I'm done because Okay, so there. We are with our bootstrap one other thing. I want to show you with bootstrap is I
26:40
have got the Actually, I'm going to go back to There I've gone back but my page is blank because I've deleted everything so I'm going to throw in let me see a button group and
27:01
It's going to have a button Now this is too small. Let me zoom it up But in primary so what I'm typing in here is then code, and I'm using bootstrap classes And I'm going to I can put in content with Zen coding okay, so I'm going to say you know
27:27
Monkey whenever I don't know what word you use when you're coding, but if I just need a word That's usually I'll use monkey Okay, so now I hit tab and what that did is Zen coding and Zen coding actually pulled in using visual studio
27:43
web essentials extension so but Zen coding lets you type CSS selector syntax, and it will then expand out to the HTML that would match that and so then I can go and when I refresh this
28:02
should update and if it doesn't We'll just pretend like it did That's what I get when I did this early. Oh, it's not running now when I did this earlier, I was um I was practicing this with MVC, so
28:21
Okay, so there. I got a row of buttons And and I can I can do all kinds of other things with this so for instance. I'll do one more I'll do pagination, so I'll do so let me make this bigger
28:41
pagination UL so what I'm doing here is these are descendant these these are child selectors So I'm saying I want a pagination div and inside that I want a UL and inside that I want list items and Inside and I want 10 list items So Li times 10 and inside that I want an anchor tag and inside that anchor tag I
29:07
Want to say item and here I put the dollar sign and so that dollar sign is the The thing that's going in and actually I would like it to look a little better So I'm going to put this inside a div that's hero unit
29:23
Okay, hero unit is what they use kind of for that box up at the top So now I do that I hit tab to expand it Okay, so now there's that now if I hit ctrl alt enter That should update my connected browsers
29:40
Missing bootstrap CSS. Yeah, but that should be in the oh, yeah, you're right But still that should be in the master page That's what I get for skipping Skipping to the different one Stay tuned because we'll be showing more of that later actually, I'll come back to this of it if I get time the point that I want to show with this is that
30:06
Assuming you don't do something stupid like I just said It's very easy to take advantage of all those selectors and do quite a bit. So Let me get back to the bootstrap thing that I was showing
30:20
So the idea is that it's not just at first I was kind of like so so on bootstrap. I'll be honest I thought that it was neat But I didn't always like the way it looked and then the themes kind of make up for that some But I still wasn't completely sure but what's really kind of made me think that it's more useful is I can use kind of standard
30:44
I can use standard, you know things for pagination for instance some of these things that are take a while to set up So you can use these components and use standard kind of sensible Styles CSS styles. Okay questions on that that makes sense
31:01
Okay, I Would love to mess with this more but I need to go on because I want to show you scaffolding so What we've had in the past with scaffolding Was kind of a mishmash So we had let's see if I can take this all the way back That's what I should have done Okay, so what we had in the past with
31:25
Actually, oh well What we had in the past with scaffolding was nothing for web forms MVC had its own scaffolding you could right-click and scaffold around a controller Web API had its own different kind of thing We had some kind of extensibility for MVC when we were looking at that with with the whole idea of
31:45
What can we do better with this one ASP.NET thing? We thought scaffolding was was important and in doing that we wanted to do it right for all of these so I'm going to stop this. I'm going to create a quick model We'll take a look at that real quick
32:04
okay, so I'm going to create a You'll notice file new project web forms application has a models folder and You know that's handy for what I'm doing now, but it's also handy for what I showed you earlier with the strongly typed controls
32:21
okay, so I'm going to create a person class and How big do I have to zoom it for it to be readable? That good good, okay, so now let's give this this person a you know standard things will give them a An ID
32:43
Will give them a and we'll give them what else I guess an age Okay, so standard kind of stuff so now. I'm going to right-click in here and
33:04
I'll say add What we've got in this let's see if I can zoom in So there we've got scaffold right and so scaffold is kind of the the standard thing that we're using for all of them So it's not you know add add controller add this add that it's always add scaffold so when I right-click
33:25
I say right-click add Bring up my scaffolding dialogue So now this dialogue remember. This is the whole one asp.net thing I can scaffold anything into this project So I can scaffold we've got all our standard MVC scaffolders. I could you know scaffold an MVC controller
33:43
And I could do an empty one or with any framework all that stuff, but I can also do Down at the bottom. I've got web forms, and I've got I've got web API in the list, too So here I'm going to say add Web forms, so this is similar to the you know to what we did
34:04
Did I build there we go person okay? So I'm just going through I've selected my model classes person I'm going to create a new any context I'm going to generate mobile views as well and I will say add So now it has me create a new context, so that's creating an any framework context
34:24
You can use anything you want to get your data. I'm just showing that you know it works. Well with any any framework so There's an error Okay, so some that might be because I haven't built that's always what it is for me an MVC. We'll try that again
34:48
That's over there Okay here we go on the plus side. We've already got our entity context, so it's going to be that much faster
35:22
I'll just create a new one. They're cheap okay, so and I'm also generating mobile views. Let's see if this works There we go Okay, so this is going through and it's you know building out pages so the same way that it would build out if this Was MVC it would build a controller and views this is building out pages for me
35:41
so you can see on the right side, we've got all those pages and These pages are Pretty smartly done these are actually taking advantage of Dynamic data, so that's another one of these things a long time ago when everything was not one asp.net Everything was all split up. We had dynamic data
36:02
Did anyone use anyone here use dynamic data anyone use a few people people that have used or do use dynamic data really like it? It's pretty powerful you can point it at you know a data source And it scaffolds everything up, and it does all kinds of great stuff by just inspecting your data So this is leveraging that okay?
36:23
So one nice feature of the of That dynamic data is actually that it's got these templates field templates and entity templates now if you look at these These are going to seem pretty familiar to the kind of display templates You've got in MVC and that's because MVC actually stole them from dynamic data a while ago, okay?
36:44
So this means you can go in and in your scaffolding you can whoa you can Scaff you can change the way things are displayed you can say every time there's a string or every time There's an image. I would like an alt tag. I would like whatever okay So that's it for scaffolding one other thing. I do want to show is that we also have mobile
37:04
In here somewhere we've got mobile views And we've got a view switcher, so that makes it so you can you know the person can say thanks for the mobile view But I'd actually like to see the desktop one, and it'll cleanly switch back to that okay So we are at scaffolding now. I need to hurry on to identity
37:26
So I'm thinking we've been doing web forms all this time I think I'm going to switch over to new MVC applications, so We'll close solution we'll get a new one so again identity is one of these things that we've kind of
37:44
We've had what we've had for a long time we had the Identity system that's been around for in web forms. I'm not sure I'm not even sure when they're I guess that was an ASP to when that came out so so we
38:00
Yeah, so we've had this identity system, and it solved cases that really made sense back around 2005 You know when you had users, and they all Had roles and so you have these five users or administrators And everyone else is a standard user and everyone else is not authenticated right but over time that doesn't fit with things like OAuth
38:22
Where we need to track different things about our user users don't have passwords when you're using OAuth, right? Users have claims and now also ASP dotnet or dotnet four or five itself is wired for claims, so Dominic explained this to me the other day roles are just kind of yes, or no is this user in a role
38:43
Yes, or no, but a claim can do a lot more Claim can be what is this users email address claim can be you know any it can be You can think of it as a value instead of just a yes or no So there's all these things that we would like identity to be able to do and and you know
39:02
The framework supports it and and the web people are using it, but it wasn't set up yet in an ASP dotnet Well in we had we had a new simple membership provider that we shipped with the last kind of wave of stuff and it did simplify some things but
39:21
There were there were still problems you could run into for instance It wasn't a completely testable it wasn't very extensible You could you could use it to save additional information about your user But you couldn't hook it up with other kind of providers. You couldn't change too much about how it worked
39:41
so we've we've got what we think is you know kind of the Identity system that we can use across all of these you know across web API and MVC and you know across the whole gamut And it's it's extensible and it's testable and it's kind of put a lot of effort into engineering something That is you know very future-proof and easy to work with okay, so I'm going to create an MVC app
40:07
Create all configure authentication, so I'm going to say individual user account. It's a new laptop for me, and I'm not sure what it's doing
40:24
Okay, so I click okay, and nothing happens All right, I'll just do that Okay, so so now it's going through and it's wiring everything up I can talk more while it's installing all the new kit packages and stuff one other thing that
40:41
That's different about the identity system is it's wired up using Owen, so Owen is open web interfaces for dotnet. We'll talk a little bit more about that later given time But it's kind of wired up in a way that is not even strictly coupled to ASP.net so that means you could use use this identity system. You know it works very well with ASP.net
41:04
It's designed to work well with ASP.net, but it's also designed so that you could take it and use it with Nancy or service stack or anything else right? So it's it's kind of loosely coupled now. It's not wired in so deeply to ASP.net so what I want to show you with this is we've got a
41:24
An identity model the identity model is what defines our user and What's nice with this is that this is set up in you know it's a plain old clr. Object and So it can be managed by
41:40
Entity framework, so this is another one of those things given time I do a different demo where I go through and use any framework migrations and keep changing my user and Keep migrating the data along with that which is something that would be very very hard to do with our older systems So here I've got you know an ID and a username. I'm going to throw a few other properties on them
42:06
So let's give them a just an age. I guess Nickname first
42:20
So in the past if you wanted to bolt additional properties onto a user it was it was not very easy We gave you like you know Kind of a blob of blob string you could throw things on to or a lot of the time people just said that's too hard And they had a separate database, and they wired them together by tracking the IDs Simple membership gave you some opportunities to extend things, but it kind of it was kind of wired in specific ways, so
42:48
What what this is doing this is? Saving these this is going to you know build up a user database for me Using the users properties, so I'm going to hit a five and
43:06
I'm going to register a user, and then we'll see what happens to to them now notice this this is This is what this looks this is you know our site when it's at this size now when I make it bigger So it went to a full-screen view so this is this responsive layout
43:22
This is the kind of thing that makes your app look good on a mobile phone and good on desktop without you having to work Okay, so now let's register a user, so we will register Freddy and his password is not telling but it was spaghetti
43:48
Okay, so I just hit register now as it's doing that Let's go over and view all our files so here's the database that's been created and
44:03
Actually, I didn't do everything that I need to do so you'll get to see how I fix problem Yeah, actually okay, so there it is username and nickname and stuff now Normally what I would do is I could go into however that user is created So I would go into the account controller, and I could say on create account
44:21
You know we actually want to fill in a nickname and pull it out of something right so if I go into register This is where I would set like the age and and nickname, but what it did was it said well Those are empty, but I'm gonna create those those fields for you, so if we look at what's in our
44:40
database and so So there we have this field okay, and this is something where we can do all migrations We can you know we can treat it like it's code accessing data It's not this weird kind of thing that's that's kind of away from us all right
45:01
There's a lot more to it, and there's there's a lot more future plans to make it You know more extensible make it so that you can bolt things on etc But it's been designed from the beginning that it's very pluggable One other thing I want to show Is what I'd mentioned with the way that it's configured so if we go into app start here. We have startup auth and
45:22
So startup auth has you know the things where it wires everything together? Okay, so this is this has a lot of stuff you can on comment if you want to do more But this this is really all there is to it What's different about this though is there's nowhere in the application where it's you know it's calling out to this
45:43
This is actually using the Owen System so it's got this I app builder So actually Depending on time I see 1105 Okay, 15 minutes. I'm going to run through a few things and then hopefully get back to that
46:01
Oh, and because that's my favorite demo Okay, so that we just talked about identity, and you know how we've changed the identity system And also how that flows across all the different Systems now it's the same identity system Scaffolding we talked about
46:20
identity we talk No, that's really kind of more of like an implementation detail of you know how the off is happening This is more about the identity how it's stored and what's kind of calling down into OAuth so dotnet open on Okay, so MVC 5
46:41
The there's not really you know a whole bunch of feature wise But remember we just shipped asp.net 2012.2 in February and that had tons of new Tons of new templates and things the real work that was done on MVC was making it So it's not its own thing so now there isn't that separate special project type
47:02
GUID that you know it has to be associated with your project to get that MVC tooling now You can do you know it can be added easily into any any web application So you can do empty web app, and then you can easily hook up You know MVC controllers one thing to pay attention to is that this and and pretty much everything
47:21
We're talking about in you know in the future here is is requiring four or five One thing with that is async. There's a huge focus on everything supporting async, so you'll see async. You know throughout the pipeline and So and so that's one reason for that web API 2 There are a lot of features
47:42
there's a lot of activity going on with with web API partly because it's brand new and partly because There you know a lot of people are using it and and have real needs for what their service needs to support And so we're adding them in at a frantic rate One thing that allows us to do that is that we're able. It's a it's a fully open source project
48:02
It's not open source code Meaning that it's just open under an open source license But it's actually an open source project so we can take contributions from the community So two things that I'm going to show you are and you know there's a lot of great stuff on this list I'm not going to show you but OData support a lot of work around OData
48:21
So if you do like OData you can do a lot Around querying so you can make a very simple controller method or controller action That just exposes your data and exposes it using OData syntax and so then your your clients can go in and say I would like Customers, but I would like to sort them by this and filter by this and I'd like only the top five and you
48:42
Don't have to write a bunch of controller actions to handle that So that's that's OData Portable HTTP client is you know part of this whole effort and the portable HTTP client works all over the place Phone and and Windows Store apps and everything so allowing you to call into your web API's from other places
49:01
But what I'm going to show you is Two things attribute routing and core support so first of all attribute routing is Another way that you can do That you can configure your your routing URLs So what this allows us to do, I'm I'm really just kind of gonna illustrate how they're set up
49:28
Okay, so you can still configure routes the way you did the way you used to but you can also All right, well, we'll just look at this code and we'll assume it was going to compile
49:45
No Well, so the question here is this is our own implementation and not the existing plug-in This is attribute routing was first written by Tim McCall and you know is a popular NuGet package So what they did with the two things
50:02
I'm going to show core support was pretty much just pulled in more as a NuGet package and a lot of things we do We just will say hey, do you want to contribute this? You know can we support this as a NuGet package and everyone says yes, and we just pull it in That's how .NET OpenAuth worked What they did with with attribute routing is actually like they worked very closely with Tim McCall, but it was kind of
50:23
It was adopted so the error was adapted so it would work really well with Web API and went through all the code review and you Know performance testing and all that stuff. So Yes. Yep. Yep. Yeah, so so all these attributes here then you can go in and you can say
50:44
Yeah, so here's HTTP get and you know, we can bind to things you can do all kinds of things like here I've got a route prefix So I don't have to say order ID approve order ID and all that Everything in this controller is assumed to have order as a prefix. So that's a very simple case
51:03
Versioning controllers is another thing where you can go through Let's say we have a customer and they just had an integer ID and then later we go on and we change our customer So they have a GUID ID And we need to support both of those, right? So what we're able to do with this is we can get we can use a route prefix and we can say
51:25
If somebody calls the API with v1 You know, then we'll go through and we'll do our work using an ID and then ID if somebody calls with v2 you know, then then we'll call in using a good so this is a way to
51:41
Support you multiple versions and then our code under the hood is going to you know route things to our services But it makes it a lot easier Otherwise in the past you'd have to you know, probably create different controllers or have extra logic in so this makes this very simple two more neat things One is nested controllers
52:01
So let's say we have a movie database Right and we want people of course to be able to browse for movies and get a list of movies But then let's say we also want people to browse for actors and see all the movies that that actor was in so normally you You'd end up with you know Probably an actor controller and then it would have a movies
52:22
Action and then that movies action would call into a service that was shared but it's kind of a lot more work So instead we can just using Attribute routing we can say all right. We're just going to say when people call into Actors ID movies will just call get movies by actor So this allows us to have our concerns all in one place
52:43
This controller is concerned with movies Right, so we can you know, keep that all together, but we can support the different consumers Again here we've got by director Does that make sense? I know I'm going fast. I've got a lot I want to get through And one other here with route constraints so
53:05
So here we've got you know in ID so we're constraining it to an integer ID, all right So there's a lot there's a lot more to this and it's it's really cool to be able to see you know How quickly after they said well, we're going to accept code contributions how quickly that has been
53:24
going So I want to show one other thing here then which is core support so cores is cross-origin resource sharing and and what that allows you to do is Access one API from another
53:43
From another URL Oops So let's say I've got one Web API and I want a different website to be able to call into that from JavaScript The problem is that browsers will block that because it's a big security hazard if you've got one browser
54:04
That's able to call into you know, any arbitrary URL via JavaScript It could be sending, you know information in the page. It could be sending passwords or cookies or things like that. So Projects and we want core. There we go
54:26
All right, so I've got a project here, let me make sure it's right one Yeah, okay. So I've got a project with two web API's in one of them One is going to try and call into the second
54:43
Okay, so these are running on port 3000 and 3001 so One of the things that was was included in the 2012.2 release was support for help pages So here if I go into the help page, I've got this test API
55:04
All right This is actually another thing that they made available as a new get package that drops right into the help pages So these help pages are cool because they actually inspect your at runtime. They inspect your Web API look at all your controllers figure out what the methods return look at the classes. They generate all this for you
55:22
So now I'm going to say all right get Values and this succeeds it's able to call because it's it's JavaScript in the page calling back to the server that served it up but now if instead I wanted to call into the same service running on 3001 so localhost
55:49
What's that? You can change it. Yeah, this will yeah, this is really handy. Okay, so now I'm going to call in So I get I get an exception and the reason is because it's blocked by the browser browser says that is not allowed
56:04
Okay So, let's see. Did I know I didn't run that with Okay, so now we've got We can go in and say enable core support So there's a few things we can do one is I can say
56:20
This is this first is the simplest case I can say allow any You any URL to call in and pass any header and use any verb so that star star star Okay Instead I'm going to say allow any You know allow people to call in from any URL, but I'm only going to accept two headers
56:44
They can't pass me any header they want and I'm only going to accept a get verb okay, so that's this is going in my My second web app that is going to allow core support it's going to allow Cross-origin access from the first browser. Okay. So now I'm going to go I'm on
57:05
3,000 This works. Okay So I'm going to go to 3,000
57:26
All right, so that's able to make the call now, right But let's try and add in some crazy header. So I'm going to add in X foo and it's going to ask for some spaghetti So that's blocked. But now I'd if you'll remember in my code. I had said I will allow the
57:52
X NDC header, right So I'm going to go in and say this is now X NDC
58:02
And that succeeds. All right, so this is the kind of thing where if you haven't run into this you're wondering Why anyone would care about this if you have run into this? This is a lifesaver It's really hard to be able to call in from one server to another server via JavaScript From one web page served off one domain to another domain over JavaScript. So this is all set up and
58:26
That was done because of another Open-source library that someone else contributed. All right, so tons of other great stuff in web API. I You know can't dig into any more of it, but it is very awesome
58:41
Signal are to oh One of the big things that there there's a talk later today on that from the people that build signal are so I have neither The time nor the wisdom to try and match that But one of the things they've added is again support for for Owen working towards that
59:00
So I've been talking about Owen and Katana this whole time and let's see where we're at I have like two minutes to show it, which is awesome. Okay, so Here's how this is the problem that Owen and Katana solve in the past You would write some code and it would kind of be hosted inside of ASP dotnet and it would run on top of IAS
59:21
So everything kind of assumed your application if you wanted to extend it while you can write modules and handlers You can work with ASP dotnet and that's about all you can do Which works in a lot of cases, but we don't know about the other cases because we don't even think about them So what Owen and Katana did was break everything apart
59:41
So each of these layers can talk to each other via a simple delegate. So The host so for instance the application can make calls into the middleware passing It passes a dictionary which includes the application state and it returns a task. So
01:00:00
The way that any Owen component plugs into another one is it has a function. It receives a dictionary that has application state and returns a task. The idea is, if you want to talk to me, you say, okay, we're a web app. Here's what's going on. Here's the package. It's got all the headers. It's got the URL. It's got all the state of the app up until now.
01:00:23
You give me back a task. The task is just a promise that when I'm done with my work and everyone else down the chain is done with their work, I'm going to feed that information back up to you. It's a whole async chain. The reason that I've got all these lines there on middleware is there's a lot of great features that this enables, one being that it can be really fast, very lightweight,
01:00:44
compared to ASP.NET, traditional ASP.NET, which had to support everything that webforms did all the way back to 1.0. But also, middleware can be very pluggable. I can plug in all different kinds of middleware components that can do different things.
01:01:00
Let's look at one of those. That will be my last demo. What I did is I created... Come on now. Stop. Shift F5.
01:01:20
What I did for this demo is I went File, New Project. If you go onto the ASP.NET site and search for Katana, K-A-T-A-N-A, there's a whole white paper that tells you all the different things you can do with Katana and how to get started. I followed one of those. I created a new empty web application. I pulled in two NuGet packages that make it easier to write O-ing components.
01:01:44
This is my entire website. Thank you. All right. That's... Because... There we go.
01:02:00
I have this app builder. You may remember I showed that before in the identity thing. It sets up this delegate here for the async handler. Then it's going to return. Notice all the async in there. Everything's wired up async. This is all I have to do. I say my response is HTML, and it's going to write some content to it.
01:02:24
Now I want to hook in some middleware. If I hit F5 on this, you would see a web page, and it would say, Hello, NDC. Not all that exciting. This is an entire web app. There's nothing else. There's not all kinds of handlers and all that sort of stuff. This is all that there is.
01:02:41
Now in my little surprises region, I've set up a few middleware things, and also a link to where you can find out some more middleware. I've created two. One is a logger, and the other is a copywriter. Copywriter just puts copyright after everything on the page.
01:03:00
So I want to protect that stuff. OK, so let's, yeah, you're right, a rigter. OK, so first we've got, this is my logger. So remember I said that the important signature here is this. Don't get too worried.
01:03:21
This looks like a lot. Basically, this first chunk says, Give me the application state, and you can dig into that and get stuff out. This whole thing, and I will return you a task. When people call in, this is what they do. When people call, excuse me, this is the one I should have done. People call invoke, and you return them a task.
01:03:42
This one just says, All right, I'm going to log, and then I'm going to delegate to the next thing in the chain, and then I'm going to log again. Start and end. All right? So that's all there is to this one. Then I'll show you one more. This is my copy rigter.
01:04:01
So all this does is when we call invoke, we pass it the state of the application, and it returns a task. So this one says, OK, I'm going to delegate all the way down the chain. Everybody else do your thing and write out what you're going to write. But I am going to get the response, and I'm going to call
01:04:22
writeAsync on the response, and I'm going to write out the copyright sign. This is HTML encoded. So the idea is this is a very simple few lines of code example, but if you think about it, this can be doing a lot of other things. This middleware can be plugging in things like, so
01:04:44
there's the copyright sign, and then if we look into here, there's our logging. So the idea of this middleware is something that I think could be really interesting.
01:05:00
If you look at other web frameworks, there's RAC, there's PSGI. So there's all these different things that in other web frameworks people have done all kinds of crazy things with. I'm thinking that people could do, in addition to plugging in with logging and that sort of things, they could also be doing image optimization at a different
01:05:22
level. They could be doing response modification, all kinds of things. So this is very early on, but it's bleeding edge, and I wanted to show you that. So we are four minutes over, so let me just wrap up.
01:05:46
So first we talked about that 2012.2 release and what's in the update 2. We talked about all this stuff. You're going to hear a lot more about all of these things at Build just a few weeks from now.
01:06:00
So we talked about the oneasp.net, the new tooling that supports that, showed how the new bootstrap templates make it easier to style and theme things. Scaffolding, the new scaffolding system that works across all of them, Web API and MVC and webforms, everybody. A new identity system. I didn't talk at all about SignalR2.
01:06:22
MVC5 is really the main work in MVC5 is that it plays well with everybody and it's not off in the corner feeling smug. Web API, I showed you cores and attribute routing, and then also there are a lot of other features like OData. And then finally we looked at Katana at the end. Finally I just want to say you can play along at home.
01:06:41
We make our roadmap public. You actually, if you go to aspnetwebstack.codeplex.com you can see the check-ins as they happen. Okay, so if we, there we go.
01:07:00
So you can see if people are working hard, you can see what they're working on. So let's see. Okay, so check-in Thursday at 2.03 p.m. Did you know about this? You can also pull all this code down via nightly NuGet packages. So that's how I did some of these demos.
01:07:20
I mean, some of this I did via Visual Studio 2013 pre-release, but some of these I did just using nightly NuGet packages. So there's a whole community writing blog posts about all this stuff based on just watching the code as it's checked in, pulling the NuGet packages and putting it to work. I'm out of time, thank you.