Getting Started with ASP.net Core 1.0
Transcript of Getting Started with ASP.net Core 1.0
![Page 1: Getting Started with ASP.net Core 1.0](https://reader033.fdocuments.net/reader033/viewer/2022042619/58732eb11a28ab596c8b633d/html5/thumbnails/1.jpg)
Getting started with ASP.NET Core 1.0 (formerly ASP .NET 5)Joe RaioSenior Technical [email protected]
![Page 2: Getting Started with ASP.net Core 1.0](https://reader033.fdocuments.net/reader033/viewer/2022042619/58732eb11a28ab596c8b633d/html5/thumbnails/2.jpg)
• The ‘About Me’ Slide• Goals• .NET Core 1.0 General
Info• Demo Project & XPlat• Summary• Things to Know• Q&A at the End
Agenda
![Page 3: Getting Started with ASP.net Core 1.0](https://reader033.fdocuments.net/reader033/viewer/2022042619/58732eb11a28ab596c8b633d/html5/thumbnails/3.jpg)
Joe RaioSenior Technical EvangelistDX [email protected]@joescars
About Me: Based in Ft. Lauderdale, FL. Recently Married. I love Music, Aviation and all things Technology
![Page 4: Getting Started with ASP.net Core 1.0](https://reader033.fdocuments.net/reader033/viewer/2022042619/58732eb11a28ab596c8b633d/html5/thumbnails/4.jpg)
What is a Microsoft Technical Evangelist?Our mission is not only to educate students, developers and startups on the latest Microsoft technologies, but also inspire them to do more by building amazing projects with the community.
• Developing Websites• Building Games• IoT• And much more…
![Page 5: Getting Started with ASP.net Core 1.0](https://reader033.fdocuments.net/reader033/viewer/2022042619/58732eb11a28ab596c8b633d/html5/thumbnails/5.jpg)
Goals of Presentation• High level overview ASP.NET Core 1.0• Cross Platform Story• Working with ASP.NET Core in Visual
Studio (PC) & Visual Studio Code (MAC)• Connecting to the Cloud• Resources to learn more
![Page 6: Getting Started with ASP.net Core 1.0](https://reader033.fdocuments.net/reader033/viewer/2022042619/58732eb11a28ab596c8b633d/html5/thumbnails/6.jpg)
ASP.NET Core 1.0
![Page 7: Getting Started with ASP.net Core 1.0](https://reader033.fdocuments.net/reader033/viewer/2022042619/58732eb11a28ab596c8b633d/html5/thumbnails/7.jpg)
ASP.NET 2015 in a Nutshell
.NET Framework 4.6 .NET Core 1.0 Full .NET Framework for any scenario and
library support on WindowsModular libraries & runtime optimized
for server and cloud workloads
ASP.NET 4.6 / System.Web
MVC 5.x
ASP.NET Core 1.0 app features:MVC, API, etc.
Core CLR .Net NativeASP.NET Core 1.0
Web API 2.2
WebForms
Visual BasicC#
Visual Basic (coming soon)
![Page 8: Getting Started with ASP.net Core 1.0](https://reader033.fdocuments.net/reader033/viewer/2022042619/58732eb11a28ab596c8b633d/html5/thumbnails/8.jpg)
What about ASP.NET 5?
ASP.NET Core 1.0 was previously called ASP.NET 5It was renamed in January 2016
Announcement postMore details
You’ll still see it referred to as ASP.NET in Visual Studio and in some docs
Will be updated in next ASP.NET Core Release Candidate
![Page 9: Getting Started with ASP.net Core 1.0](https://reader033.fdocuments.net/reader033/viewer/2022042619/58732eb11a28ab596c8b633d/html5/thumbnails/9.jpg)
Now MVC and Web API are just features of
ASP.NET Core
![Page 10: Getting Started with ASP.net Core 1.0](https://reader033.fdocuments.net/reader033/viewer/2022042619/58732eb11a28ab596c8b633d/html5/thumbnails/10.jpg)
ASP.NET Core 1.0One set of concepts – remove duplicationWeb UI and Web APIsSmooth transition from Web Pages to MVC (future)Built DI firstRuns on IIS or self-hosted
![Page 11: Getting Started with ASP.net Core 1.0](https://reader033.fdocuments.net/reader033/viewer/2022042619/58732eb11a28ab596c8b633d/html5/thumbnails/11.jpg)
ASP.NET Core 1.0 – Key Values
Choose your Editors and Tools
Open Source with Contributions Cross-PlatformOSS
Seamless transition from on-premises to cloud
Faster Development CycleTotally Modular
Fast
![Page 12: Getting Started with ASP.net Core 1.0](https://reader033.fdocuments.net/reader033/viewer/2022042619/58732eb11a28ab596c8b633d/html5/thumbnails/12.jpg)
ASP.NET Core – Exeeds 1.15 Million request/s, 12.6 Gbpshttp://www.ageofascent.com/asp-net-core-exeeds-1-15-million-requests-12-6-gbps/
![Page 13: Getting Started with ASP.net Core 1.0](https://reader033.fdocuments.net/reader033/viewer/2022042619/58732eb11a28ab596c8b633d/html5/thumbnails/13.jpg)
DemoGetting started with ASP.NET Core 1.0
![Page 14: Getting Started with ASP.net Core 1.0](https://reader033.fdocuments.net/reader033/viewer/2022042619/58732eb11a28ab596c8b633d/html5/thumbnails/14.jpg)
Install from https://get.asp.net
16
![Page 15: Getting Started with ASP.net Core 1.0](https://reader033.fdocuments.net/reader033/viewer/2022042619/58732eb11a28ab596c8b633d/html5/thumbnails/15.jpg)
DemoCreating an ASP.NET Core 1.0 project
![Page 16: Getting Started with ASP.net Core 1.0](https://reader033.fdocuments.net/reader033/viewer/2022042619/58732eb11a28ab596c8b633d/html5/thumbnails/16.jpg)
From VS2015;
File > New Project > ASP.NET Web Application
![Page 17: Getting Started with ASP.net Core 1.0](https://reader033.fdocuments.net/reader033/viewer/2022042619/58732eb11a28ab596c8b633d/html5/thumbnails/17.jpg)
From VS2015;
Select Web Application under ASP.NET 5 Templates
![Page 18: Getting Started with ASP.net Core 1.0](https://reader033.fdocuments.net/reader033/viewer/2022042619/58732eb11a28ab596c8b633d/html5/thumbnails/18.jpg)
• Let’s explore the project structure and all the files that were automatically generated
ASP.NET Core 1.0 Project Structure
![Page 19: Getting Started with ASP.net Core 1.0](https://reader033.fdocuments.net/reader033/viewer/2022042619/58732eb11a28ab596c8b633d/html5/thumbnails/19.jpg)
DemoWorking with ASP.NET Core 1.0 on Mac OSX
![Page 20: Getting Started with ASP.net Core 1.0](https://reader033.fdocuments.net/reader033/viewer/2022042619/58732eb11a28ab596c8b633d/html5/thumbnails/20.jpg)
1. Install Mono for OS X (required by Visual Studio Code).
2. Install Visual Studio Code3. Install ASP.NET 5 for Mac OS X
• Full Instructions: https://docs.asp.net/en/latest/getting-started/installing-on-mac.html
Installing ASP.NET Core 1.0 on MAC OSX
![Page 21: Getting Started with ASP.net Core 1.0](https://reader033.fdocuments.net/reader033/viewer/2022042619/58732eb11a28ab596c8b633d/html5/thumbnails/21.jpg)
1. DemoEditing project using Git & VS Code
![Page 22: Getting Started with ASP.net Core 1.0](https://reader033.fdocuments.net/reader033/viewer/2022042619/58732eb11a28ab596c8b633d/html5/thumbnails/22.jpg)
TagHelpersHTML helpers expressed as tagsEx. Instead of: @Html.LabelFor(m => m.UserName, new { @class = "col-md-2 control-label" })Write this: <label asp-for="UserName" class="col-md-2 control-label"></label>
Easier to customize with additional attributes
Work seamlessly with the HTML editor
![Page 23: Getting Started with ASP.net Core 1.0](https://reader033.fdocuments.net/reader033/viewer/2022042619/58732eb11a28ab596c8b633d/html5/thumbnails/23.jpg)
TagHelpers@using (Html.BeginForm(new { ReturnUrl = ViewBag.ReturnUrl })) { @Html.AntiForgeryToken() @Html.ValidationSummary(true)
<fieldset> <legend>Log in Form</legend> <ol> <li> @Html.LabelFor(m => m.UserName) @Html.TextBoxFor(m => m.UserName) @Html.ValidationMessageFor(m => m.UserName) </li>
![Page 24: Getting Started with ASP.net Core 1.0](https://reader033.fdocuments.net/reader033/viewer/2022042619/58732eb11a28ab596c8b633d/html5/thumbnails/24.jpg)
TagHelpers<form anti-forgery=“true“ validation-summary=“true” action="Create“> <fieldset> <legend>Log in Form</legend> <ol> <li> <label for=“UserName”> <input for=“UserName”> <span validation-for="Name" style="color:blue" /> </li>
![Page 25: Getting Started with ASP.net Core 1.0](https://reader033.fdocuments.net/reader033/viewer/2022042619/58732eb11a28ab596c8b633d/html5/thumbnails/25.jpg)
public interface ITagHelper{
int Order { get; }Task ProcessAsync(TagHelperContext context, TagHelperOutput output);
}
TagHelpers: Create Your Own
Examples: https://github.com/aspnet/Mvc/tree/dev/src/Microsoft.AspNet.Mvc.TagHelpers
![Page 26: Getting Started with ASP.net Core 1.0](https://reader033.fdocuments.net/reader033/viewer/2022042619/58732eb11a28ab596c8b633d/html5/thumbnails/26.jpg)
Stuff you should Know AboutAdditional ResourcesChannel9: http://channel9.msdn.comMVA: http://www.microsoftvirtualacademy.com
BizSpark – http://www.bizspark.comFree AzureFree ToolsNetwork Partner Give to your startups for free
DreamSpark – http://www.dreamspark.comFree Azure for StudentsFree Tools for Students
![Page 27: Getting Started with ASP.net Core 1.0](https://reader033.fdocuments.net/reader033/viewer/2022042619/58732eb11a28ab596c8b633d/html5/thumbnails/27.jpg)
ASP.NET Core ResourcesLatest ASP.net 5 newshttp://www.asp.net/vnext ASP.NET Installshttp://get.asp.net Documentationhttp://docs.asp.net ASP.net 5 Community Standuphttps://live.asp.net/
![Page 28: Getting Started with ASP.net Core 1.0](https://reader033.fdocuments.net/reader033/viewer/2022042619/58732eb11a28ab596c8b633d/html5/thumbnails/28.jpg)
Questions?
![Page 29: Getting Started with ASP.net Core 1.0](https://reader033.fdocuments.net/reader033/viewer/2022042619/58732eb11a28ab596c8b633d/html5/thumbnails/29.jpg)
• Contact Information• [email protected]• http://joeraio.com• @joescars
• Helpful Links• http://azure.Microsoft.com• http://www.dreamspark.com• http://www.bizspark.com
Helpful InfoDownload this presentation:
http://aka.ms/sfcc2016joe