Thursday, April 25, 2013

Mobile devices are everywhere


Mobile devices are everywhere

Over a decade ago, while attending a Microsoft Professional Developers Conference, we were shown a video on the coming mobile future. The video showcased futuristic-looking, Windows-powered phones being used for tasks such as locating the closest doctor’s office. In an era where the Palm VII was the closest thing to a smartphone, the video showcased an impressive future.
Fast forward to 2013: There is no mistake that we are living this future. Smartphones and other mobile devices are everywhere. They are available at multiple price points and are increasingly affordable. In fact, for many in the developing world, their only computer is the powerful smartphone they own.

Mobile application development: growth predictions from Gartner

Gartner predictsi by 2016, at least 50 percent of enterprise e-mail users will rely primarily on a browser, tablet, or mobile client instead of a desktop client. Given the increase in the adoption of mobile devices, it is also expected software application development targeting these devices will also dramatically increase in the coming years. Again, Gartner predicts mobile application development projects targeting smartphones and tablets will outnumber native PC projects by a ratio of 4 to 1 by 2015. Gartner further says that smartphones and tablets will represent more than 90 percent of the new net growth in device adoption in the coming four years.
The Apple app store now boasts over 500,000 apps. Android has close to the same number and the Windows Phone marketplace, a much more recent contender, recently crossed 50,000 and is growing at a fast pace.

Line of business mobile applications: the challenge posed by fragmentation

Given this rather exciting backdrop, we can be certain most line-of-business applications will be made available on mobile platforms in the immediate future. As with any other opportunity, mobile application development, with all its promises, comes with its own set of challenges.
One of the primary challenges is the issue of fragmentation. Estimates from the third quarter of 2012 indicated the mobile operating system market is very fragmented. The variants of Android accounted for about 72% of devices sold during this quarter. iOS accounted for about 14%. Research in Motion (RIM/Blackberry) accounted for about 5% and the Windows Phone platform for around 2% (via Gartner).
Developing a line-of-business application to function on all these devices involves working with the following vastly different technologies:
Platform
Primary development platform
Primary development language
Primary IDE
Development platforms
Android
Java based
Java
Eclipse
Windows, Mac OSX, Linux
iOS
Cocoa Touch framework
Objective C
Xcode
Mac OSX
RIM
Java ME
Java
Eclipse
Windows, Mac OSX
Windows Phone 8
.NET/native
C#/C++
Visual Studio
Windows
The platforms, languages, and tools involved are substantially different, and the effort involved in producing a solution that will work on every platform is substantial.
It is also worth noting there is substantial fragmentation even within some of the platforms. This is especially true with the currently dominant Android platform. Given that Android is open and vendors are free to make changes, there are literally hundreds of Android-based devices available on the market today. Many of them work only with specific levels of the Android API. Some of them have issues with applications that target certain features even within a supported API level. In summary, there is no shortage of fragmentation in the mobile market. This makes the implementation of a native solution on multiple platforms quite daunting.

Mobile web applications: the solution for fragmentation?

Web applications are an alternative to native applications. All the major mobile platforms offer very capable browsers. In addition, with the exception of the Windows Phone browser, most other platform browsers are based on the open source WebKit browser platform powering the desktop versions of Apple Safari and Google Chrome. There is excellent support for JavaScript on these browser platforms; jQuery is fully supported on most current mobile devices. Also, increasing compliance with HTML 5 and related web standards is making the browser even more attractive as a development platform. It is possible to build very functional web sites that work very well on mobile devices with technology available today.

Mobile web applications: additional considerations

Building a mobile web site does not offer the same experience as a native application. Users on specific hardware platforms are accustomed to the enhanced experience offered by native applications. Such applications are installed natively and are always available on the launcher surface of the device. Native applications also obey user interface contracts on the device. For instance, on Android the left menu button usually displays a context menu. Users expect this. Web applications can be installed as shortcuts on the launcher surface for most devices, but they do not obey specific user-interface expectations on the deployed device. Another disadvantage to web applications is they have no native access to hardware beyond what is exposed by HTML and related web standards. For instance, there is no direct access to contacts, images, or the camera on the device. For many applications, access to key elements of device hardware is important.

Hybrid applications: the best of web and native applications

Hybrid applications are completely native applications that embed a platform-specific web browser control. All major mobile platforms including Android, iOS, Windows Phone 8, and Blackberry/RIM support embedding web browser controls as implemented on their platform. Since the wrapper is completely native, users are not often even aware they are interacting with a web application. It is quite possible for the native application to provide a seamless navigation experience.
It is also possible for web pages displayed in the browser to interact with native hardware through a JavaScript bridge, a form of which is available on every major platform. Using such callbacks to the native platform makes it possible to access contacts, capture or select images, and play media. In fact, anything you can accomplish through native code can be accomplished through the bridge. The bridge code will of course have to be re-written for every target platform, but this is usually a small fraction of your total application code.
Also, several JavaScript bridge frameworks exist; the most popular is the open source PhoneGapplatform, which provides a substantial part of this plumbing. We will not be using any frameworks for this purpose. We will instead illustrate the concept with a simple Android wrapper.

ASP.NET MVC: an elegant framework for your backend

Hybrid applications can be built with any web backend, but we firmly believe ASP.NET MVC is ideally suitedii for the implementation of hybrid applications. Below are some aspects that make ASP.NET MVC a good choice for such applications.

Clear separation of responsibilities

The clear separation of responsibilities afforded by the MVC environment makes it possible to have very precise control over HTML output. This makes it very easy to generate mobile-friendly HTML. There is no built-in, self-contained control model that makes it hard to control the markup produced.

Sharing most code with desktop or tablet web clients

If you have an existing ASP.NET MVC application that targets desktop browsers, much of the code can be shared with your mobile application. The controller and model code can be shared almost as is. Only the view needs to be changed. It is not difficult to specify a custom view for mobile clients even with the current version of ASP.NET MVC, but the next version of the ASP.NET MVC makes it even simpler. For additional details on mobile-friendly features in the upcoming version of ASP.NET MVC, please refer to ASP.NET MVC.

Minimal friction with underlying web development model

ASP.NET MVC does not build several layers of abstraction over stateless web applications. Instead, it offers a very simple model that works in alignment with the underlying platform, making it very easy to make AJAX calls or use jQuery on the client. There is no complex abstraction such as ASP.NET Web Forms’ ViewState to worry about.
In addition to the above, it is also worth pointing out the business and database layers that already exist in your current .NET applications can be effectively reused with ASP.NET MVC applications. ASP.NET MVC is completely agnostic about the business and database layers and can work effectively with any system currently in place.

Sample hybrid application

We will now walk through a very simple example to illustrate the development of a hybrid application end-to-end using the ASP.NET MVC platform. The sample displays information on students attending a fictional university named Contoso University. There are a couple of general information links as well as access to a student directory where students can be looked up by name. In order to keep the example clear, the sample does not implement any security or error handling. There is no complex code since the objective of the sample is not to showcase the power of the ASP.NET MVC platform, but to showcase its suitability as a backend platform for the development of hybrid, native mobile applications.
The complete code for this sample is available at bit.ly/mvc-native-mobile-apps.
Prerequisites to work with the sample code:
  • ASP.NET MVC 3 with Visual Studio 2010 (any version including the Express Edition).
  • Functional installation of the Android SDK and the Android Development Tools plugin for Eclipse.
  • Detailed instructions and requirements are available here.
  • jQuery and jQuery Mobile. Local copy is not required since the sample code will simply reference the jQuery CDN.

The ASP.NET MVC backend

In the sample code, the provided _Layout.cshtml contains script references to the jQuery and jQuery Mobile libraries. They are not required to build an ASP.NET MVC mobile application, but they do handle a lot of the grunt work. We use jQuery Mobile in our sample to simplify formatting content for mobile devices.
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" />
<link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"></script>
Most mobile web clients assume a web page is sized at about 900 pixels and will automatically scale to display the entire page on the device. With a mobile site optimized for a smaller device, we can provide a hint to the device that it should not scale but should instead use the width of the device. This is accomplished via the use of the viewport meta tag as shown below.
<meta name="viewport" content="width=device-width, initial-scale=1.0 ">
The default index action method on the home controller is mapped to the following view markup.
<nav >
    <ul id="menu" data-role="listview">
        <li>@Html.ActionLink("About Us", "AboutUs", "Home")</li>
        <li>@Html.ActionLink("Contact Us", "ContactUs", "Home")</li>
        <li>@Html.ActionLink("Student Directory", "StudentDirectory", "Home")</li>
    </ul>
</nav>
We have a simple unordered list with three action links. We specify the list should be automatically formatted as a list view by the jQuery Mobile runtime using the “data-role=listview” attribute setting. This is all that is required to display the following initial UI on a mobile device.
 Figure 1. Initial screen
The jQuery Mobile runtime takes care of formatting it as a list view. As mentioned earlier, jQuery Mobile is not needed. You can pick the formatting and scripting approach that suits your needs best.
The sample contains the views displayed when the About Us and Contact Us options are invoked. These screens are straightforward and do not require any further explanation.
The Student Directory link displays a page with student names grouped by starting letter. The page also displays the number of students listed under each letter.
Figure 2. Student directory initial screen
Clicking on any option displays a list of students, as seen below.
 Figure 3. Student directory
The student directory views are also fairly simple. They iterate through and display data in a list. The view displaying student details is shown below.
@{

    ViewBag.Title = "Student Directory";
    Layout = "~/Views/Shared/_Layout.cshtml";
    var random = new Random();
}

<ul data-role="listview">
@foreach (string student in ViewBag.Students)
{ 
    <li>

        @{var number = random.Next(1000, 9999); }

        <img src="@Url.Content("~/Content/images/UserImages/80-80/" + student + ".jpg")" alt="@student"/>
        <h3>@student</h3>
        <h4>919-555-@number</h4>
    </li>
}
</ul>
It is a good idea to run the ASP.NET MVC backend in a desktop browser and test it out before proceeding to review the Android wrapper that we will work with next.
You can also directly test on a mobile browser provided the test site is accessible from your test device. If both the development PC and your test device are on the same network, it is possible to make setting changes to the ASP.NET development browser or IIS Express to allow access to the web application from your test device. Such access is blocked by default.
An easier, alternate approach is to use a proxy, which simply redirects traffic on an external port to the internal server. This is the approach we often use. The proxy we use is available for download from GitHubiii.

Android wrapper

The code for the Android wrapper that hosts the web application inside a native Android application is reproduced below.
package com.syncfusion.contoso;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.webkit.WebView;
import android.webkit.WebViewClient;

public class ContosoActivity extends Activity {

    WebView mWebView;

    private class ContosoWebViewClient extends WebViewClient {
        @Override
        public boolean shouldOverrideUrlLoading(WebView view, String url) {
            view.loadUrl(url);
            return true;
        }
    }
     

    /** Called when the activity is first created. */          
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        mWebView = (WebView) this.findViewById(R.id.webview);

        // Disable scrollbars 
        mWebView.setVerticalScrollBarEnabled(false);
        mWebView.setHorizontalScrollBarEnabled(false);

        // Scrollbar Overlay Content
        mWebView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);

        mWebView.getSettings().setJavaScriptEnabled(true);
        mWebView.getSettings().setAppCacheEnabled(false);
        mWebView.loadUrl("http://your-web-link");
        mWebView.setWebViewClient(new ContosoWebViewClient() );
    }

    @Override
    public boolean onKeyDown(int keyCode, KeyEvent event) {
        if ((keyCode == KeyEvent.KEYCODE_BACK) && mWebView.canGoBack()) {
            mWebView.goBack();
            return true;
        }
        return super.onKeyDown(keyCode, event);
    }
}
The code is quite simple to follow.
  • WebView is the Android equivalent of the WebBrowser control. It is a wrapper around the default WebKit-based Android browser.
  • We obtain access to an instance of the Android WebView control (defined in an XML layout file and instantiated by the Android runtime at execution).
  • We enable the use of JavaScript on this WebView instance since JavaScript is disabled by default with the WebView control.
  • We then make a few adjustments to the display of the scrollbar–basically turning it off to mimic the look and feel of a native application.
  • We then load the actual web application using a call to the loadUrl API on the WebView instance. your-web-link should be changed to point to your web application.
  • The last section of the code handles the invocation of the hardware back button and causes the embedded WebView to navigate to the previous page.
As you can see this code is not tied to the web application in any direct manner and will not change substantially from application to application. You will only need to add additional code when you require access to specific hardware functionality on the device. We do not delve deeper into this topic here but if you are interested in investigating this further, please look up information on the addJavascriptInterface method of the WebView.
For simplicity, we have described the Android wrapper only. Similar wrappers and extension mechanisms exist on all other major mobile platforms.
Figure 4. Contact Us page displayed on Android 4.0 Emulator inside a native application shell

Conclusion

Hybrid applications are a very promising solution worth looking into for any line-of-business mobile application. They are not suited for scenarios where extensive access to native hardware is required (such as with games) but will work very well in most other scenarios. Any solution implemented with a web backend is also more likely to be future-proof. The HTML standard has evolved slowly over the years and is unlikely to dramatically change as proprietary solutions often tend to do. It offers a stable base on which applications can be built with the certainty that they will continue to work for the foreseeable future. Mobile platform vendors are putting an extraordinary amount of effort into the implementation of HTML 5 and related standards. This will also serve to make web applications more powerful and able to accomplish a substantial subset of what is possible with native applications.
You can leverage your existing .NET web development skills and produce powerful solutions that work on a broad cross-section of devices. At Syncfusion, we are excited by the immense potential offered by hybrid applications.

Secure ASP.NET Applications with Identity and Access Tool


Microsoft recently announced the released of Identity and Access Tool for Visual Studio 2012that enables you to secure ASP.NET, ASP.NET MVC and WCF services with claims based identity. It also provides an ability to accept users from multiple identity providers and adds the necessary configuration for the selected identity provider.
The extension works by updating web.config file with the required settings to enable the Windows Identity Foundation and includes a code generation module that generate a discovery page.
In order to work with Identity and Access Tool, you need to follow the steps mentioned below
  • Create a new ASP.NET MVC Project using Visual Studio 2012
  • Go to Tools | Extensions and Updates
  • Select the option Online from the left side navigation menu from the displayed dialog
  • Visual Studio 2012 populates the available extensions from the Visual Studio gallery
  • Select Page 2 from the bottom page navigator
  • Select Identity and Access Tool, click Download button and follow the on screen instructions to complete the installation process
  • Right click on the project name from the Solution Explorer and provide the required values on the Identity and Access dialog.
Figure 1 - Identity and Access Tool
Identity and Access Tool
Identity and Access Tool enables you to develop and test applications using a local development STS, corporate identity provider like ADFS2 via HTTPS including the usage of Windows Azure Access Control Service to connect to other identity providers such as LiveID, Google, Yahoo and Facebook.

ASP.NET - Data Access Guidance


Microsoft has published Data Access Guidance for ASP.NET 4.5. Most of the changes are related to new features in 4.5, such as those in Web Forms and the new ASP.NET Web API.Some notes from the guidance -
Use ORMs wherever possible with ASP.NET Web Forms and MVC, but ADO.NET directly (through the Database helper) in ASP.NET Web Pages
For WebForms data controls
For Displaying a Single Record - Use FormView to customize generated HTML; for maximum automation of HTML generation use DetailsView
For Displaying Lists - Use ListView to customize generated HTML; Repeater for customized HTML but read-only access and better efficiency (but lesser advanced features); and GridView for maximum automation of HTML generation
ASP.NET Web Forms data binding methods -
Data Source Controls for simple binding without writing any code
Model Binding when it is feasible to write data retrieval and update code
Manual Data Binding when fine-grained control over binding needed or model binding not supported
Data-Binding Expressions
Eval and Bind for weakly typed data
Bind and BindItem for strongly typed data
Use colon in opening delimiter (<%#:) to enable automatic HTML-encoding
Notably, there is a guidance on how to choose between WCF Data Services and ASP.NET Web API for your web services -Choose WCF Data Services if you want to quickly expose a database over HTTP for use inside a firewall on an internal company network.Conversely, choose Web API for Internet-based services because the whitelist approach is more secure than the blacklist approach.WCF uses a black-listing approach to security restrictions (by default everything is made available) whereas Web API uses a white-listing approach (by default nothing is made available)There are a lot of walkthroughs for various scenarios covered on MSDN – you can refer it for more details.

ASP.NET and Web Tools 2012.2 with Enhancements for MVC, Azure and SignalR


Microsoft has released ASP.NET and Web Tools 2012.2 with enhancements for Visual Studio Web Tooling, ASP.NET Web API, Web Forms, MVC, Windows Azure Authentication including support for SignalR.ASP.NET and Web Tools 2012.2 includes updated ASP.NET templates for jQuery, jQuery UI, jQuery Validation, Modernizr, Knockout and other open source NuGet packages. Moreover, you will be able to publish to Windows Azure web sites from within Visual Studio 2012 with an ability to update local to remote files and vice versa.ASP.NET and Web Tools 2012.2 includes Visual Studio 2012 Page Inspector enhancements which include JavaScript selection mapping and CSS live updates. With this release, Visual Studio 2012 code editor supports syntax highlighting for CoffeeScript, Mustache, Handlebars and JsRender. Moreover, HTML editor provides Intellisense support for Knockout bindings and enables you to paste JSON as a .NET class. It also enables you to add extensibility hooks so that third-party mobile emulators can be installed as a VSIX."If you have installed an earlier version of Mads Kristensen's excellent (and free) Web Essentials 2012 extension, you'll want to update it to the latest version before installing today's ASP.NET and Web Tools 2012.2 update," says Scott Guthrie, Corporate Vice President, Server and Tools Business, Microsoft.ASP.NET Web API provides support for OData endpoints that enables you to work with rich query semantics, paging, $metadata, CRUD operations and custom actions over any data source. The release includes a new tracing functionality which enables you to diagnose problems either using Visual Studio 2012 or on Windows Azure.Moreover, the updated Web API projects now include a link to an automatically generated help page that shows how to call your web API including the display of all of your API endpoints, HTTP verbs, parameters, sample request and response messages. It is also possible to customize the help page by adding custom documentation and test client functionality.ASP.NET and Web Tools 2012.2 includes Visual Studio 2012 template for creation of SignalR projects as well as adding SignalR support to existing Web Forms and MVC applications including full support for friendly URLs with an ability to pass parameters to pages as segments of the URL. The new release also provides support of friendly URLs for mobile devices. For instance, YourPage.Mobile.aspx is the format that will be rendered by default on a mobile browser."ASP.NET and Web Tools 2012.2 doesn't change any GAC'ed (Global Assembly Cache) files. It won't mess up your install of ASP.NET or change any existing projects. It's changes are either tooling within Visual Studio, or additions and improvements via local NuGet packages," said Scott Hanselman, Program Manager, Microsoft.ASP.NET and Web Tools 2012.2 enables you to build a Facebook application with the help of a new application template and are displayed inside the Facebook chrome via an iframe. It also includes a single page template for ASP.NET MVC which enables you to build interactive client-side web apps using HTML 5, CSS 3 and the popular Knockout and jQuery JavaScript libraries. Moreover, community contributed MVC templates such as BreezeJS, Ember, DurandalJS and Hot Towel are also included with the latest release.ASP.NET and Web Tools 2012.2 delivers a new Windows Azure Authentication mechanism for MVC, Web Pages, and Web Forms, that enables your application to authenticate Office 365 users from your organization including an ability to create users in your own custom Windows Azure Active Directory domain.Steve Gentile commented that he hope to see support for an AngularJS template in the next version.

Dhana says typescript enhancements are missing.

ASP.NET and Web Tools 2012.2 with Enhancements for MVC, Azure and SignalR


Microsoft has released ASP.NET and Web Tools 2012.2 with enhancements for Visual Studio Web Tooling, ASP.NET Web API, Web Forms, MVC, Windows Azure Authentication including support for SignalR.ASP.NET and Web Tools 2012.2 includes updated ASP.NET templates for jQuery, jQuery UI, jQuery Validation, Modernizr, Knockout and other open source NuGet packages. Moreover, you will be able to publish to Windows Azure web sites from within Visual Studio 2012 with an ability to update local to remote files and vice versa.ASP.NET and Web Tools 2012.2 includes Visual Studio 2012 Page Inspector enhancements which include JavaScript selection mapping and CSS live updates. With this release, Visual Studio 2012 code editor supports syntax highlighting for CoffeeScript, Mustache, Handlebars and JsRender. Moreover, HTML editor provides Intellisense support for Knockout bindings and enables you to paste JSON as a .NET class. It also enables you to add extensibility hooks so that third-party mobile emulators can be installed as a VSIX."If you have installed an earlier version of Mads Kristensen's excellent (and free) Web Essentials 2012 extension, you'll want to update it to the latest version before installing today's ASP.NET and Web Tools 2012.2 update," says Scott Guthrie, Corporate Vice President, Server and Tools Business, Microsoft.ASP.NET Web API provides support for OData endpoints that enables you to work with rich query semantics, paging, $metadata, CRUD operations and custom actions over any data source. The release includes a new tracing functionality which enables you to diagnose problems either using Visual Studio 2012 or on Windows Azure.Moreover, the updated Web API projects now include a link to an automatically generated help page that shows how to call your web API including the display of all of your API endpoints, HTTP verbs, parameters, sample request and response messages. It is also possible to customize the help page by adding custom documentation and test client functionality.ASP.NET and Web Tools 2012.2 includes Visual Studio 2012 template for creation of SignalR projects as well as adding SignalR support to existing Web Forms and MVC applications including full support for friendly URLs with an ability to pass parameters to pages as segments of the URL. The new release also provides support of friendly URLs for mobile devices. For instance, YourPage.Mobile.aspx is the format that will be rendered by default on a mobile browser."ASP.NET and Web Tools 2012.2 doesn't change any GAC'ed (Global Assembly Cache) files. It won't mess up your install of ASP.NET or change any existing projects. It's changes are either tooling within Visual Studio, or additions and improvements via local NuGet packages," said Scott Hanselman, Program Manager, Microsoft.ASP.NET and Web Tools 2012.2 enables you to build a Facebook application with the help of a new application template and are displayed inside the Facebook chrome via an iframe. It also includes a single page template for ASP.NET MVC which enables you to build interactive client-side web apps using HTML 5, CSS 3 and the popular Knockout and jQuery JavaScript libraries. Moreover, community contributed MVC templates such as BreezeJS, Ember, DurandalJS and Hot Towel are also included with the latest release.ASP.NET and Web Tools 2012.2 delivers a new Windows Azure Authentication mechanism for MVC, Web Pages, and Web Forms, that enables your application to authenticate Office 365 users from your organization including an ability to create users in your own custom Windows Azure Active Directory domain.Steve Gentile commented that he hope to see support for an AngularJS template in the next version.

Dhana says typescript enhancements are missing.

ASP.NET and Web Tools 2012 Update


ASP.NET and Web Tools 2012 Update


Microsoft has released an update for ASP.NET and Web Tools 2012. The update adds features to ASP.NET and Visual Studio. The update will be included as part of Visual Studio 2012 Update 2, and is also available for download.
The update adds syntax highlighting within the HTML editor, so you get syntax highlighting for client side template languages including CoffeeScript, Mustache, JsRender and Handlebars.
The HTML editor also adds Intellisense for Knockout.js bindings. If you’re editing LESS files, you’ll also get syntax highlighting, Intellisense, and validation. The other editor improvement is the ability to paste JSON as a .NET class, and have Visual Studio automatically generate .NET classes inferred from the JSON.
The mobile emulator has also been improved with the addition of extensibility hooks so that third-party emulators and unusual browsers can be installed as a VSIX. This means that if you’ve installed an emulator, you’ll be able to preview websites you’ve developed on the emulated devices.
Templates have been updated in the new release. All the ASP.NET templates have updated versions of jQuery, jQuery UI, jQuery Validation, Modernizr and Knockout, though existing projects will obviously use the older versions unless you update them.
The improvements to ASP.NET start with OData support in the ASP.NET Web API. You can make use of OData endpoints in both ATOM and JSON-light formats. OData gives you support for rich query semantics, paging, $metadata, CRUD operations, and custom actions over any data source. You can read more about ASP.NET Web API OData support here.
SignalR is now included out of the box and fully supported. SignalR gives you a simple API for creating server-to-client remote procedure calls (RPC) that call JavaScript functions in client browsers from server-side .NET code. It also has an API for managing connections. The new support includes templates for creating SignalR projects, and the addition of SignalR support to existing Web Forms and MVC applications.




Web Forms have been improved with support for Friendly URLs, so you no longer need to have the .aspx extension. Web Forms also now has support for device specific pages, so when you create a .aspx page such as mypage.aspx, it can also have mypage.mobile.aspx. You can also write your own code to map a user-agent string to a specific device name.
Other improvements include an updated Single Page Application template, MVC Facebook Application Template, and the ability to work on web sites using the same publishing tools as Web Projects. This includes the ability to publish to Windows Azure Web Sites. For a good roundup of the improvements see the release announcement on Scott Guthrie’s blog.

Asp-Net-and-web-tools-2012-2-update-announced.aspx


ScottGu announced the final release of ASP.NET and Web Tools 2012.2 Update.

From his blog:

I’m excited to announce the final release of the ASP.NET and Web Tools 2012.2 update.  This update is a free download for Visual Studio 2012 and .NET 4.5, and adds some great additional features to both ASP.NET and Visual Studio.

Today’s update makes no changes to the existing ASP.NET runtime, and so it is fully compatible with your existing projects and development environment. Whether you use Web Forms, MVC, Web API, or any other ASP.NET technology, there is something in this update for you.

Click here to download and install it today! This ASP.NET and Web Tools update will also be included with the upcoming Visual Studio 2012 Update 2 (aka VS2012.2).

1. About VS 2012, Scott mentioned:

The Visual Studio 2012 editor has several improvements. With today’s update VS now supports syntax highlighting for:

CoffeeScript
Mustache
Handlebars
JsRender
2. In ASP.NET Web API, Scott wrote:

New built-in tracing functionality now lets you easily diagnose problems with Web API whether you’re running in Visual Studio or on Windows Azure. Tracing output from Web API is automatically written to the Visual Studio output window, IntelliTrace, and any other trace listener that you would like, including Windows Azure Diagnostics. The output shows the full Web API pipeline for all requests, including any exceptions or errors that occur, what controller and action were selected, model binding, the format that was negotiated, and the response.

3. ASP.NET Friendly URLs are supported now.
4. ASP.NET MVC Enhancements

5. Included in today’s release is Visual Studio 2012 template support for creating SignalR projects as well as adding SignalR support to existing Web Forms and MVC applications. Read more about SignalR at http://www.asp.net/signalr.