edit-article
Home
Up
Delete
Article Name:
Article Description:
[35:19]VIDEO-SUMMARY Introduction to asp.net5 - Lesson 2 - Visual Studio - by Scott Hanselman and Glen Condron
Chapter ID/Name:
Status:
Write
Writing
Written
Add Photo:
Owner ID:
Content:
use HTML
Edit Content
<h1 style="text-align: center;">Introduction to asp.net5</h1> <h2 style="text-align: center;">Lesson 2 - Visual Studio</h2> <h2>[WHAT]</h2> <ol> <li>] VIDEO SUMMARY - summary notes on the video, this lesson ... Examine Visual Studio 2015, and learn how to create your first application</li> </ol> <h2>[WHY]</h2> <ol> <li>] </li> </ol> <h2>[WHERE]</h2> <ol> <li><strong>] WATCH THE FULL VIDEO</strong></li> <ol> <li> <div class="inlineBlock overview-tab-headers semi-bold" title="Basics of MVC and the Moving Parts" data-bind="html: title(), attr: { 'title': title() }">] <a href="https://mva.microsoft.com/en-us/training-courses/introduction-to-aspnet-5-13786?l=u95lbjpXB_5701937557" target="_blank">Introduction to asp.net5</a> - Lesson 2 - Visual Studio</div> </li> </ol></ol> <h2>[WHEN]</h2> <ol> <li>] 2015-08-12 - created </li> <li>] 2015-09-15 - published</li> </ol> <h2>[EXAMPLE]</h2> <ol> <li><strong>[00:00] introduction</strong></li> <ol> <li>] Scott Hanselman - </li> <li>] Glen Chondron - </li> </ol> <li><strong>[02:00] download and install the Visual Studio IDE </strong></li> <ol> <li>] use this URL to view the currently available options for free versions of - <a href="http://visualstudio.com/free" target="_blank">http://visualstudio.com/free</a></li> <li>> ] <strong>visual studio(VS) community</strong> - is the full featured VS IDE, aka previosly known as professional version, available for FREE (in most cases)</li> <li>] <strong>visual studio online</strong> - </li> <li>] <strong>visual studio code</strong> - is a new text editor, you can also use this to develop web applications, a great choice for x-platfrom development</li> <li>*] there are also other versions of VS available, for example, the "Enterprise version", that does have some additional features, but costs money </li> </ol> <li><strong>[00:00] sign in to VS, choose your language, your application type and viola - you have an application</strong></li> <ol> <li>] VS newsfeed page shows you relevant articles/videos about VS/development as your home/start page </li> <li>] signing in to VS ( with your microsoft account) enables you to save your VS themes, fonts, colors across different machines </li> <li>] CHOOSE file new project - to start a new project</li> <li>] 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 )</li> <li>] 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, ... )</li> <li>] name your application, hit OK </li> <li>] dialog with asp.net application types appears, has options for .net 4.6 Templates and .net 5 templates, </li> <li>] choose either Blank, Web application or Web API from the .net5 templates</li> <li>] Blank - a new empty web application</li> <li>] Web Application (default) - includes some pre-built functionality and application layout</li> <li>] Web API - for building API's aka returning json data </li> <li>] click OK - to create the selected Web Application template </li> </ol> <li><strong>[00:00]</strong></li> <ol> <li>] blank application has a readme file, handy b/c it contains links to helpful resources for developing with asp.net5 </li> <li>] points out SOLUTION EXPLORER tab in IDE - </li> </ol> <li><strong>[13:00] whats in the "empty application" </strong></li> <ol> <li>] <strong>startup.cs</strong> - 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)</li> <li>] <strong>project.json</strong> - </li> <li>] solution - a collection of project(s) </li> <li>] right click option in project viewer to view files in folder ( on disk)</li> <li>] files in folder map pretty much to what is displayed in project explorer view</li> <li>] NEW adding a file to the filesystem, this will show up in your project, prev ver of VS did not have this capability </li> </ol> <li><strong>[00:00] experiment 1 - renamed "readme" as "index"</strong></li> <ol> <li>] then launched the application, - no index page is being served up, whats going on?</li> <li>] vs starts ths starts the web server, starts your browser, points your browser to your web applicaton</li> <li>] when your web app starts, it runs the code in "startup.cs" file</li> <li>] this is what we are currently seeing, NOT the file name index being served up</li> <li>] the Configure methods inside the Startup.cs is what is executing, </li> <li>] all of the requests coming into the web server are directed to here</li> </ol> <li><strong>[00:00] what we usually do in App.configure</strong></li> <ol> <li>] stitch together pieces of code(middleware) that will run to handle a "request" as it goes through our "pipeline"</li> <li>] middleware does stuff like ] serve static files ] authentication, ] routing, ] diagnostics / logging</li> <li>] effectively you can do anything - with middlware - all middleware is optional, add what you need/want</li> </ol> <li><strong>[00:00] references</strong></li> <ol> <li>] to serve static files we need to add middleware to our app that will do that. </li> <li>] add a line to your code - "app.UseStaticFiles()" to run the middleware that will do that</li> <li>] 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</li> </ol> <li><strong>[29:45] wwwroot</strong></li> <ol> <li>] this is the location, where all of our app's 'static' files live. </li> <li>] files for javascript, css, html, images, </li> <li>] why we need wwwroot - as the root folder for our static files </li> <li>] previously the project was the root folder, </li> <li>] any files that are now in the root of the project like 'hosting.ini' will no longer be served </li> </ol> <li><strong>[00:00]</strong></li> <ol> <li>] highlight in VS (points out errors), left side of code windo</li> </ol> <li><strong>[00:00] <strong>REVIEW</strong> - lesson 2 </strong></li> <ol> <li>] we have created an empty asp.net application</li> <li>] served a static file</li> <li>] added a piece of middleware to it </li> <li>] next lesson is on ___ the full web app template, more server side stuff </li> </ol></ol> <h2>[HOW-TO]</h2> <ol> <li>] # 5050 - my project - guide to asp.net - MVC</li> <ol> <li>] # # -</li> </ol></ol> <h2>[REFERENCE]</h2> <ol style="font-size: 10px; font-weight: normal;"> <li>] <a href="/view/task?id=4804" target="_blank"># 4804 - overview series</a> </li> </ol> <p style="font-size: 10px; font-weight: normal;"> </p> <h1 style="text-align: center;">quiz<span style="font-size: 10px; font-weight: normal;"> </span></h1> <p style="font-size: 10px; font-weight: normal;">1. which of the following best describes iis express</p> <p style="font-size: 10px; font-weight: normal;">2. The middleware pipeline in processed in order</p> <p style="font-size: 10px; font-weight: normal;">3. which of following is (the definition) of a solution in VS</p> <p style="font-size: 10px; font-weight: normal;">4. which 3 of the following are examples of middleware?</p> <p style="font-size: 10px; font-weight: normal;">5. which of the following is a followup to vs web express</p> <p style="font-size: 10px; font-weight: normal;"> </p> <p style="font-size: 10px; font-weight: normal;">results = 5/5 total = 96 , rank.local = 1480, rank.global = 101,169 total=3,555,000. </p> <p style="font-size: 10px; font-weight: normal;"> </p> <p style="font-size: 10px; font-weight: normal;"> </p> <p style="font-size: 10px; font-weight: normal;"> </p> <p> </p> <h1 style="text-align: center;"> </h1>