Scott Hanselman

Visual Studio 11 Beta in Context

February 29, '12 Comments [53] Posted in ASP.NET | ASP.NET MVC | Microsoft
Sponsored By

Today Visual Studio 11 Beta is released and available for download. Don't want to read a big blog post? Phooey on you then! ;)

Made it this far? OK, cool. I wanted to do a post that would not only point you to a bunch of other resources, but more generally answer the obvious questions. The questions that I asked before I went to work for Microsoft four years ago. I always ask: What's changed, and why should I care?

"One ASP.NET"

One of the things that the fellows and I are working on that will be more obvious  after the beta and even a little after the final release is this idea of One ASP.NET. We're sweeping through the whole framework, samples, templates and NuGet to make sure things work together cohesively. You'll hear more about this as we firm it up.

Some guiding principles for ASP.NET are these:

  • Every reasonable combination of subsystems just works
  • The model is easily extended by community projects (not just us!)
  • Every subsystem or application type includes a *.Sample that works together with others

Here's the boxes diagram I've been playing with.

These principles are some of the things that drove (and continue to drive) ASP.NET this development cycle. We are trying to give you great mobile options, great HTML5, CSS3 and JavaScript support and also including open source libraries like Modernizr, jQuery, jQuery UI and Knockout.

We are working towards a more pluggable, more friendly but still powerful ASP.NET. Again, more on this soon and some surprises. We'll see more interesting uses of NuGet, more plug-ablity, more examples, and more systems working together.

You want to mix and match a ASP.NET Web API, serialization with JSON.NET, use MongoDB, run Web Pages and Web Forms side by side, add some some SignalR and a few WCF enterprise Web Services? Add in ELMAH, Glimpse, Image Resizer and your favorite NuGet packages? Totally. It's Encouraged. It's all One ASP.NET.

.NET Framework 4.5 Beta

For the most part in my experience, .NET 4.5 is a very compatible release. .NET 4.5 upgrades .NET 4 as .NET 3.5 upgraded .NET 3 (and 2, although we're trying to play by the versioning rules now, thank goodness.) The vast majority of .NET 4 apps should work fine on .NET 4.5 unless you are doing something exotic. I haven't had any problems myself, but I've heard of some unusual edge cases with folks doing ILMerge and a few other things.

There's a number of new improvements. Some of my personal favorites and features I'm most interested in are (these are somewhat obscure, but nice fixes, IMHO):

  • Ability to limit how long the regular expression engine will attempt to resolve a regular expression before it times out.
  • Zip compression improvements to reduce the size of a compressed file.
  • Better performance when retrieving resources.
  • Updates to MEF to better support generics.
  • new Asynchronous methods in I/O classes for Asynchronous File Operations
  • Support for Internationalized Domain Name parsing
  • WPF Ribbon Control
  • WCF HTTPS protocol mapping
  • WCF Asynchronous streaming support
  • WCF Contract-first development  as well as ?singleWSDL for service URLs

Test your apps and PLEASE tell us if you have trouble. This is a beta and there is a still time to fix things.

Please don’t hesitate to post a comment on team blogs, or at one of the forums that are actively monitored: Connect (report bugs), UserVoice (request features) and MSDN Forums (ask for help). I know that folks have issues with Connect sometimes, but folks are actively monitoring all these places and are trying to get back to you with clear answers.

ASP.NET Core Framework

Here's a detailed release notes document about what's new in ASP.NET 4.5 and Visual Studio "Web Developer" 11 Beta. The core ASP.NET framework has a lot of new support around asynchrony. Asynchrony has been a theme throughout the whole Visual Studio 11 process and ASP.NET is full of improvements around this area.

There's support for the await keyword, and Task-based modules and handlers.

private async Task ScrapeHtmlPage(object caller, EventArgs e) 
{
WebClient wc = new WebClient();
var result = await wc.DownloadStringTaskAsync("http://www.microsoft.com");
// Do something with the result
}

Even IHttpAsyncHandler (a classic, and a difficult thing to get right) has a friend now:

public class MyAsyncHandler : HttpTaskAsyncHandler
{
// ...
// ASP.NET automatically takes care of integrating the Task based override
// with the ASP.NET pipeline.
public override async Task ProcessRequestAsync(HttpContext context)
{
WebClient wc = new WebClient();
var result = await
wc.DownloadStringTaskAsync("http://www.microsoft.com");
// Do something with the result
}
}

There's security improvements with the inclusion of core encoding routines from the popular AntiXssEncoder library, and you can plug in your own.

ASP.NET also has WebSockets support when running on Windows 8:

public async Task MyWebSocket(AspNetWebSocketContext context) 
{
WebSocket socket = context.WebSocket;
while (true)
{
...
}
}

Bundling and Minification is built in and is also pluggable so you can swap out own techniques for your own, or your favorite open source alternative.

There's lots of performance improvements including features for dense workloads that can get up to a 35% reduction in startup time and memory footprint with .NET 4.5 and Windows 8.

ASP.NET 4.5 also supports multi-core JIT compilation for faster startup and more support for tuning the GC for your server's specific needs.

ASP.NET Web Forms

There's lots of refinements and improvements in Web Forms. Some favorites are strongly-typed data controls. I blogged about this before in my Elegant Web Forms post. There's two way data-binding in controls like the FormView now instead of using Eval() and you'll also get intellisense in things like Repeaters with strongly typed modelTypes.

Web Forms also gets Model Binding (all part of the One ASP.NET strategy) which is familiar to ASP.NET MVC users. Note the GetCategories call below that will bind to a View with IQueryable.

public partial class Categories : System.Web.UI.Page
{
    private readonly DemoWhateverDataContext _db = new DemoWhateverDataContext();
 
    public void Page_Load()
    {
        if (!IsPostBack)
        {
            // Set default sort expression
            categoriesGrid.Sort("Name", SortDirection.Ascending);
        }
    }
 
    public IQueryable<Category> GetCategories()
    {
        return _db.Categories;
    }
}

In this example, rather than digging around in the Request.QueryString, we get our keyword parameter this way:

public IQueryable<Product>GetProducts([QueryString]string keyword) 
{
IQueryable<Product> query = _db.Products;
if (!String.IsNullOrWhiteSpace(keyword))
{
query = query.Where(p => p.ProductName.Contains(keyword));
}
return query;
}

Web Forms also get unobtrusive validation, HTML 5 updates and elements, and those of you who like jQuery but also like Web Forms Controls (as well as Ajax Control Toolkit fans) will be thrilled to check out the JuiceUI project. It's an open-source collection of ASP.NET Web Forms components that makes jQuery UI available in a familiar way for Web Forms people.

ASP.NET MVC and Web API

Last week I blogged about Making JSON Web APIs with ASP.NET MVC 4 Beta and ASP.NET Web API. ASP.NET MVC 4 includes these new features (and a few more) and is included in Visual Studio 11 Beta.

  • ASP.NET Web API
  • Refreshed and modernized default project templates
  • New mobile project template
  • Many new features to support mobile apps
  • Recipes to customize code generation
  • Enhanced support for asynchronous methods
  • Read the full feature list in the release notes

Matt Milner has a great post on where ASP.NET Web API and WCF proper meet and diverge, and why you'd use one over the other. I'll be doing a more detailed post on this also, but I like Matt's quote:

WCF remains the framework for building services where you care about transport flexibility. WebAPI is the framework for building services where you care about HTTP.

ASP.NET Web Pages 2

New features include the following:

  • New and updated site templates.
  • Adding server-side and client-side validation using the Validation helper.
  • The ability to register scripts using an assets manager.
  • Enabling logins from Facebook and other sites using OAuth and OpenID.
  • Adding maps using the Mapshelper.
  • Running Web Pages applications side-by-side.
  • Rendering pages for mobile devices.

There's lots  more to talk about in Razor and Web Pages 2 that I will talk about when Web Matrix 2 comes out.

Visual Studio - for Web Developers

Lot of new Web Features - Hello Opera users!There's an extensive list of features and fixes on the Web Developer Tools team Blog. Here are my favorites.

The HTML Editor is smart about HTML5 and you can develop smart HTML5 sites with any ASP.NET technique.

The CSS Editor has a new formatter, color picker, better indentation, smart snippets and vendor-specific IntelliSense. That's Webkit and Opera in the screenshot over there.

The Javascript Editor has IE10's Javascript engine and supports Javascript as a 1st class citizen with all the support you get in other languages like Go To Definition, brace matching, and more.

Page Inspector is all new and lets you to see what elements in the source files (including server-side code) have produced the HTML markup that is rendered to the browser. IIS Express is now the default web application host.

All the Links

General Info

Download

Secondary Downloads (for the IT folks)

Got Visual Studio issues? Complain (kindly) and vote up features and concerns at their UserVoice site.

Got ASP.NET issues? Complain to me (kindly) and vote up features and concerns at our UserVoice site or ask questions in the ASP.NET forums. There will also be new videos, tutorials and information at http://asp.net/vnext and we are continuing to update the site with fresh content.

Hope you enjoy the Beta. Please do take a moment to install it, try it out, and offer feedback. There is time for us to make changes, fixes and improvements but only if you give feedback.


Sponsor: My thanks to DevExpress for sponsoring this week's feed. There is no better time to discover DevExpress. Visual Studio 11 beta is here and DevExpress tools are ready! Experience next generation tools, today.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. I am a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web

New ASP.NET website launched

December 2, '11 Comments [39] Posted in ASP.NET | ASP.NET MVC | Microsoft | MSDN
Sponsored By

A few weeks ago we introduced a beta of a freshly designed http://asp.net website. Today we launched it. Jon, myself, and the team that manages the site took lots of your feedback (lots from the comments of the Beta Blog Post) and did our best to incorporate as much as we could. This is just the start, and we've got lots of plans for the future including responsive design, more text content, localization, more HTML 5, HD Video, closed captioning and lots more.

It is a big site with thousands and thousands of pages. However, a lot of those pages were hard to find. We're continuing to try to get folks what they need in fewer clicks.

There's new content for people getting started, including "choosing a technology" videos, the Big Green Button remains with a new download video as well as quick download links for the stuff you're always searching for.

Each top level page (Web Pages, Web Forms, MVC) has a 5 minute app building video and lots more getting stated content. You asked for more text tutorials and we heard you. In-depth tutorials on deployment, working with the Entity Framework, suggested open source projects to check out for each, books, samples, and more. And, you can always find out about the next version of ASP.NET at http://asp.net/vnext.

The new ASP.NET Navigation

The home page header is smaller, per your feedback, making room for more Daily Community Spotlight content as well as pinned announcements. There's a cleaned up Community page with easy to access RSS feeds, a quick navigator and lots more fresh community content packed onto the page. Tutorials are more organized like a living book now and are easier to follow. Tutorials can now appear as multi-part tutorials with better navigation. Forums got a nice facelift, as did the Wiki, and Weblogs. Each technology also includes a great free video course from Pluralsight. Feedback is always appreciated.

Example Nerddinner Tutorial with Multi-part article navigation at right

Videos are larger, video downloads are simpler and links with table of contents are everywhere. All those videos you never could find actually do exist.

New video page includes more information and makes better use of space

The site is still powered by the Open Source CMS Umbraco and we're very happy with it. Jon Galloway worked tirelessly on this new site launch along with TerriM, ScottHu, SridharM, Samir and lots of other folks smarter than I. Jon digs into the new layout and "information architecture" over on his blog so check that out for more details on our thinking.

yslow on aspnetAlso as a part of this process we've gotten the http://facebook.com/aspnet and http://twitter.com/aspnet accounts up and firing on all cylinders. Join us on your favorite social network or subscribe in your favorite reader and we''ll make sure all the fresh Jon Galloway-curated spotlight content is delivered to you as we get it.

I'm also pretty proud of how we're doing in YSlow. The perf on the site is great. The home page is under 100 lines of HTML5, the markup is clean, and we're aiming for similar results in other parts of the site. Soon we'll make the ASP.NET site's personal CDN cookieless and have straight "A's" on YSlow, which is no small feat.

We realize that the #1 piece of feedback from you all is that you don't like the ads. At this point, that's out of my hands, but I'm working with the team on providing less distracting and more reasonably designed ads. Most of the ads are for hosting or controls, and the vendors that get ads are happy with being on the site. We're also working with the bosses on how to ensure that the site is funded appropriately. You don't have to tell me...I get it. Feel free to vote on the ASP.NET User Voice site.

It's never finished, but it's getting there. We're really happy with the improved performance, better navigation, fresher and more relevant content. We've got more in store, so stay tuned.

Hope you like it.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. I am a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web

Request for Comments: Issues with .NET and Microsoft Product Versioning

July 27, '11 Comments [248] Posted in Microsoft | Musings
Sponsored By

Oy.NOTE: I have had this blog post sitting in my drafts for a few months now. I've gotten close to posting it, held back, then gotten close to posting again. Today I noticed that Microsoft published a patch/update to Entity Framework 4.1 (Code First), a product I personally love and support, and they've called it EF 4.1 Update 1. Then I decide to post this. This is not intended as a rant or a complaint, although there is frustration on my part. What I want to know from you, is DO YOU CARE. If you do, then I can make sure your voice is heard. If you don't care, that's cool too.

I really care about how products are versioned and I'm sure you to do, Dear Reader. Naming Things is Step 0 when it comes to understanding Things. I want to talk to you about some things I've noticed around .NET versioning, and see what your thoughts are so that I might share them with TPTB (The Powers That Be).

I noticed recently that Microsoft released something called ".NET 4.0 Platform Update 1." This is an update to the .NET Framework 4 to include new features and functionality around Workflow and Azure. This post isn't specific to this update, but ALL the updates lately, from the .NET Framework, the Entity Framework, SQL Server, and a dozen more.

This was concerning to me for a few reasons. First, Platform Update "1" implies a future Platform Update "N+1." Second, when something that is a platform called 4.0 is updated, you'd expect it to be called 4.1 or maybe 4.0.1. 

I've met with that team, and encouraged them to stick with Semantic Versioning and call these updates .NET 4.0.2, etc. I think they hear me, we shall see.The .NET Framework Team agrees and they've said that will be following Major.Minor.Revision now so the next small release will be 4.0.2! However I may be perceived as Chicken Little as I haven't personally collected broad community opinion.

If you get the Premium version of Visual Studio, you've got a higher SKU than the Professional version. However, if you choose between Premium and Profession versions of Windows 7, get Professional. It's higher.

I recently noticed other products coming out with "Cumulative Update to SP1" and recently "EF 4.1 Update 1" and similar things, not to mention SQL Server. I really think this is confusing to customers. It certainly is to me. I'd like to know if you agree.

In my personal opinion, Microsoft has typically done a (poor) job with naming things - I think that's a fair statement with some exceptions like things like Lync, Kinect, Xbox and NuGet. Sometimes there's engineering reasons for versioning, but mostly it's a combination of marketing, lack of coordination between groups in a large company and a lack of community/customer outrage or just apathy. I think when folks work at a large company for many years it's easy to become complacent and stop fighting what is perceived as "small things."

Versioning and naming isn't set in stone. There isn't a technical reason that I know of to call something a Rollup Update Pack. Only willpower and organizational agreement is needed. If it's important to you, and your voice is heard, it'll become important to the people who make these decisions. Personally, I am a big fan of Semantic Versioning both in concept and in practice and I'd like to see its practical common sense take root at Microsoft.

Here's how the .NET Framework has been versioned so far. You are all familiar with it, probably because you've had to explain it to your boss at some point.

Version Runtime (CLR) Framework
1.0 First Release First Release
1.1 New Small Changes
2.0 New Lots of Changes
3.0 Same as 2.0 WinFX libraries
3.5 Same as 2.0, but new C# 3 Compiler Some Changes
3.5 SP1 Same as 2.0, with C# 3 Whole Lot of Changes
4 New Lots of Changes
4.0 PU1 Same as 4 Workflow and Azure Changes

We can't change the past, but we can influence the future. I would have probably made framework changes Point Releases (.1,.5, etc) and new CLRs or compilers should be Major Releases.

I suspect that product naming folks think that words are easier to understand than numbers, but I think they sell us short. Semantic Versioning would be easier to explain, deal with and sell. I think we need to stop with the Update, Refresh, Rollup, Pack stuff and just change numbers.

Going further, with the release of this new "EF 4.1 Update 1," what should they have called it? I would have said 4.1.5 or 4.2. Probably 4.2 if there were minor new features, and 4.1.5 if it's just patches.

Photo via Creative Commons: Original Photo at http://www.flickr.com/photos/nicmcphee/422442291/

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. I am a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web

Mix 11 - Web Platform and Tools Keynote Demo Script

April 13, '11 Comments [18] Posted in ASP.NET | ASP.NET MVC | HTML5 | IE9 | Javascript | Microsoft | Mix | NuGet | VS2010 | WebMatrix
Sponsored By

It's Day 1 of the Mix 11 conference here in Las Vegas. I work for the Web Platform and Tools (that's ASP.NET, IIS, IIS Media, etc) group and I did the Web Platform demos for Scott Guthrie's part of the keynote. A lot of people in Dev and QA worked hard all year long to make some fun and cool products and as the designated "talking head," I had just 16 minutes to make all of them (people + products) look good. I hope I did them all justice.

We built a backend and a front end for Rob and my sie http://www.thisdeveloperslife.com. The show is something Rob Conery and I do moonlighting on the side (it's our hobby, not our job nor a Microsoft thing) but we needed a new site and this was a fun idea since we built the original site in WebMatrix.

If you'd like ALL the new bits, no matter what's on your machine currently, go to http://www.asp.net/get-started and use one of the new "get everything" green buttons. It'll use Web Platform Installer and if you have nothing, you'll get the free VS Express. If you have Visual Studio proper, you'll get SP1, the new MVC 3 Tools Update as well as stuff like IIS Express and SQL Compact. Get Everything.

We updated the ASP.NET Website for Mix as well, with three new sections. We've also got three 3 intro videos for each technology, as well as an all new Learning Resource section AND free videos from Pluralsight!

Here's how you make the backend I made in the Keynote. You can watch it here. ScottGu and I were after the IE9/10 section. http://live.visitmix.com/Keynotes

You can seek within the Keynote using these links:

If you'd like a MUCH more detailed "Getting Started" tutorial of mine that Rick Anderson just updated to include the new MVC 3 Tools Update, check out the C# version here, and the VB version here.

This blog post just shows you how to do what I did, check out the tutorial for much more detail.

ASP.NET MVC 3 with Tools Update - This Developer's Life Backend Administration

From Visual Studio, click File | New Project and select ASP.NET MVC 3 Application. Name it "Backend."

Add New Project

Click Internet Application and make sure Use HTML 5 is checked.

New ASP.NET MVC 3 Project

Check out your packages.config if you like, or noticed the installed packages in NuGet.

Add Library Package Reference

Right click on Models, select Add Class. Name the file Podcast.cs. Here is your Entity Framework 4.1 Code First model:

namespace Backend.Models
{
public class Episode
{
public int Id { get; set; }
[Required]
public string Title { get; set; }
public DateTime? PublishedAt { get; set; }
public string Summary { get; set; }
public string LeadImage { get; set; }
public string ShortUrl { get; set; }
public virtual ICollection<MusicTrack> MusicTracks { get; set; }
}

public class MusicTrack
{
public int Id { get; set; }
public string Name { get; set; }
public string URL { get; set; }

public int EpisodeId { get; set; }
public Episode Episode { get; set; }
}
}

Now, make sure you compile. I press Ctrl-Shift-B to do this, but you can also do it from the Build Menu.

Right click on Controllers, select Add Controller. Make an EpisodeController. Pick the Entity Framework template (remember you can make your own, if you like. More on this soon!) and click the Data context class dropdown and Make a PodcastContext. Your dialog will look like this.

Add Controller

Compile. Now do the same thing for MusicTrack. Now, check our your Solution Explorer and all your scaffolded code.

Wow, that's a lot of scaffolded code!

Right click on References and select Add Library Reference. You can also do this from the Tools | Library Package Manager menu.

Click on Online on the left side to access NuGet.org, and in the upper right corner, search for "EntityFramework.SqlServerCompact" to bring down support for SQL Server Compact Edition.

Add Library Package Reference (52)

Now, run your app and visit /Episode. Make an episode or three, then visit /MusicTrack.

TDLAdminSite

Homework for you - Extend the Backend Demo!

  • Add the MvcScaffolding Nuget package and rerun the Add Controller commands. What's different?
  • Add an Editor Template for DateTimes with a jQuery DatePicker
  • Add different attributes like [StringLength] or [Range] to your Code First model. Delete the .SDF file in App_Data and re-run. How can you affect your database?
  • Add some other NuGet packages like IE9ify. What cool features can you add like Jump Lists using Javascript?

WebMatrix - This Developer's Life Frontend Administration

Ok, so now we need a frontend for our podcast site. We got one from http://www.templatemonster.com. They can sell you a template and then bring it down directly into Web Matrix. Since you may not want to buy a template just for this demo, you'll want to come up with some basic template for yourself. WebMatrix comes with a Bakery Template and some others, so perhaps try one of those. Perhaps the Bakery Template after clicking Web Site From Template.

We used a template like this, but like I said, I can't give it to you.

TDL Front

Maybe you can start here? ;)

Fourth Coffee - Home - Windows Internet Explorer (54)

You can right click on App_Data and bring in the SQL Database File (Mine was called TDL.sdf, but yours may vary) from the first step with Add Existing File. Some templates include databases. You can use them if you like, or delete them.

Files in Web Matrix

For the demo, I had two database files. The one I created in the first step, and then another one that I already filled out with all our shows earlier.

Lots of data in the database

If you're using the Bakery Template it's a little different from our template since it's about products and includes a featured product, but it's still a cool template.

I skipped some steps in the keynote to make the demo flow, for example, my images were already in an images folder. For this blog post, I'll copy the images from http://www.thisdeveloperslife.com (or you can grab your family photos or whatever) and put them in /images.

Show Images

Next, I'll change the Default.cshtml for my (now) Bakery Template. I'll updated things in the Razor code like Products to Episode, and making sure I'm using column names from the TDL database, and not the Bakery one.

@{
Page.Title = "Home";

var db = Database.Open("TDL");
var shows = db.Query("SELECT * FROM Episodes").ToList();
}

<h1>Welcome to This Developer's Life!</h1>

<ul id="products">
@foreach (var s in shows) {
<li class="product">
<div class="productInfo">
<h3>@s.Title</h3>
<img class="product-image" src="@Href("~/Images/"+ s.LeadImage)" alt="Image of @s.Title" />
<p class="description">@s.Summary</p>
</div>
</li>
}
</ul>

It ends up being not much code. It's not as pretty as the more complex template we used, but you get the idea. You can take templates from anywhere (they don't need to be Razor templates, just HTML!) and then sprinkle in a little Razor code like I did.

I give you, "This Developer's Life - Cheesy Bakery Template Edition":

This Developer's Life Site - Cheesy Bakery Edition

Now if you like, click on Site, then ASP.NET Web Pages Administration (or, just visit /_Admin) and setup your password. I skipped the creating of a password in the keynote and used a site with an existing password we'd setup earlier. Read the instructions carefully.

Bakery6 - Microsoft WebMatrix (57)

The Web Pages Administration site runs local as part of your site, and is how WebMatrix talks to NuGet.org. From here you can get helpers like the Facebook helper, Twitter helper, Disqus helper and more. Some of these helpers, like Disqus, require more setup that I showed in the keynote. For example, you have to visit Disqus.com, sign up for an account and get an API key, then tell your site about it before you use the helper. The Facebook and Twitter helpers also include lots of options, for example, the Twitter helper can be vertical or horizontal, and look different ways. Also check out IE9ify, a jQuery plugin and NuGet package that lets you add JumpLists and IE9 stuff to your site.

ASP.NET Web Pages Administration - Package Manager - Windows Internet Explorer (58)

At the end, I clicked Publish and then just imported the settings file from my ISP. WebMatrix then used WebDeploy to send my site and database to a server. That server was internal to the Mix keynote demo network, but Rob Conery and deployed the site the exact same way at 3am Tues morning. The public site at http://www.thisdeveloperslife.com was written by Rob and I in WebMatrix, uses HTML5, jQuery with SQL CE for a database and is deployed with WebDeploy and sports a tidy HTML5 theme Rob wrote, inspired by the one from the demo.

I'll blog later in a separate post how I made the podcast player with HTML5 audio tags, jQuery and IE9 site pinning.

I hope you enjoy the products Dear Reader as much as we enjoyed building them!

Related Links

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. I am a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web

ASP.NET MVC3, WebMatrix, NuGet, IIS Express and Orchard released - The Microsoft January Web Release in Context

January 13, '11 Comments [35] Posted in ASP.NET | ASP.NET MVC | IIS | Microsoft | NuGet | Open Source | VS2010 | WebMatrix
Sponsored By

image At PDC10 last November I did a talk on the "Unnamed Package of Web Love", showing ASP.NET MVC3 and Razor Syntax, the NuGet Package Manager, as well as SQL Compact Edition and a little "Entity Framework Magic Unicorn." I make up my own names when I don't like what Microsoft names things, as you may notice.

Today Microsoft announced the (actual, final, honest) releases of:

  • ASP.NET MVC3 with Razor
    • Lots of new features, the new Razor syntax, more extensibility hooks, new JavaScript features, better validation, easier caching, better dynamic support, and lots more.
    • This includes the NuGet package manager and the NuGet gallery is also in early beta at http://nuget.org for folks who want to create and publish their own packages)
    • MVCScaffolding
      • Remember all that fun we had with the scaffolding experiment at PDC? Well, my teammate Steve Sanderson has taken the prototype up to version 0.8, and it's pretty fabulous. Go read his blog post, then enjoy "Install-Package MvcScaffolding." You can scaffold views, controllers, repositories, database contexts or even make your own custom scaffolder. Look for more built on scaffolding from Steve and I in the coming months.
    • Updated Beginner Tutorials for ASP.NET MVC 3 in both C# and in VB
  • NuGet
    • NuGet is a package manager for .NET. It ships with ASP.NET MVC, but you can go get it separately if you like. Installing open source libraries is as simple as "install-package elmah" - it's great fun.
  • WebMatrix (also with Razor)
    • WebMatrix is a small development environment that uses the simple Razor syntax to create websites really quickly. You can start from a gallery of existing open source applications or start from scratch. For example, Rob Conery and I wrote the little podcast site and feed for http://thisdeveloperslife.com in a day with WebMatrix.
    • NuGet package management is built into WebMatrix, too! Make a new site, run it, and hit /_admin. Dance.
  • IIS 7.5 Express
    • Yes, you can install it on its own. It's IIS, except it runs as a user process rather than a service. Cassini (Visual Developer Web Server) is dead! It's "just in time" IIS. There when you need it, and not running when it's not used.
    • This is the web server that Web Matrix uses today, but it'll be enabled in Visual Studio 2010 when SP1 comes out.
  • SQL Compact Edition 4
    • SQL Compact Edition is sweet because is a tiny in-process (no services, don't need to be admin) database that's great for small sites that aren't ready for SQL Server proper. It's xcopy-deployable and runs nicely on hosted sites. It's the default database for WebMatrix and I'm using it in Visual Studio for sites where my database isn't big enough to justify a SQL license.
    • You can use SQL Compact today in Visual Studio at runtime, much like I did in my PDC talk, but you won't be able to design and open your database in VS until SP1. (You can use this Non-MS CodePlex project temporarily, but I didn't tell you.)
  • Web Farm Framework 2.0 and Web Deploy
    • Makes setting up multiple servers way easier. Treat and manage groups of servers, use ARR for load-balancing (or use 3rd party balancers), and upgrade, switch, and add servers with PowerShell. Mmm....PowerShell.
  • Orchard 1.0
    • This free, open-source content management system is ready to go. The release is published on the Orchard CodePlex website and Microsoft Web Application Gallery. You can use Orchard all up, or you can take it apart and just use pieces. Mix and match as you like.

It's the January Web Release, say I, and the easiest way to get it is with Web Platform Installer 3.0, which also went live today. Using direct links to products within the Web Platform installer will automatically add any dependencies you might need.

Now what? I'm freaking out!

Folks sometimes say "slow down, you're freaking me out, this is too much new stuff. What about my current stuff?" Here's a few statements from me personally on today's releases.

  • Just because ASP.NET MVC 3 came out today, doesn't mean WebForms doesn't have some cool features coming. Remember that "ASP.NET > ASP.NET MVC". You'll see features and improvements from both technologies move between MVC and WebForms.
  • IIS Express will integrate with VS2010 in SP1 and work with both WebForms and MVC.
  • You can mix Razor Views and Web Forms Views within MVC. The creation/existence of Razor doesn't obviate your existing work.
  • SQL Compact works great with WebForms as well as ASP.NET MVC, not to mention any .NET project. Ever want a tiny database for a command-line app and didn't want the headache? Bam.
  • SQL Compact database can be upgraded into full SQL Server databases when/if you outgrow SQL Compact.
  • While NuGet is bundled with ASP.NET MVC in today's release, you can use it for any .NET project type. Most NuGet libraries are not specific to ASP.NET MVC.

As I've said before, Microsoft is creating new LEGO pieces for software development to round our existing collection of bricks out. Be exited about these bricks, but remember they augment the existing ones, not replace them.

What now?

I'd recommend you go get MVC3 and WebMatrix, preferably at the same time via one of these Web Platform links. That should get you all these other nice things chained in. In the spring when VS2010 SP1 comes out, the tooling and management bits for SQL Compact and IIS Express will be enabled.

Stuff to Get

ReSharper Updated

One other note, the folks at JetBrains were ready for this and spun a new build of ReSharper, so ReSharper 5.1.2 doesn’t interfere with Visual Studio IntelliSense in ASP.NET MVC 3 Razor syntax. Earlier ReSharper 5.x builds had certain issues with Razor IntelliSense that are addressed in 5.1.2. Specifically, ReSharper 5.1.2 doesn’t prevent Visual Studio from automatically providing its own IntelliSense in .cshtml and .vbhtml web pages anymore: both code completion and Parameter Info work as expected. Other than that, ReSharper 5.x doesn’t provide any additional support for Razor: only ReSharper 6 will bring full support for this view engine. Pre-release ReSharper 6 builds are currently available via Early Access Program, so if you're a ReSharper user, be aware!

Enjoy.

Related Links

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. I am a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web
Page 1 of 20 in the Microsoft category Next Page

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.