Subscribe: Jon Galloway
http://feeds.feedburner.com/jongalloway
Added By: Feedage Forager Feedage Grade B rated
Language: Greek
Tags:
api  code  features  mvc web  mvc  net mvc  net web  net  new  part  studio  visual studio  visual  web api  web 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Jon Galloway

Jon Galloway





 



Two free video courses: Intro to ASP.NET MVC and Responsive UI with Bootstrap

Wed, 10 Sep 2014 23:22:32 GMT

I'm really excited to announce that two of my latest courses on Microsoft Virtual Academy are now live! Both are recordings of live courses Christopher Harrison and I lead in the beautiful Channel 9 studios, and include downloads of all slides, code and live chat logs. These are live events with two instructors and an active chat, and we pushed the demo code to GitHub throughout the event so attendees could get their hands on it immediately. One really nice benefit of this format (compared to most other video training) is that we were able to watch for common questions and answer them live. It's also hugely motivating to hear from viewers around the world, many who are staying up late at night. Nothing starts the morning off like "Hello from Bangladesh! Hi from Brazil!" Hellos from Holland, Poland, Bulgaria... even New Jersey! Hey! These two courses are part of our new Web Wednesdays series on MVA. Be sure to join us for the next session: Lighting Up Real-Time Web Communications with SignalR with Brady Gaster and me on September 24! Quick links for the impatient: Introduction to ASP.NET MVC Building Responsive UI with Bootstrap Note: These courses are on Microsoft Virtual Academy, which requires you to log in with a (free) Microsoft Account. No cost or obligations, and the account bookmarks where you're at across multiple courses which is pretty helpful. Introduction to ASP.NET MVC Christopher and I put on Developing ASP.NET MVC 4 Web Applications Jump Start last year, built from the ASP.NET MVC certification course materials. Since the course materials are usually covered in a week long class, we had to move pretty quick to cover everything. We've heard from a lot of happy viewers that really liked it (many of whom have written to tell us it was a big part of their successful certification test prep). You can read more about my thoughts on that course here. However, we also were aware that it was a little fast for some developers who were completely new to the space, e.g. developers who were new to web development or front-end web developers who weren't familiar with C# or Visual Studio. And in the meantime, Christopher had joined Microsoft as a fulltime member of the MVA team (woo hoo!). When Christopher contacted me to strategize about some ideas for courses, we decided it was time for an  MVC course that spoke to absolute beginners. This course is broken into the following modules: Basics of MVC and the Moving Parts Creating and Configuring Models The Power of Visual Studio Deep Dive into Controllers Deep Dive into Views Introduction to Bootstrap Introduction to Authentication in MVC​ Supplement Your Knowledge View the course here: Introduction to ASP.NET MVC Building Responsive UI with Bootstrap Boostrap is a front-end framework that makes it easy to build nice looking sites that respond well to different display sizes using CSS media queries. That means your sites automatically adapt to look nice on desktop, laptop, tablets and phones without any hacky code (on server or client) to try to guess if the user probably wants a "mobile" view of the site (what does that even mean now that we've got giant phones, tiny tablets, and convertibles like the Surface?). All the ASP.NET project in Visual Studio 2013 (Web Forms and MVC) are built with Bootstrap. It's automatically in every new ASP.NET application. That's a good start, but I felt like all of the presentations and training I'd seen using on Bootstrap with ASP.NET had been pretty simple: "Hey, check it out, we have Bootstrap now, responsive design is great, here's a new theme, yay! Done!" That's definitely about all I'd covered in my presentations. Sure, Bootstrap is neat, but there are some challenges: The grid system can be a little complex, especially if you want your content to lay out differently at different sizes. Do I really have to memorize all those Bootstrap class names (especially fun for complex components or layouts)? How do I keep my site from looking like every other Bootstrap site o[...]



Web Camp in Los Angeles with Scott Hunter - July 9

Tue, 01 Jul 2014 20:30:22 GMT

Web devs in southern California, we've got a great Web Camp event coming up next week in Los Angeles on July 9. We're wrapping up the Summer Web Camps tour I announced a bit ago with a blowout! This is a free, one day event and we've got space available in the fancy new Microsoft Playa Vista office.Register here We're privileged to have Scott Hunter as one of the speakers for this event. Scott's a group program manager at Microsoft for Azure and Tools, including ASP.NET , MVC, Web API, Web Pages, SignalR, Entity Framework, Web Tooling, NuGet and Azure Cache/SDK's. You may have seen Scott's presentations with Scott Hanselman at TechEd and Build over the years. He's got a great perspective for the challenges web developers are solving today in ASP.NET as well as where ASP.NET is going in the future. We've also got presentations from local heroes Daniel Egan and Adam Tuliper!If you're an ASP.NET developer in southern California, you don't want to miss this free event. In addition to a full day of solid web dev content, this is a great chance to ask questions directly to the head of the ASP.NET PM team.Here's the agenda for what we'll be covering: Session Speaker Start End Keynote Scott Hunter 8:30 9:30 Introduction to ASP.NET and Visual Studio 2013 Web Tooling Jon Galloway 9:30 10:15 Building Web Applications using the latest ASP.NET technologies Adam Tuliper 10:15 11:00 Break 11:00 11:15 Building web front ends for both desktop and mobile using the latest web standards Jon Galloway 11:15 12:15 Lunch 12:15 1:15 API Services for both web and devices Daniel Egan 1:15 2:15 Running, improving and maintaining a site in the real world Jon Galloway 2:15 3:15 Break 3:15 3:30 Real-time Communications with SignalR Jon Galloway 3:30 4:30 Wrap Up Scott Hunter 4:30 5:00 [...]



Scripting .NET project migration to Automatic NuGet Package Restore

Tue, 15 Apr 2014 23:01:45 GMT

Background on NuGet Package Restore and Automatic Package Restore NuGet Package Restore allows you to reference NuGet packages in your project without shipping them with your source code or committing them to source control. The general idea is that the packages are restored - that is, downloaded and installed - into your project when it is build. This offers a number of benefits, including better interaction with source control and smaller code distributions. NuGet Package Restore was originally implemented using an MSBuild task, so whenever you ran a build in Visual Studio the build step would handle the package restore before continuing with the next steps in the build process. This worked, but had a few downsides. For one, it required MSBuild to work, which conflicts with cross-platform development, build servers, etc. Another issue is that it required a separate .nuget directory be added to your Visual Studio solution, including a copy of NuGet.exe and a targets file. Migrating Automatic Package Restore NuGet 2.7 (and later) added support for Automatic NuGet Package Restore without requiring MSBuild. For new projects, this all just automatically works. However, if you had an older project for which you'd manually configured NuGet Package Restore, there is a manual process to be followed: Remove the .nuget folder from your solution. Make sure the folder itself is also removed from the solution workspace. Edit each project file (e.g., .csproj, .vbproj) in the solution and remove any references to the NuGet.targets file. To do so, search for Nuget.targets and remove the entire line where it is referenced. This is really easy - it just takes seconds to do on one project. However, if you've got a lot of projects, it's painful busywork. I was making some updates on the Web Camps Training Kit which has a lot of projects (several demos and hands on labs, each with begin and end state solutions). I wanted a recursive script that dug through all the subfolders and fixed up my projects for me automatically. I asked around on Twitter and heard about IFix, from Terje Sandstrom. It's a nice solution that handles this problem, but I wanted a recursive script, and if I was going to automate IFix with a recursive script I might as well just write a script that handled everything. Enough Talk, Show Me The Script Warning! This script edits all projects and deletes all .nuget and packages directories recursively for the specified path. That means if you ran it from C:\ it would modify every project on your C drive. Obviously, be careful about the current directory and make sure your affected projects are under source control.   Trick 5: Downloading videos using a smarter script That's fine, but it's kind of heavy handed. Let's be honest, have you actually watched all of the videos from an event before? It's more likely that you'll want to pick some based on the topic. I found a great site that builds customized feeds based on the session tags: http://dayngo.com/channel9/Events/a99db53e-aa3d-4089-9859-a2fe017ca357/Build_2014  Disclaimer: This is some random site I found on the internet. Works on my machine. It does generate scripts, so you can see what it's doing. Here I've filtered to show events tagged with ASP.NET, Web API, and Node. Clicking the download button lets me select the formats I want to download. That generates a custom PowerShell script (WGET is also an option) with just the content I picked: $overwrite = $false $webClient = New-Object System.Net.WebClient $feeds = (("Take_Your_Solution_Worldwide_from_the_Start_with_Bing_Translator.mp4","http://video.ch9.ms/sessions/build/2014/2-656_LG.mp4"),("Continuous_Delivery_and_Continuous_Integration_with_Visual_Studio_Online_and_Microsoft_Azure.mp4","http://video.ch9.ms/sessions/build/2014/3-584_LG.mp4"),("What_s_New_for_ASP_NET_and_Web_in_Visual_Studio_2013_Update_2_and_Beyond.mp4","http://video.ch9.ms/sessions/build/201[...]



Looking at ASP.NET MVC 5.1 and Web API 2.1 - Part 4 - Web API Help Pages, BSON, and Global Error Handling

Wed, 26 Feb 2014 19:51:00 GMT

This is part 4 of a series covering some of the new features in the ASP.NET MVC 5.1 and Web API 2.1 releases. The last one! If you've read them all, you have earned twelve blog readership points... after you finish this one, of course. Here are the previous posts: Part 1: Overview and Enums Part 2: Attribute Routing with Custom Constraints Part 3: Bootstrap and JavaScript enhancements Part 4: Web API Help Pages, BSON, and Global Error Handling The sample project covering the posts in this series is here; other referenced samples are in the ASP.NET sample repository. As a reminder, Part 1 explained that ASP.NET MVC 5.1 / Web API 2.1 is a NuGet update for the MVC 5 / Web API 2 releases that shipped with Visual Studio 2013. There will be a Visual Studio update that will make them the defaults when you create new projects. In this post, we'll look at new features in ASP.NET Web API 2.1. Attribute Routing We already looked at the updates to Attribute Routing improvements for both ASP.NET Web API and MVC in the second post in this series, I just want to call it out again since this post is overviewing all of the other new features in ASP.NET Web API 2.1 and the Attribute Routing support for custom constraints is one of the top features in the ASP.NET Web API 2.1 release. As a reminder, custom route constraints make it really easy to create wrap route matching logic in a constraint which can then be placed on ApiControllers or actions like this: [VersionedRoute("api/Customer", 1)] public class CustomerVersion1Controller : ApiController { // controller code goes here } [VersionedRoute("api/Customer", 2)] public class CustomerVersion2Controller : ApiController { // controller code goes here } In that example, the custom VersionedRoute constraint looks for an api-version header and forwards the request to the correct controller. See the post for more information, including a link to the sample application. Help Page improvements Okay, let's dig into some of the cool new features we haven't seen yet. To start with, I'm going to scaffold out a new PersonApiController using the same Person class I've used earlier in this series, shown below: public class Person { [ScaffoldColumn(false)] public int Id { get; set; } [UIHint("Enum-radio")] public Salutation Salutation { get; set; } [Display(Name = "First Name")] [MinLength(3, ErrorMessage = "Your {0} must be at least {1} characters long")] [MaxLength(100, ErrorMessage = "Your {0} must be no more than {1} characters")] public string FirstName { get; set; } [Display(Name = "Last Name")] [MinLength(3, ErrorMessage = "Your {0} must be at least {1} characters long")] [MaxLength(100, ErrorMessage = "Your {0} must be no more than {1} characters")] public string LastName { get; set; } public int Age { get; set; } } //I guess technically these are called honorifics public enum Salutation : byte { [Display(Name = "Mr.")] Mr, [Display(Name = "Mrs.")] Mrs, [Display(Name = "Ms.")] Ms, [Display(Name = "Dr.")] Doctor, [Display(Name = "Prof.")] Professor, Sir, Lady, Lord } And we're using the standard Web API scaffolding: Nothing has really changed for the top level ASP.NET Web API Help Page - you get a generated list of API calls for each API Controller. What has changed is what you see when you click through on one of the API calls, e.g. the PersonApi GET method. Here's how that looked in ASP.NET Web API 2.1: It shows sample data in JSON and XML, and you can kind of guess what they are if you've named your model properties well, but there's no information on type, model attributes, validation rules, etc. Here's how it looks in ASP.NET Web API 2: The Response Formats section hasn't changed, but now we have a Resource Description area at the top. Let's take a closer look at that: Here we're clearly displaying both the type and validation rules. Note that the Saluta[...]



Looking at ASP.NET MVC 5.1 and Web API 2.1 - Part 3 - Bootstrap and JavaScript enhancements

Tue, 28 Jan 2014 23:17:00 GMT

This is part 3 of a 4 part series covering some of the new features in the ASP.NET MVC 5.1 and Web API 2.1 releases. Part 1: Overview and Enums Part 2: Attribute Routing with Custom Constraints Part 3: Bootstrap and JavaScript enhancements Part 4: Web API Help Pages, BSON, and Global Error Handling In this post, we'll be focusing on some client-side improvements to ASP.NET MVC 5.1. As a reminder if you haven't read the first post, these updates are currently delivered via a NuGet update to your existing ASP.NET MVC 5 / Web API 2 applications. They'll be part of the File / New Project templates included in an upcoming Visual Studio update. EditorFor now supports passing HTML attributes - Great for Bootstrap The new ASP.NET project templates all include Bootstrap themes. Bootstrap uses custom class names for everything - styling, components, layout, behavior. That made it frustrating that you couldn't pass classes down to the Html.EditorFor HTML helper: you either had to use specific HTML Helpers like Html.TextBoxFor (which do allow you to pass HTML attributes, but don't benefit from some of the other nice features in HTML.EditorFor, like Data Attribute support for display and input validation) or give up on using the Bootstrap classes and style things yourself. In the 5.1 release, you can now pass HTML attributes as an additional parameter to Html.EditorFor, allowing you to get the best of both. Here's an example of why that's useful. In the first post in the series, we scaffolded a simple create controller and associated views. The Create view ended up looking like this: That's okay, but it's not taking advantage of any of the Bootstrap form styling (e.g. focus indication, element sizing, groups, etc.) and it won't do anything special with custom Bootstrap themes. A great start would be just to add the "form-control" class to the form elements. That just involves changing from this: @Html.EditorFor(model => model.FirstName) to this: @Html.EditorFor(model => model.FirstName, new { htmlAttributes = new { @class = "form-control" }, }) When I make that update to the textboxes, I get this view: You'll notice some subtle improvements, like the focus highlight on the FirstName field, nicer textbox size and validation layout for Age, etc. These are just really simple things with a  very basic model, but they give a quick idea of the improvement here. Also nice is that I can pass the attributes on Html.EditorFor when displaying the entire model. Here I've updated the entire form section to just use one EditorFor call, passing in the model: @using (Html.BeginForm()) { @Html.AntiForgeryToken()

Person


@Html.ValidationSummary(true) @Html.EditorFor(model => model, new { htmlAttributes = new { @class = "form-control" }, })
} Note that to make sure the Id property didn't display and to use the custom radio enum display template (as explained in the first post in the series), I added two annotations to my model. Here's how the model and associated Enum look: public class Person { [ScaffoldColumn(false)] public int Id { get; set; } [UIHint("Enum-radio")] public Salutation Salutation { get; set; } public string FirstName { get; set; } public string LastName { get; set; } public int Age { get; set; } } //I guess technically these are called honorifics public enum Salutation : byte { [Display(Name = "Mr.")] Mr, [Display(Name = "Mrs.")] Mrs, [Display(Name = "Ms.")] Ms, [Display(Name = "Dr.")] Doctor, [Display(Name = "Prof.")] Professor, Sir, Lady, [...]



Looking at ASP.NET MVC 5.1 and Web API 2.1 - Part 2 - Attribute Routing with Custom Constraints

Fri, 24 Jan 2014 23:03:00 GMT

I'm continuing a series looking at some of the new features in ASP.NET MVC 5.1 and Web API 2.1. Part 1 (Overview and Enums) explained how to update your NuGet packages in an ASP.NET MVC application, so I won't rehash that here. Part 1: Overview and Enums Part 2: Attribute Routing with Custom Constraints Part 3: Bootstrap and JavaScript enhancements Part 4: Web API Help Pages, BSON, and Global Error Handling The sample project covering the posts in this series is here; other referenced samples are in the ASP.NET sample repository. In this post, we'll look at improvements to attribute routing for both ASP.NET MVC and ASP.NET Web API. First, a quick review of what routing constraints are used for. Intro to Routing Constraints ASP.NET MVC and Web API have both offered both simple and custom route constraints since they first came out. A simple constraint would be something like this: routes.MapRoute("blog", "{year}/{month}/{day}", new { controller = "blog", action = "index" }, new { year = @"\d{4}", month = @"\d{2}", day = @"\d{2}" }); In the above case, "/2014/01/01" would match but "/does/this/work" would not since the values don't match the required pattern.  If you needed something more complex than a simple pattern match, you'd use a custom constraint by implementing IRouteConstraint and defining the custom logic in the Match method - if it returns true, the route is a match. public interface IRouteConstraint { bool Match(HttpContextBase httpContext, Route route, string parameterName, RouteValueDictionary values, RouteDirection routeDirection); } Route Constraints in Attribute Routing One of the top new features in ASP.NET MVC 5 and Web API 2 was the addition of Attribute Routing. Rather than defining all your routes in /App_Start/RouteConfig.cs using a series of routes.MapRoute() calls, you can define routes using attributes on your controller actions and controller classes. You can take your pick of whichever works better to you: continue to use traditional routing, use attribute routing instead, or use them both. Attribute routing previously offered custom inline constraints, like this: [Route("temp/{scale:values(celsius|fahrenheit)}")] Here, the scale segment has a custom inline Values constraint which will only match if the the scale value is in the pipe-delimited list, e.g. this will match temp/celsius and /temp/fahrenheit but not /temp/foo. You can read more about the Attribute Routing features that shipped with ASP.NET MVC 5, including inline constraints like the above, on this post by Ken Egozi: Attribute Routing in ASP.NET MVC 5. While inline constraints allow you to restrict values for a particular segment, they're both a little limited (e.g. they can't operate over the entire URL, and some more complex thing that aren't possible at that scope). To see more about what changed and why, see the issue report and changed code for this commit. Now with ASP.NET MVC 5.1, we can create a new attribute that implements a custom route constraint. Here's an example. ASP.NET MVC 5.1 Example: Adding a custom LocaleRoute Here's a simple custom route attribute that matches based on a list of supported locales. First, we'll create a custom LocaleRouteConstraint that implements IRouteConstraint: public class LocaleRouteConstraint : IRouteConstraint { public string Locale { get; private set; } public LocaleRouteConstraint(string locale) { Locale = locale; } public bool Match(HttpContextBase httpContext, Route route, string parameterName, RouteValueDictionary values, RouteDirection routeDirection) { object value; if (values.TryGetValue("locale", out value) && !string.IsNullOrWhiteSpace(value as string)) { string locale = value as string; if (isValid(locale)) { return string.Equals(Locale, locale, StringComparison.OrdinalIgnoreCase); } } return false; } private bool isValid(string locale) { [...]



Looking at ASP.NET MVC 5.1 and Web API 2.1 - Part 1 - Overview and Enums

Tue, 21 Jan 2014 22:44:00 GMT

This is the first in a four part series covering ASP.NET MVC 5.1 and Web API 2.1 Part 1: Overview and Enums Part 2: Attribute Routing with Custom Constraints Part 3: Bootstrap and JavaScript enhancements Part 4: Web API Help Pages, BSON, and Global Error Handling The sample project covering the posts in this series is here; other referenced samples are in the ASP.NET sample repository. ASP.NET MVC 5.1, Web API 2.1 and Web Pages 3.1 were released on January 20. I call it the star-dot-one release, not sure if that one's going to stick. Here are the top links to find out more: The announcement blog post: Announcing the Release of ASP.NET MVC 5.1, ASP.NET Web API 2.1 and ASP.NET Web Pages 3.1 Release notes ASP.NET MVC 5.1 release notes Attribute routing improvements Bootstrap support for editor templates Enum support in views Unobtrusive validation for MinLength/MaxLength Attributes Supporting the ‘this’ context in Unobtrusive Ajax Various bug fixes ASP.NET Web API release notes Global error handling Attribute routing improvements Help Page improvements IgnoreRoute support BSON media-type formatter Better support for async filters Query parsing for the client formatting library Various bug fixes ASP.NET Web Pages 3.1 is a bug fix release, here's the list of fixed bugs Let's run through what's involved in getting them and trying some of the new features. Nothing to Install, just NuGet package updates As I mentioned in my last post, ASP.NET has moved from a "big thing" that you install every few years. The ASP.NET project templates are now mostly a collection of composable NuGet packages, which can be updated more frequently and used without needing to install anything that will affect your dev environment, other projects you're working on, your server environment, or other applications on your server. You don't need to wait for your hosting provider to support ASP.NET MVC 5.1, ASP.NET Web API 2.1 or ASP.NET Web Pages 3.1 - if they supported 5/2/3 they support 5.1/2.1/3.1. Easier said, if your server supports ASP.NET 4.5, you're set. However, there are some new features for ASP.NET MVC 5.1 views that require you to be running the most recent Visual Studio update to get editing support. You're installing the Visual Studio updates when they come out so that's not a problem, right? For Visual Studio 2012, you should have ASP.NET and Web Tools 2013.1 for Visual Studio 2012. You'd need this for ASP.NET MVC 5 support in Visual Studio 2012, so no real change there. For Visual Studio 2013, you should have Visual Studio 2013 Update 1. This update is needed to get nice editor support for the new ASP.NET MVC 5.1 Razor View features (e.g. Bootstrap overloads). Okay, Let's Have a Look Then Game plan: I'm going to take an ASP.NET MVC 5 + Web API 2 project, update the NuGet packages, and then throw some of my favorite features in there. In this case, I'm opting for the "mostly Web API template" since it includes both MVC and Web API, and it includes help pages right out of the box. I could go with "mostly MVC" + Web API, but then I'd need to install the Web API Help Page NuGet package and I might strain a muscle. Now I'll open the Manage NuGet Packages dialog and check for updates. Yup, there they are. Since this is a throw-away project I'll throw caution to the wind and click Update All. If this were a real project, I might just update the three new releases so as not to pick an unnecessary fight with JavaScript libraries. But I'm feeling lucky today so Update All it is. Wow, look at them go! jQuery 2.0.3 even. It's a party. (anti-party disclaimer for those who might be getting carsick: I didn't [...]



ASP.NET - A last look back at 2013, looking ahead to 2014

Sat, 18 Jan 2014 00:07:13 GMT

There's something about getting into a new year that makes us step back and consider the bigger picture. Where is it all headed? Am I making the most out of my life? What web tools and products has Microsoft released lately? I got to present a few Web Camps in December, in Oslo and Vancouver. I was reminded that there are some people - we'll call them normal developers who have work to do - don't sit there refreshing the Microsoft downloads new releases page all day. I don't understand them, but I appreciate that they exist. We announce stuff all the time, but it's hard to keep up with what's important, what you need to know, and stuff you should start paying attention to because it's going to be a big deal really soon. So here's my quick summary of the important things that happened in 2013 and what I think it suggests we watch for in 2014. The Big Picture One ASP.NET This has been a thing for brewing for a bit, but really came together in 2013. With Visual Studio 2013, you really can mix and match ASP.NET MVC + Web API + Web Forms + SignalR + "your framework here" and they all get along. This has been a lot of work over several releases: breaking out functionality out into packages, setting up common components like routing and identity so they're universal, moving to common HTML and CSS for the project templates, Visual Studio tooling changes, etc. That all culminated with the Visual Studio 2013 release, where we finally have just one ASP.NET project with a la carte support for Web Forms, MVC, Web API, and more. What's probably more important is that you can also add functionality after you've created a project, so if you decide later to add MVC libraries to your Web Forms project it's no big deal. Visual Studio as a great editor for front-end (HTML / CSS / JavaScript) files Again, this one has been growing over time: Visual Studio 2012 introduced new JavaScript and CSS editors. The JavaScript editor added tons of new features like ECMAScript 5 support, code outlining, brace matching, go to definition, dynamic IntelliSense. The CSS editor added things like much better IntelliSense, color picker, snippets, lots of HTML5 / modern web development support. It also included Page Inspector - a built-in browser view that shows a running view of your site (e.g. live data from the database, JavaScript is evaluated, everything's running end to end) and allows you to click on an an element and find the line of code that produced the HTML. But the HTML editor in Visual Studio 2012 was old, and that prevented adding modern web development features. In Visual Studio 2013, the HTML editor was completely rewritten to allow for the cool (MEF based) extensibility that the CSS editor in Visual Studio 2012 leveraged so heavily. That allowed for new support for all kinds of new modern features like IntelliSense for AngularJS, built-in CoffeeScript and LESS editor support and more. The HTML editor features in Visual Studio 2013 get even better with the Web Essentials extension, which I'll talk about in a minute. And we haven't even mentioned Browser Link yet! Browser Link takes the smarts that went into Page Inspector, hooks it up with a real-time Web Socket connection (powered by SignalR) that's hosted inside of Visual Studio, and gives me real-time, two-way interactivity between my server-side code and any running browser. That means I can run my site in Visual Studio, pop open Chrome or Opera or Firefox or IE or some mobile emulator, hover over an element in the browser and see the source of that HTML highlighted in Visual Studio. That is a huge, huge timesaver I've been wanting for a very long time. The point is that Visual Studio 2013 ships with newly rewritten, advanced editors for your front-end web files. Like me, you may have seen Visual Studio as an editor for back-end code but went to a lightweight notepad style text [...]



Two great Kickstarter projects ending soon: Durandal JavaScript framework and bitCommander File Manager

Wed, 08 Jan 2014 22:01:12 GMT

I like Kickstarter. It's not a store, it's an easy way to help fund creative projects. You back projects you find exciting at different reward levels, and then follow along with the project's progress. I blogged about the AGENT watch last June and was excited to see them hit 10x their goal - I'm really looking forward to getting my AGENT watch when they ship. Preemptive disclaimer: As I said, it's not a store. You're funding a project with goals and risks and target timelines. The average contribution amounts aren't that high and I fund projects that I want to support, so I'm okay with that. If you're not, Kickstarter's not your thing, and that's fine too. I wanted to help get the word out about two recent Kickstarter projects I've backed (and been tweeting about): Durandal and bitCommander. Both end soon (bitCommander ends on Jan 9, Durandal ends on Jan 10). Durandal Durandal is an open source JavaScript framework that helps you build full-featured single page applications. Ward Bell summed up what's unique about Durandal pretty well: What’s so great about it? What’s distinctive about it? Rob has his inventory of laudable features (and its impressive). Here are some of the aspects of nextGen Durandal that I love … and that have no equal among alternative frameworks: Convention over configuration – I hate writing and maintaining “switch board” code to connect FooViewModel to FooView and FooRoute etc. I want to say “Foo” and be done with it … until and unless I have a compelling reason to break convention. Customizable conventions – Rob makes good choices but I’m free to define my own. Page life-cycle – Durandal has baked in understanding of the birth and death of “pages” so I don’t have to make up my own hacks to ensure that new pages are initialized on creation and cleaned up on destruction. Asynchrony throughout – Need to wait for the user to confirm or cancel before moving off the page? That’s easy in Durandal because asynchrony is plumbed through the page life-cycle and everywhere else. Dynamically load optional modules on-demand? Easy. Diagnostics – With debug mode turned on the console tells me exactly what choices Durandal is making for me as they happen. I can tap into that logging pipeline with my own diagnostics. Write less, do more – You all know what I mean. We all want to write less code. That’s the motherhood and apple pie that every framework promises. They usually deliver something else. Check out the nextGen Durandal sample video and tell me what other technology is that clear and concise. We talked to Rob Eisenberg about what he wants to accomplish on the Durandal Kickstarter on Herding Code: Herding Code 182: Durandal Kickstarter with Rob Eisenberg Download / Listen: http://herdingcode.com/wp-content/uploads/HerdingCode-0182-Durandal-Kickstarter.mp3 One of the things that really stood out for me was what Rob's doing with cutting edge browser and JavaScript technologies for the Durandal nextGen. He's investing heavily in a module system that works with ES6 modules, AMD and CommonJS. He's building on HTML Templates and Web Components. In addition to light weight, modular code, he's seeing 2-3x performance benefits over AngularJS. And it's all polyfilled so it works in current browsers while waiting for these features to ship. The result is that this is a great investment not only in a great next-generation SPA framework, but in the web in general: by backing Rob, you're getting real-world implementation of these specs early so we can get them right the first time. The main benefit of backing this Kickstarter is that you free Rob up from consulting work so Durandal gets these amazing features faster. The secondary benefit for backers is that Rob will be producing some great training series - v[...]


Media Files:
http://herdingcode.com/wp-content/uploads/HerdingCode-0182-Durandal-Kickstarter.mp3




A look at the new Visual Studio Online "Monaco" code editor

Thu, 14 Nov 2013 06:00:11 GMT

One of the most interesting announcements at the Visual Studio 2013 Launch today was the Monaco editor in Visual Studio Online. I've seen little hints of this coming - for example, Scott Hanselman's post in August: A rich new JavaScript code editor spreading to several Microsoft web sites. And if you looked around the command-line Kudu interface on an Azure Web Site (available at https://.scm.azurewebsites.net) there's been a lightweight file editor available for a little while. After the announcement today, I dug up enough info to be dangerous and took it for a quick spin. Quick disclaimer: this is me playing around for a bit, it's not an official announcement. Some top Monaco editor links Visual Studio 2013 Launch: Announcing Visual Studio Online - Soma's announcement post gives a quick overview. More importantly, it links to a series of videos on Channel 9 which overview the Monaco editor and demonstrate using it in a few different scenarios. Channel 9 series: Visual Studio Online "Monaco" First Steps (2 minutes, 26 seconds) Navigating the environment (4 minutes, 29 seconds) Editor Tips and Tricks (8 minutes, 45 seconds) Getting started with ASP.NET (2 minutes, 41 seconds) Getting started with node (5 minutes, 33 seconds) Getting started with PHP (4 minutes, 10 seconds) Using LESS in node (3 minutes, 15 seconds) Debugging node (2 minutes, 52 seconds) Getting started with TypeScript (3 minutes, 48 seconds) I'll embed some of these videos at the end of the post - not here, or you'd get distracted and you'd never read the rest of the post, right? The big one: Visual Studio Online updates post on the Visual Studio Online features timeline news feed thing. Can I call it a blog? I just don't know. But it's wonderful. Specifically, the Announcing Visual Studio Online “Monaco” section shows how to turn it on and get started. Walkthrough: Editing an ASP.NET site in the browser Full disclosure: I tried bumbling my way through this and made a mess, then went crying to David Ebbo for help. He set me straight. Step 1: Set up a Windows Azure Web Site with git deployment First, I'm going to create a new ASP.NET site in Visual Studio 2013 and deploy it to git. Now, I could use Visual Studio Online's git hosting - of course it works well, and works with the Visual Studio Online Monaco editor. But you'd suspect some tricky business, so I'm going to use a GitHub repository. So, I'm creating a simple ASP.NET MVC 5 application (with no authentication so I don't need to deploy a database) and pushing it to a GitHub repository. Now I'm dropping in a standard .gitignore and initializing the repo, then pushing to GitHub. git init git add . git commit -m "Initial commit" git remote add github https://github.com/jongalloway/PlayingWithMonacoEditor.git git push -u github master Now I'm going to create a new Windows Azure Web Site using that GitHub repo as the source. This has been available for a long time, but I'm showing the steps in case it's new to you. Step 2: Set up for editing using Visual Studio Online Okay, we've got a live repo and the site's deployed. Now we want to edit that source using Visual Studio Online. Here's the trick I learned from David Ebbo - you want to create another Windows Azure Web Site that's just associated with the source, not the deployment. So I head back into the portal and create a new Web Site just for source editing. Oops, I created it in Western Europe. Good thing the internets are fast. Now, in the new site, I head over to the Configure tab and enable "Edit in Visual Studio Online". Can you feel it? We're almost there. Promise. Now I head over to the Dashboard tab, and click on[...]



Top things web developers should know about the Visual Studio 2013 release

Thu, 17 Oct 2013 21:36:03 GMT

ASP.NET and Web Tools for Visual Studio 2013 Release NotesASP.NET and Web Tools for Visual Studio 2013 Release NotesSummary for lazy readers: Visual Studio 2013 is now available for download on the Visual Studio site and on MSDN subscriber downloads) Visual Studio 2013 installs side by side with Visual Studio 2012 and supports round-tripping between Visual Studio versions, so you can try it out without committing to a switch Visual Studio 2013 ships with the new version of ASP.NET, which includes ASP.NET MVC 5, ASP.NET Web API 2, Razor 3, Entity Framework 6 and SignalR 2.0 The new releases ASP.NET focuses on One ASP.NET, so core features and web tools work the same across the platform (e.g. adding ASP.NET MVC controllers to a Web Forms application) New core features include new templates based on Bootstrap, a new scaffolding system, and a new identity system Visual Studio 2013 is an incredible editor for web files, including HTML, CSS, JavaScript, Markdown, LESS, Coffeescript, Handlebars, Angular, Ember, Knockdown, etc. Top links: Visual Studio 2013 content on the ASP.NET site are in the standard new releases area: http://www.asp.net/vnext ASP.NET and Web Tools for Visual Studio 2013 Release Notes Short intro videos on the new Visual Studio web editor features from Scott Hanselman and Mads Kristensen Announcing release of ASP.NET and Web Tools for Visual Studio 2013 post on the official .NET Web Development and Tools Blog The .NET Web Development and Tools Blog has a lot of good post about the release Scott Guthrie's post: Announcing the Release of Visual Studio 2013 and Great Improvements to ASP.NET and Entity Framework Scott Hanselman did a series of quick feature overview videos on the ASP.NET site. These are really, really well done. Watch them here: http://www.asp.net/visual-studio/overview/2013 Okay, for those of you who are still with me, let's dig in a bit. Quick web dev notes on downloading and installing Visual Studio 2013 I found Visual Studio 2013 to be a pretty fast install. According to Brian Harry's release post, installing over pre-release versions of Visual Studio is supported.  I've installed the release version over pre-release versions, and it worked fine. If you're only going to be doing web development, you can speed up the install if you just select Web Developer tools. Of course, as a good Microsoft employee, I'll mention that you might also want to install some of those other features, like the Store apps for Windows 8 and the Windows Phone 8.0 SDK, but they do download and install a lot of other stuff (e.g. the Windows Phone SDK sets up Hyper-V and downloads several GB's of VM's). So if you're planning just to do web development for now, you can pick just the Web Developer Tools and install the other stuff later. If you've got a fast internet connection, I recommend using the web installer instead of downloading the ISO. The ISO includes all the features, whereas the web installer just downloads what you're installing. Visual Studio 2013 development settings and color theme When you start up Visual Studio, it'll prompt you to pick some defaults. These are totally up to you -whatever suits your development style - and you can change them later. As I said, these are completely up to you. I recommend either the Web Development or Web Development (Code Only) settings. The only real difference is that Code Only hides the toolbars, and you can switch between them using Tools / Import and Export Settings / Reset. Web Development settings Web Development (code only) settings Usually I've just gone with Web Development (code only) in the past because I just want to focus on the code, although the Standard toolbar does make it easier to switch default web br[...]



Free 6 hour online course - Developing ASP.NET MVC 4 Web Applications Jump Start

Wed, 09 Oct 2013 20:17:34 GMT

The videos for the Developing ASP.NET MVC 4 Web Applications Jump Start Jump Start event are live on Microsoft Virtual Academy. This is an entire 9 session course, covering the official ASP.NET MVC certification course material. If you've been wanting to learn more about ASP.NET MVC - or are perhaps studying for the ASP.NET MVC 4 certification (70-486), this is a great way to get started. If you have friends or co-workers who are learning ASP.NET MVC, please share this with them. I had the privilege of working with Christopher Harrison, an actual professional trainer who knows this course material pretty well. I think the end result turned out really well - just as I was typing this post I heard from someone who told me how much they enjoyed it:  "It's definitely a solid ramp up for people who are new (like myself) to MVC. Also, much more entertaining then most other tutorials I've seen around." That's exactly what we were hoping for - serious training that's fun to watch. For example, there were several surprise spaghetti awards given out by the video crew during the day. Take the course The Microsoft Virtual Academy site has a nice system that tracks which modules you've completed, lets you download the slides for each course, etc. You can skip through the sessions as you want, and there's no big registration to go through to get started. So hop on over: Developing ASP.NET MVC 4 Web Applications Jump Start What we covered Here's a high level overview of what we covered: Overview of ASP.NET MVC What is ASP.NET MVC? How is ASP.NET MVC different from Web Forms? Why use ASP.NET MVC? Developing ASP.NET MVC 4 Controllers and Models Creating Controllers Adding Actions Creating MVC Models Working with Code First Developing ASP.NET MVC 4 Views Razor Syntax HTML Helpers Partial Views Integrating JavaScript and MVC Using AJAX Using jQuery Implementing Web APIs Developing Web API Controllers Calling HTTP Services from Client-Side Code Deploying ASP.NET MVC Site Walkthrough Creating a site on Windows Azure Web Sites Deploying an ASP.NET MVC Application with Visual Studio Web Deploy What’s Next and Resources Sneak peak at Visual Studio 2013 (Preview) and ASP.NET MVC 5 tooling A look at real-time communications with SignalR Resources for keeping up with new ASP.NET releases Source Code The source code for the session is available here: sdrv.ms/1bHo6rU No warranties  or anything on this - it's just what we built during the day. It is, however, based on the official ASP.NET MVC 4 course work, so if you do take the course it will be familiar. Video from the course introduction If you need a little more convincing, here's a video of the 30 minute introduction. Disclaimer: This module starts with a quick introduction to ASP.NET MVC in general before we move systematically through the other components. Don't worry if it's too slow - or too fast - for you, the rest of the course goes more slowly and in more depth through each topic.   style="height: 540px; width: 960px" src="http://channel9.msdn.com/Series/Dev-ASP-MVC4-WebApps/01/player?w=960&h=540" frameborder="0" scrolling="no"> Let us know! Did you like this course? Want to see more, or something different? Please leave feedback on the course page - click the "Send feedback to the course owner" link. [...]



Free online training event: Developing ASP.NET MVC 4 Web Applications Jump Start (Sep 17)

Tue, 10 Sep 2013 20:44:00 GMT

This course is now available online: Developing ASP.NET MVC 4 Web Applications Jump Start Join me and Christopher Harrison (@geektrainer) for a free, full day online training event on Developing ASP.NET MVC4 Web Applications! There's still space available, so register now. Microsoft Virtual Academy (MVA) runs great, high quality live training events. Earlier this year, I had the opportunity to participate in the Building Web Apps with ASP.NET Jump Start with Scott Hanselman and Damian Edwards. For that event, we overviewed the Microsoft web platform, including a lot of new and preview features. For this upcoming event, we're going to be sticking closer to the curriculum for the Developing ASP.NET MVC 4 Web Applications certification exam (70-486) curriculum. Christopher is a full time, professional instructor (MCT, MCPD, MCITP) who's helped people prepare for this exam, and we're going to be basing the Jump Start content on what you'd learn in a 70-486 certification course. Here's an overview of what we're planning to cover: Overview of MVC What is MVC? How is MVC different from Web Forms? Why use MVC? Developing ASP.NET MVC 4 Controllers and Models Creating Controllers Adding Actions Creating MVC Models Working with Code First Developing ASP.NET MVC 4 Views Razor Syntax HTML Helpers Partial Views Integrating JavaScript and MVC Using AJAX Using jQuery Implementing Web APIs Developing Web API Controllers Calling HTTP Services from Client-Side Code Deploying ASP.NET MVC Site Walkthrough Creating a site on Windows Azure Web Sites Deploying an ASP.NET MVC Application with Visual Studio Web Deploy What’s Next and Resources Sneak peak at Visual Studio 2013 (Preview) and ASP.NET MVC 5 tooling A look at real-time communications with SignalR Resources for keeping up with new ASP.NET releases Note that this is a Jump Start to help you get started preparing for the certification exam, but with a one day event we're only covering a portion of the content that's on the exam. Don't expect to watch this and breeze through the exam... but it's a start. And if you're just new to ASP.NET MVC and want a full day (free!) day of training, this is a great opportunity. We're working off some of the certification content, but you don't need to be working towards the certification to take or benefit from the class. To get you warmed up for it, here's the one hour introduction to ASP.NET MVC 4 from the Building Web Apps with ASP.NET Jump Start this past February. style="height: 540px; width: 960px" src="http://channel9.msdn.com/Series/Building-Web-Apps-with-ASP-NET-Jump-Start/Building-Web-Apps-with-ASPNET-Jump-Start-02-Building-and-Deploying-Websites-with-ASPNET-MVC-4/player?w=960&h=540" frameborder="0" scrolling="no"> [...]