News

Microsoft Releases ASP.NET 3.5 Extensions Preview

Nothing has prevented ASP.NET developers from using a model view controller (MVC) architecture. But it's likely to get a lot easier with Microsoft's ASP.NET 3.5 Extensions, which will include the highly anticipated MVC option. The first preview of the technology was released today.

"It is going to be great," says Don Demsak, a New Jersey-based .NET solutions consultant and blogger, who is trying out the new framework. "Especially for folks who are doing complicated business domain scenarios or prefer design patterns for more maintainable code."

The Ruby on Rails crowd absolutely loves the MVC style, he says. "So obviously Microsoft is looking to take advantage of that and there is definitely a segment of their core people -- namely the enterprise developers -- who are very interested in moving to the Ruby on Rails side because of that, so Microsoft needed to have an answer."

The ASP.NET 3.5 Extensions CTP showcases MVC, support for REST, additional AJAX functionality, and dynamic data controls, according to a blog posting by Microsoft Developer Division General Manager Scott Guthrie. (It is not a reiteration of ASP.NET Futures released in June 2007.)

The ASP.NET 3.5 Extensions CTP follows Visual Studio 2008 and .NET Framework 3.5, released to manufacturing on November 19. .NET 3.5 integrates ASP.NET AJAX and LINQ. It also adds support for nested Web pages and data view and data grid controls.

Microsoft's MVC

The MVC architecture is used in many Web app frameworks, including Castle's MonoRail, Apache Struts and Ruby on Rails. It enforces a separation of the Web app into components: the interfaces (views), the business logic (models) and a controller that moderates the traffic flow. For developers who are working on large enterprise apps, this means code that can be better maintained, and tested as discrete units to the level of methods and individual classes.

"ASP.NET is so easy to use for the rapid app developer, but for the enterprise folks, the people who need to build maintainable code, ASP.NET is a nightmare because of the design style that Microsoft did," explains Demsak. "It was originally designed for the original VB6 crowd -- using WinForms -- to switch over to the Internet. They did a lot of techniques to make it seamless for them but in taking those shortcuts, in dealing with that encapsulation there, it made it harder to maintain, especially for folks who like to use design patterns to build their code."

The MVC design style conforms to the separation of concerns principle, which makes it a lot easier to maintain code, he says. "The core of MVC is that it makes it easier to write unit tests. So you could test your view and your controller without having to speak HTML -- you don't have to do it through a browser."

Is Microsoft moving to MVC and away from ASP.NET's current component control-driven model WebForms? According to Guthrie, with ASP.NET 3.5 Extensions, developers can choose the MVC design patterns, WebForms, or use both in the same application.

Data-Driven Developments

The dynamic data controls first appeared in the ASP.NET Futures May CTP. This functionality will also be available as a plug-in through the open source .NET toolset SubSonic. The creator of SubSonic, Rob Conery, joined Microsoft in October to "build out" SubSonic on top of ASP.NET as the toolset for the MVC option. As Conery notes in his blog, Microsoft did not buy SubSonic: "SubSonic will remain under the same MPL 1.1 license it always has, and will remain as completely Open Source as it always has--nothing will change at all," he explains. "I'm just getting paid, essentially, to work on it."

The SubSonic toolset includes support for building a data access layer, and a scaffolding framework -- similar to Ruby on Rails -- that enables developers to use pre-built models to "auto-generate" data-driven Web sites.

Microsoft is also planning to release the ADO.NET Entity Framework, which was pushed out of band after the first Orcas beta, and a REST-based data services model in parallel with the ASP.NET 3.5 Extensions, according to Guthrie. Some of the functionality was previewed in the Astoria incubation project.

"Astoria is not part of ASP.NET, it is just a very complementary technology," says Roger Jennings, principal consultant at Oakleaf Systems in Calif., and a blogger on data-related technologies. "It has a great deal of promise, especially in conjunction with Silverlight. And now that Silverlight 2.0 will have JSON, ATOM and RSS wire formats, the two will mesh very nicely."

He adds, "The Entity Framework is not a critical piece of the Astoria project. They can use anything as a data backend."

The ASP.NET 3.5 Extensions release will offer controls to support Silverlight and ASP.NET integration, according to Guthrie.

Extensible Infrastructure

In addition to SubSonic, Microsoft's MVC will support integration with other frameworks and tools. Users will be able to integrate views, models and other components from the MonoRail stack. Launched in 2005, MonoRail is an open source .NET framework based on MVC, run by Castle Project and licensed under Apache Software Foundation 2.0.

The MVC team at Microsoft may have learned a few things from the backlash at the MVP Summit over the problems with the ADO.NET Entity Framework. Many MVPs felt that the company didn't bother to look at other object-relational mapping (ORM) technologies and learn from the pain points.

"The upshot is that Microsoft is actually listening," says Demsak, "especially to enterprise developers who are having a hard time maintaining their code with classic ASP.NET. If you are hitting those pain points, then the MVC framework is something that you might want to look into, because you are getting rid of things like View State and stuff like that which is always a pain."

Microsoft's Web development platforms are rapidly advancing -- and in some respects, catching up. ASP.NET, which is built on .NET, is the programming model for the Internet Information Services (IIS) component of Windows Server. Windows Server 2008 will ship with IIS7; both platforms are based on a new modular architecture. IIS7 offers tighter integration with the .NET framework, allowing developers to use any .NET language, according to Guthrie. Microsoft is also working on a Web application deployment framework for IIS7 that will enable users to "roll back" to earlier versions of a Web app, and deploy across a single server or server farms.

ASP.NET 3.5 Extensions is expected to RTM by next summer.

About the Author

Kathleen Richards is the editor of RedDevNews.com and executive editor of Visual Studio Magazine.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube