Introduction to asp.net5
Lesson 2 - Visual Studio
[WHAT]
- ] VIDEO SUMMARY - summary notes on the video, this lesson ... Examine Visual Studio 2015, and learn how to create your first application
[WHY]
- ]
[WHERE]
- ] WATCH THE FULL VIDEO
-
[WHEN]
- ] 2015-08-12 - created
- ] 2015-09-15 - published
[EXAMPLE]
- [00:00] introduction
- ] Scott Hanselman -
- ] Glen Chondron -
- [02:00] download and install the Visual Studio IDE
- ] use this URL to view the currently available options for free versions of - http://visualstudio.com/free
- > ] visual studio(VS) community - is the full featured VS IDE, aka previosly known as professional version, available for FREE (in most cases)
- ] visual studio online -
- ] visual studio code - is a new text editor, you can also use this to develop web applications, a great choice for x-platfrom development
- *] there are also other versions of VS available, for example, the "Enterprise version", that does have some additional features, but costs money
- [00:00] sign in to VS, choose your language, your application type and viola - you have an application
- ] VS newsfeed page shows you relevant articles/videos about VS/development as your home/start page
- ] signing in to VS ( with your microsoft account) enables you to save your VS themes, fonts, colors across different machines
- ] CHOOSE file new project - to start a new project
- ] select your language on the left hand side of the dialog that appears, choose C# ( other options include VB, C++, F#, JavaScript, Typescript and more )
- ] once you select a language, an application types dialog window will appear, select "web" from the - this display ( other options include windows, android, cloud, ios, ... )
- ] name your application, hit OK
- ] dialog with asp.net application types appears, has options for .net 4.6 Templates and .net 5 templates,
- ] choose either Blank, Web application or Web API from the .net5 templates
- ] Blank - a new empty web application
- ] Web Application (default) - includes some pre-built functionality and application layout
- ] Web API - for building API's aka returning json data
- ] click OK - to create the selected Web Application template
- [00:00]
- ] blank application has a readme file, handy b/c it contains links to helpful resources for developing with asp.net5
- ] points out SOLUTION EXPLORER tab in IDE -
- [13:00] whats in the "empty application"
- ] startup.cs - code that runs every time your application is started, ] contains stuff that you can configure (action methods) that will run on every request to your application)
- ] project.json -
- ] solution - a collection of project(s)
- ] right click option in project viewer to view files in folder ( on disk)
- ] files in folder map pretty much to what is displayed in project explorer view
- ] NEW adding a file to the filesystem, this will show up in your project, prev ver of VS did not have this capability
- [00:00] experiment 1 - renamed "readme" as "index"
- ] then launched the application, - no index page is being served up, whats going on?
- ] vs starts ths starts the web server, starts your browser, points your browser to your web applicaton
- ] when your web app starts, it runs the code in "startup.cs" file
- ] this is what we are currently seeing, NOT the file name index being served up
- ] the Configure methods inside the Startup.cs is what is executing,
- ] all of the requests coming into the web server are directed to here
- [00:00] what we usually do in App.configure
- ] stitch together pieces of code(middleware) that will run to handle a "request" as it goes through our "pipeline"
- ] middleware does stuff like ] serve static files ] authentication, ] routing, ] diagnostics / logging
- ] effectively you can do anything - with middlware - all middleware is optional, add what you need/want
- [00:00] references
- ] to serve static files we need to add middleware to our app that will do that.
- ] add a line to your code - "app.UseStaticFiles()" to run the middleware that will do that
- ] TIP - you can add a reference by typing a method name, then click the link that shows you "possible solutions", VS will download and install package for you
- [29:45] wwwroot
- ] this is the location, where all of our app's 'static' files live.
- ] files for javascript, css, html, images,
- ] why we need wwwroot - as the root folder for our static files
- ] previously the project was the root folder,
- ] any files that are now in the root of the project like 'hosting.ini' will no longer be served
- [00:00]
- ] highlight in VS (points out errors), left side of code windo
- [00:00] REVIEW - lesson 2
- ] we have created an empty asp.net application
- ] served a static file
- ] added a piece of middleware to it
- ] next lesson is on ___ the full web app template, more server side stuff
[HOW-TO]
- ] # 5050 - my project - guide to asp.net - MVC
- ] # # -
[REFERENCE]
- ] # 4804 - overview series
quiz
1. which of the following best describes iis express
2. The middleware pipeline in processed in order
3. which of following is (the definition) of a solution in VS
4. which 3 of the following are examples of middleware?
5. which of the following is a followup to vs web express
results = 5/5 total = 96 , rank.local = 1480, rank.global = 101,169 total=3,555,000.