VS2008

ASPNET MVC Framework Versions & Features

September 14, 2012 .NET, .NET Framework, All, ASP.NET, ASP.NET MVC, Back-2-Bascis, KnowledgeBase, Microsoft, Microsoft SDKs, VisualStudio, VS2008, VS2010, VS2012 1 comment

Introduction

Today, Microsoft’s  ASP.NET MVC framework has become a robust framework for building highly scalable, maintainable  enterprise web applications.  I am just taking you through the journey of ASP.NET MVC since 2009 and where we are today.

ASP.NET MVC is a free, fully supported Microsoft framework for developing great web applications using the Model-View-Controller pattern. It provides total control over your HTML and URLs, enables rich Ajax integration, and facilitates test driven development.

ASP.NET MVC source code is published as open source under the Codeplex umbrella and MS-PL license at the codeplex location http://aspnet.codeplex.com/

Journey of ASP.NET MVC

ASP.NET MVC provides a new Model-View-Controller (MVC) framework on top of the existing ASP.NET runtime. This means that developers can take advantage of the MVC design patterns to create their Web Applications which includes the ability to achieve and maintain a clear separation of concerns (the UI or view from the business and application logic and backend data), as well as facilitate test driven development (TDD).

The ASP.NET MVC framework defines a specific pattern to the Web Application folder structure and provides a controller base-class to handle and process requests for “actions”.

Developers can take advantage of the specific Visual Studio MVC templates within this release to create their Web applications, which includes the ability to select a specific Unit Test structure to accompany their Web Application development.

The MVC framework is fully extensible at all points, allowing developers to create sophisticated structures that meet their needs, including for example Dependency Injection (DI) techniques, new view rendering engines or specialized controllers.

Let’s go through the different versions and what features been introduced in each release.

ASP.NET MVC 1.0  – Released – 13 March 2009

Target Framework & IDE:  .NET Framework 3.5  and Visual Studio 2008 SP1

Since it is the initial release – it had few limitations which were overcome in later releases. But it helped us to build robust web applications with Test Driven Development.

This release included the following features:

  • Visual Studio Tooling Improvements to Add View, Controller and Model.
  • MVC Project teamplates for Visual Studio 2008 SP1.
  • jQuery was officially bundled with the Project template.
  • MVC ASPX view engine syntax highlighting
  • Partial jQuery syntax highlighting (requires jquery-vsdoc.js library to be in Scripts/JS folder).
  • Scaffolding support for creating basic Edit, Create, List, Delete and Details views.
  • Custom Scaffolding support.
  • Custom View Engine support.
  • Highly extensible.
  • Strongly typed HTML and AJAX helpers.
  • Form Post improvements.
  • Model Binder API.
  • Cross Site Request Forgery (CSRF) Protection.
  • FileResult and File() helper method.
  • File Uploading Support.
  • JavaScriptResult ActionResult and JavaScript() helper method.
  • Request.IsAjaxRequest Property.

Ref: http://go.microsoft.com/fwlink/?LinkID=137661&clcid=0x409

Download ASP.NET MVC 1.0 RTM

 ASP.NET MVC 2.0  – Released – 10 March 2010

Target Framework & IDE:  .NET Framework 3.5 SP1, 4.0 and Visual Studio 2008 SP1 & 2010

 What’s New in ASP.NET MVC 2.0

  • Templated Helpers
  • Areas –  For more information, see Walkthrough: Organizing an ASP.NET MVC Application by Areas on the MSDN Web site.
  • Support for Asynchronous Controllers
  • Support for DefaultValueAttribute in Action-Method Parameters
  • Support for Binding Binary Data with Model Binders
  • ModelMetadata and ModelMetadataProvider Classes
  • Support for DataAnnotations Attributes
  • Model-Validator Providers
  • Client-Side Validation
  • New Code Snippets for Visual Studio 2010
  • New RequireHttpsAttribute Action Filter
  • Overriding the HTTP Method Verb
  • New HiddenInputAttribute Class for Templated Helpers
  • Html.ValidationSummary Helper Method Can Display Model-Level Errors.
  • T4 Templates in Visual Studio Generate Code that is Specific to the Target Version of the .NET Framework.
  • API Improvements

For more details information on What’s new in ASP.NET MVC 2 visit http://www.asp.net/whitepapers/what-is-new-in-aspnet-mvc

Download ASP.NET MVC 2 RTM

ASP.NET MVC 3.0 – Released – 13 January 2011

Target Framework & IDE: 4.0 and Visual Studio 2010 SP1, 2012

What’s New in ASP.NET MVC 3.0

  • New Razor View Engine, more simple syntax for view development. Razor syntax is clean and concise, requiring a minimum number of keystrokes.
  • Extensible Scaffolding with MvcScaffold integration.
  • HTML 5 Project Templates.
  • Support for Multiple View Engines.
  • Controller Improvements
  • Global Action Filters
  • New ViewBag property
  • New “ActionResult” Types
    • HttpNotFoundResult. Returns a 404 HTTP status code to the client.
    • RedirectResult. Returns a temporary redirect (HTTP 302 status code) or a permanent redirect (HTTP 301 status code), depending on a Boolean parameter. In conjunction with this change, the Controller class now has three methods for performing permanent redirects: RedirectPermanent, RedirectToRoutePermanent, and RedirectToActionPermanent. These methods return an instance of RedirectResult with the Permanent property set to true.
    • HttpStatusCodeResult. Returns a user-specified HTTP status code.
  • JavaScript and Ajax Improvements
  • Client-Side Validation Enabled by Default
  • Remote Validator –  This enables the client-side validation library to automatically call a custom method that you define on the server in order to perform validation logic that can only be done server-side.
  • JSON Binding Support
  • Model Validation Improvements
    • “DataAnnotations” Metadata Attributes.
    • “ValidationAttribute” Class
    • Validation Interfaces
  • Dependency Injection Improvements

ASP.NET MVC 3 introduces a new concept called a dependency resolver, which greatly simplifies the use of dependency injection in your applications. This makes it easier to decouple application components, which makes them more configurable and easier to test.

Support has been added for the following scenarios:

  • Controllers (registering and injecting controller factories, injecting controllers)
  • Views (registering and injecting view engines, injecting dependencies into view pages)
  • Action filters (locating and injecting filters)
  • Model binders (registering and injecting)
  • Model validation providers (registering and injecting)
  • Model metadata providers (registering and injecting)
  • Value providers (registering and injecting).
  • Other New Features
    • NuGet Integration
    • Partial-Page Output Caching
    • Granular Control over Request Validation
    • Extensible “New Project” Dialog Box
    • Template Scaffolding Improvements
    • New Overloads for “Html.LabelFor” and “Html.LabelForModel”
    • Sessionless Controller Support
    • New “AdditionalMetadataAttribute” Class.
    • AccountController improvements
    • New Intranet Project Template

 

For more details information on What’s new in ASP.NET MVC 3 – visit http://www.asp.net/mvc/mvc3

Download MVC 3.0 RTM and ASP.NET MVC 3 Tools Update

ASP.NET MVC 4.0 – Released – 15 Aug 2012

Target Framework & IDE: 4.0, 4.5 and Visual studio 2010 SP1, 2012

 Top Features

  • ASP.NET Web API
  • Refreshed and modernized default project templates
  • New mobile project template
  • Many new features to support mobile apps
  • Enhanced support for asynchronous methods

 

What’s New in ASP.NET MVC 4

  • ASP.NET Web API

ASP.NET Web API includes support for the following features:

  • Modern HTTP programming model: Directly access and manipulate HTTP requests and responses in your Web APIs using a new, strongly typed HTTP object model. The same programming model and HTTP pipeline is symmetrically available on the client through the new HttpClient type.
  • Full support for routes: ASP.NET Web API supports the full set of route capabilities of ASP.NET Routing, including route parameters and constraints. Additionally, use simple conventions to map actions to HTTP methods.
  • Content negotiation: The client and server can work together to determine the right format for data being returned from a web API. ASP.NET Web API provides default support for XML, JSON, and Form URL-encoded formats and you can extend this support by adding your own formatters, or even replace the default content negotiation strategy.
  • Model binding and validation: Model binders provide an easy way to extract data from various parts of an HTTP request and convert those message parts into .NET objects which can be used by the Web API actions. Validation is also performed on action parameters based on data annotations.
  • Filters: ASP.NET Web API supports filters including well-known filters such as the [Authorize] attribute. You can author and plug in your own filters for actions, authorization and exception handling.
  • Query composition: Use the [Queryable] filter attribute on an action that returns IQueryable to enable support for querying your web API via the OData query conventions.
  • Improved testability: Rather than setting HTTP details in static context objects, web API actions work with instances of HttpRequestMessage and HttpResponseMessage. Create a unit test project along with your Web API project to get started quickly writing unit tests for your Web API functionality.
  • Code-based configuration: ASP.NET Web API configuration is accomplished solely through code, leaving your config files clean. Use the provide service locator pattern to configure extensibility points.
  • Improved support for Inversion of Control (IoC) containers: ASP.NET Web API provides great support for IoC containers through an improved dependency resolver abstraction
  • Self-host: Web APIs can be hosted in your own process in addition to IIS while still using the full power of routes and other features of Web API.
  • Create custom help and test pages: You now can easily build custom help and test pages for your web APIs by using the new IApiExplorer service to get a complete runtime description of your web APIs.
  • Monitoring and diagnostics: ASP.NET Web API now provides light weight tracing infrastructure that makes it easy to integrate with existing logging solutions such as System.Diagnostics, ETW and third party logging frameworks. You can enable tracing by providing an ITraceWriter implementation and adding it to your web API configuration.
  • Link generation: Use the ASP.NET Web API UrlHelper to generate links to related resources in the same application.
  • Web API project template: Select the new Web API project form the New MVC 4 Project wizard to quickly get up and running with ASP.NET Web API.
  • Scaffolding: Use the Add Controller dialog to quickly scaffold a web API controller based on an Entity Framework based model type.

For more details on ASP.NET Web API please visit http://www.asp.net/web-api.

  • Enhancements to Default Project Templates
  • Mobile Project Template
  • Display Modes
  • jQuery Mobile, the View Switcher, and Browser Overriding
  • Task Support for Asynchronous Controllers
  • Azure SDK
  • Database Migrations
  • Empty Project Template
  • Add Controller to any project folder
  • Bundling and Minification
  • Enabling Logins from Facebook and Other Sites Using OAuth and OpenID

For more details information on What’s new in ASP.NET MVC 4 – visit http://www.asp.net/whitepapers/mvc4-release-notes

Download ASP.NET MVC 4.0 RTM

Conclusion:
ASP.NET MVC is an excellent web application development framework with lots of potential for extensibility. For developing large enterprise applications and you are looking for Test Driven Development and maintainability of the source code – ASP.NET MVC is the best choice.

You can go through the given reference links below for additional information. http://www.asp.net/mvc site contains lots of interesting videos and tutorials that may interest in your learning.

References:

http://www.asp.net/mvc

http://www.asp.net/web-api

http://www.asp.net/whitepapers/what-is-new-in-aspnet-mvc

http://www.asp.net/mvc/mvc3

http://www.asp.net/whitepapers/mvc4-release-notes

Wrox Professional ASP.NET MVC 3

Beginning HTML5 Development with Visual Studio 2010

January 3, 2012 .NET, .NET Framework, All, ASP.NET, ASP.NET MVC, ASP.NET MVP, CSS, CSS 3, HTML, HTML5, jQuery, JQuery Mobile, Microsoft, Mobile-Development, VisualStudio, VS2008, VS2010 3 comments

Recently I was doing some research works on HTML5 development using ASP.NET  on Visual Studio 2010.  Really liked the cool features HTML5, CSS3 and Javascript API’s. Major part of my research was around building mobile web applications using jQuery Mobile and Responsive Web.

Quick Intro of HTML5

  • HTML5 will be the new standard for HTML, XHTML, and the HTML DOM.
  • The previous version of HTML came in 1999. The web has changed a lot since then.
  • Today, some elements in HTML 4.01 are obsolete, never used, or not used the way they were intended to. These elements are deleted or re-written in HTML5.
  • HTML5 is still a work in progress. However, most modern browsers have some HTML5 support.
  • HTML5 is a cooperation between the World Wide Web Consortium (W3C) and the Web Hypertext Application Technology Working Group (WHATWG).
  • WHATWG was working with web forms and applications, and W3C was working with XHTML 2.0. In 2006, they decided to cooperate and create a new version of HTML.

Some rules for HTML5 were established:

  1. New features should be based on HTML, CSS, DOM, and JavaScript
  2. Reduce the need for external plugins (like Flash)
  3. Better error handling
  4. More markup to replace scripting
  5. HTML5 should be device independent
  6. The development process should be visible to the public

and that’s  enough about HTML5.

If you are not aware of HTML5, you can read more about HTML5 later through the below links

http://dev.w3.org/html5/spec/Overview.html

http://en.wikipedia.org/wiki/HTML5

http://www.w3schools.com/html5/default.asp

Coming to jQuery Mobile…

  • jQuery Mobile, is a framework that will help you rapidly and confidently develop mobile app user interfaces across popular mobile device platforms like iOS and Android, is perhaps the most popular project out there.
  • The framework boasts a lightweight code base (weighing in at 20KB when minified and gzipped) and a huge bevy of standard user interface elements that mobile device users are accustomed to, such as switches and sliders.
  • JQuery Mobile, hails from a royal family of frameworks and spawned from community of jQuery, the most famous cross platform JS library.
  • Works great with mobile browsers from Symbian, Android through iOS to Blackberry, Window Phone 7, WebOS.
  • Visit http://jquerymobile.com for more details

JQueryMobile has been included as a standard binary include in upcoming ASP.NET MVC 4.0 by Microsoft.

Okey, that was little bit over talk about jQuery Mobile :-), lets look at the point I want to make.

Recent months there is an increasing trend of mobile web applications using HTML5, as most of the recent mobile browsers supports partially or up to certain level on HTML5 capabilities. The idea is that Multi Platform targeted mobile web application development.

 

To enable HTML5 syntax intelli- sense in Visual Studio 2010 we have the following options to try

1.) Visual Studio 2010 Service Pack 1 – Visual Studio 2010 was originally released without HTML5 support, so does SP1 finally add support for it, to some extent.

The entire HTML5 specification isn’t supported but most of the new elements and attributes are. That means you get both intellisense and validation for HTML5 with SP1.

2.) HTML 5 Intellisense for Visual Studio 2010 and 2008 Extension from  Mikhail Arkhipov (Microsoft)

Since Visual Studio 2010 doesn’t have complete support for all HTML5 and CSS3 syntax’s we can try this add-in to enable the support in Visual Studio 2010 and 2008.

3.) Web Standards Update for Visual Studio 2010 SP1

Web Platform and Tools team, spearheaded by Mads Kristensen  has released this update in Visual Studio Gallery. This adds better support for HTML5, CSS3 and new JavaScript features to ALL versions of Visual Studio.

Web Standards Update provides the much wanted HTML5 & CSS3 support to Visual Studio 2010 SP1. It brings VS 2010 intellisense & validation as close to W3C specification as we could get via means of an extension.  The most notable supported features by this extension are:

HTML5 – Video, Audio, Input Type, Drag & Drop, WAI-ARIA, Microdata, Schema.org
Browser API – GeoLocation & Local Storage
CSS3 – 2D Transforms, 3D Transforms, Animations, Background & Borders, Basic Box Model, Basic UI, Behavior, Color, Flexible Box Layout, Fonts, Paged Media, Hyperlink Presentation, Line, Lists, Marquee, Media Queries, Multi Column, Namespaces, Presentation Levels, Ruby, Selectors, Speech, Syntax, Template Layout, Text & Transitions. It also supports vendor specific prefixes like -ms, -webkit & -moz.

Refer to  Scott Hanselman’s blog for more detailed update : http://www.hanselman.com/blog/AnnouncingTheWebStandardsUpdateHTML5SupportForTheVisualStudio2010Editor.aspx

Get Web Standards Update for Microsoft Visual Studio 2010 SP1

4.) A Little Old Way 

To enable Intellisense to work with HTML 5, perform the following steps:

  1. Download the HTML5 support package for Visual Studio 2008 from the Visual Web Developer team here.
  2. Copy the html_5.xsd in C:Program Files (x86)Microsoft Visual Studio 10.0Common7Packagesschemashtml
  3. Edit the correct registry file and replace 9.0 with 10.0
    The file will look like this ( 64 bit VS 2010 Ultimate for me ):

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftVisualStudio10.0Packages{1B437D20-F8FE-11D2-A6AE-00104BCC7269}SchemasSchema 23]
“File”=”htmlhtml_5.xsd”
“Friendly Name”=”HTML 5”
“URI”=”http://schemas.microsoft.com/intellisense/html-5”

  1. Run the registry file to merge it with your registry.
  2. Open Visual Studio 2010
  3. Go to Tools->Options->Text Editor->HTML->Validation
  4. Select target as HTML 5

This would allow you to get Intellisense for your HTML 5 based projects.

referenced from http://amargalla.com/Blog/general/169-html-5-with-visual-studio-2010

Not only that Visual Studio Gallery is having lots of cool Extensions such as Mobile Ready Templates using HTML5, and other extension templates you could try.  Some of them are….

Mobile Ready HTML5 MVC.NET

Creates a mobile ready MVC 3.0 project using the Razor’s view engine and jQuery mobile. Both mobile and desktop versions can be tested using mobile emulators or browsers.

CSS 3 Intellisense Schema

jQuery Mobile Site

Yet another Mobile Ready ASP.NET MVC Template. Use this MVC 3 Razor Site Template with jQuery Mobile boilerplate layout, scripts and CSS referenced to create adaptable websites for a variety of devices.

So we do have wide variety of ways we can enable HTML5 support when using Visual Studio 2010. Of course we already having HTML5 support included with ASP.NET MVC 3.0 Tools Update,  but the above options will help us in enabling Intellisense support for normal ASP.NET applications as well. 

Hope this will help you with your HTML5 development..

Happy Coding !!!

 

Windows Azure Tools for Microsoft Visual Studio 2010 1.5 (September 2011)

September 16, 2011 .NET, .NET Framework, All, AppFabric, Azure, Cloud Computing, Cloud Services, General, Microsoft, VisualStudio, VS2008, VS2010, Windowz Azure No comments

Microsoft has released the latest version of Windows Azure Tools for Microsoft Visual Studio 2010 version 1.5(September 2011).

Windows Azure Tools for Microsoft Visual Studio extend Visual Studio 2010 to enable the creation, configuration, building, debugging, running, packaging and deployment of scalable web applications and services on Windows Azure.

Windows Azure™ is a cloud services operating system that serves as the development, service hosting and service management environment for the Windows Azure platform. Windows Azure provides developers with on-demand compute and storage services to host, scale, and manage web applications on the internet through Microsoft® datacenters.

Windows Azure is a flexible platform that supports multiple languages and integrates with your existing on-premises environment. To build applications and services on Windows Azure, developers can use their existing Microsoft Visual Studio® expertise. In addition, Windows Azure supports popular standards, protocols and languages including SOAP, REST, XML, Java, PHP and Ruby. Windows Azure is now commercially available in 41 countries.

To know more about Azure visit http://www.azure.com & http://windows.azure.com

Download the latest Windows Azure Tools for Visual Studio 2010 v1.5  (VSCloudService.VS100.en-us.msi – 11MB)

To get more information on the downloads and get additional tools downloads visit Microsoft Download Center

Credits to Microsoft

Microsoft releases Silverlight 3.0

July 14, 2009 .NET, All, General, Microsoft, Silverlight, VisualStudio, VS2008 No comments

this is bit late news. – 9.7.2009

Today Microsoft launched its latest effort to “Light up the web”, Silverlight 3 which is now available for download.

Silverlight has come a long way since its version 1.0 launched in 2007. It has even attracted big players like Netflix who use it as their primary video player. 3.0 brings a host of improvements such as “Smooth Streaming” and “out of browser experiences”. Web developers will also appreciate the built in support for GPU acceleration.

Silverlight 3 introduces more than 50 new features, including 3D support, GPU acceleration, H.264 video support and out-of-the-browser capabilities to Silverlight.. The out-of-browser support will enable developers to build applications that work like Adobe’s AIR plugin. Dramatic video performance and quality improvements are also included.

One of my personal favorite features of 3.0 is the inclusion of Microsoft’s Smooth Streaming, the development of which was spearheaded by the Zune team. First shown at this year’s E3, Smooth streaming allows you to watch 720P+ video instantly… with no buffering. You can see sample of how it works at the official site http://www.iis.net/media/experiencesmoothstreaming .Silverlight & Smooth Streaming was most recently used during Michael Jackson’s memorial service at the Staples Center live in Los Angeles. The quality and scaling was amazing, it could take the Live stream from sub-YouTube quality to 720P+ in a matter of seconds .

Only time will tell if Silverlight can make market share progress against Flash, but if 3.0 is any indication of future releases of Silverlight. Flash may want to start keeping an eye in its rearview mirror.

Silverlight 3.0 is available for download right now at http://www.microsoft.com/silverlight/resources/install.aspx