TechBubbles Microsoft Technology BLOG

Top Features in ASP.NET Web Tools 2012.2

ASP.NET Web Tools 2012.2  is an ASP.NET release with features including entire ASP.NET family (Web Forms, MVC, Web API). This release also includes new tooling for Visual Studio 2012 that improve the web development experience.This post overviews the features in this incremental release. You can download the tools from here.The installation is pretty quick and it would not ask you to reboot your machine. Installing this release would no affect your existing projects as there is no change in the ASP.NET runtime. New project templates and new web tooling are introduced in this release.

What is new in this release?

image

In the new templates department, you have templates for Web Forms for SignalR and ASP.NET Web API. Facebook and Single Page Application templates for ASP.NET MVC. On Web Tooling side you have got updates on Page Inspector, Intellisense and on Editor.

The installation screen looks as below

image

ASP.NET Web Forms update

The new thing in Web Forms is it supports Friendly URLs. Earlier this feature was available as nuguet package but now when you create a new web form project it automatically installs the package and configures for you.It allows you to create nice looking semantic URLs. There is also a support for FriendlyUrlSegments attribute which allows you to bind this to controls or to access it in your methods. The mark up looks as below

image

The code behind in edit.aspx having a method which brings the details of the Album by taking an id

image

By default the Route.config file in App_Start folder contains the below statement

image

SignalR

It is a new addition to ASP.NET, Now it is officially shipped by Microsoft ASP.NET team. SignalR enables you to do the real time browser-server communication that uses the best technology client and server support.

image

In the Add new item dialogue box you can find two new class templates

image

Add the below piece of code to broad cast the hit count to all of it’s clients

image

SingalR allows two things , server to allow methods to call clients and client to call methods on server. In this example the server method is RecordHit and client method is onHitRecorded. The client calls to this method looks as below

image

New features for ASP.NET Web API

ASP.NET Web API ships along with MVC4 , Web API allows you to deliver the formats like JSON and XML.Three new features in this release for Web API are

  • Help Generation
  • Tracing 
  • OData.

When you create a new MVC4 project in Visual Studio 2012, you will get a new area called Help page, it looks at your Web API calls and documents the calls for you.

image

When you run this application you will see a new thing in the header

image

image

The great advantage of this feature is you no need to prepare a document for your API and more over it generates the help on your methods up to date. It is also extensible and you have an option to change the display templates. The trace output window in Visual Studio 2012 shows all the requests that you made to your API

image

OData features can be read here. New templates Facebook Application and Single Page Application have introduced in MVC4

image

using Facebook Application template and its features can be read here more on this release can be read here

About the author

Kalyan Bandarupalli

My name is kalyan, I am a software architect and builds the applications using Microsoft .NET technologies. Here I am trying to share what I feel and what I think with whoever comes along wandering to Internet home of mine.I hope that this page and its contents will speak for me and that is the reason I am not going to say anything specially about my self here.

Add Comment

TechBubbles Microsoft Technology BLOG

Follow me

Archives

Tag Cloud