News on Monday
more>>
SharePoint Tech Report
more>>


   

 
 
Download Current Issue
ISSUE 2/1/2010 PDF

Need Back Issues?
DOWNLOAD HERE

Receive the print Edition?


 
blogs tab
Visual Studio 2010 Release Candidate Available Today
A Visual Studio 2010 release candidate is available on MSDN.
02/09/2010 09:45 AM EST

Is Microsoft eyeing Office subscription pricing?
Microsoft may be preparing to offer a new Office pricing option called "union," which charges the same for cloud as on-premises.
02/01/2010 09:38 AM EST

Facebook rewrites PHP runtime
Facebook is about to open source its own PHP runtime, written from scratch for speed.
01/30/2010 08:53 PM EST

 

Events calendar tab
2/9/2010 to 2/13/2010
San Francisco
IDG World Expo

2/10/2010 to 2/12/2010
San Francisco
BZ Media

2/17/2010 to 2/25/2010
Atlanta
Python Software Foundation

2/19/2010 to 2/20/2010
Los Angeles
SCALE

2/21/2010 to 2/24/2010
Las Vegas
IBM


 
Most Read Latest News Blog Resources

ASP.NET grows up




July 1, 2009 — 
The seeds that Microsoft planted ASP.NET are now sprouting. .NET 4.0 adds nuance and fit and finish to Microsoft's Web application platform that experts say will lead to better performing, more dynamic applications. But developers will need to rethink how they build them.

A panel of industry luminaries told SD Times that .NET 4.0 addresses longstanding pain points in Web Forms development and introduces significant client-side functionality to ASP.NET AJAX. Also, its Model-View-Controller (MVC) pattern will promote the creation of higher-quality software through greater componentization and testability.

When ASP.NET was introduced, many developers had difficulty making the mental switch from a stateful to stateless world, said Brian Goldfarb, director of developer and user experience platforms at Microsoft. Stateless applications have no record about what has occurred previously, such as earlier configuration settings.

A feature called ASP.NET View State removed the need to understand the difference, so developers that originally built Windows Forms applications could create Web applications more easily, Goldfarb explained.

Despite its good intentions, Microsoft's implementation of View State caused more than a few headaches. "It is a core feature of ASP.NET that made the stateless Web environment feel more like a stateful environment, but it introduced efficiency problems," said Todd Anglin, technical evangelist at Telerik.

In the past, developers were forced to turn off View State globally through ASP.NET's Web configuration, or to disable it control by control, causing applications to use more memory and take extra time for data retrieval, explained Tony Lombardo, Infragistics' lead technical evangelist. "Developers can now opt in instead of manually turning it off. It should make developing [applications] easier without falling into pitfalls that create slow applications."

Microsoft is also delivering improvements around session state. It has been "pretty fat" in the past, and could make applications run slowly, Lombardo said. "Now, there's compression with state."

Likewise, client ID rendering for controls has been modified to reduce the size of HTML files. "It has been a big headache to shrink down [the] size of rendered HTML, because IDs had complex containers. ID strings became large, and as ID strings get longer and longer, the page can get unmaintainable," Lombardo said.

In the past, Infragistics suggested that customers shorten ID strings, but they were sacrificing the readability of the code, Lombardo added. "Microsoft's solution maintains readability and still manages to lighten the HTML markup."

"The majority of development fine-tuning is driven by customer feedback, and it does not always happen at the pace of innovation that people want in the core," Goldfarb said. "We are at the point where the platform is mature, and have the ability to think more about fit, finish and nuance."

From AJA to AJAX
Up until this point, Microsoft's ASP.NET AJAX framework was not true AJAX, said Anglin. "Microsoft's pattern was a heavier, asynchronous approach—more AJA than AJAX."

An AJAX application should only be sending data back and forth from the server, but Microsoft's framework required data to be processed and rendered on the server and then be sent back down to the client, he explained.

Microsoft initially delivered a barebones framework that developers could build on top of, said Lombardo. "It gave us good footing to start building some tools," he said.

Goldfarb said that Microsoft values component makers and that its partner ecosystem for ASP.NET is one of the most successful in the world.

In comparison, .NET 4.0 is almost "paradigm shifting," Anglin remarked. "Now data is processed, transformed and rendered on the client-side." The addition of client-side data binding to the framework has pushed a lot of actions that were previously performed on the server to the client, he said.

When actions move from the server to the client, applications become more responsive and things happen as they would with desktop applications, Anglin said. "The baseline for an interactive application is usually the desktop application."

Client-side templating is also a "huge feature" that shifts functionality and application logic away from the server to a client-side rendering model, said Lombardo. "We have been doing that in our controls for a long time, but with a client-side API, Microsoft is taking it further."

"Templates put functionality in the browser via JavaScript in the background," Anglin explained. "A click edit happens instantaneously, and changes are all persisted back to the server at one time. There are no AJAX update panels and refreshes."

Many developers still want Visual Basic-style interfaces that have forms with properties, and it has taken up until this point for developers to embrace the client-side shift, Lombardo said. "But to get things you want, there is no replacement for client-side programming."

Client-side programming is rendered by newer Web browsers, and newer browsers have beefed up JavaScript engines that will allow developers to "get pretty nice apps" using standard HTML and JavaScript, said Chris Meredith, a product manager at ComponentOne.

The open-source jQuery library ships with the framework. jQuery is the dominant technology for building client-side JavaScript applications in the ASP.NET AJAX framework, Goldfarb noted. "We are able and willing to recognize and adopt industry category leaders to address the limitations of what we've done with our platform."

The shift to MVC
In the same vein, Microsoft has recognized the importance of the MVC pattern to developers, and it views it as a proven, robust way of making applications, Goldfarb said. "The needs of customers have changed now."

ASP.NET's Web Forms is a control-based environment, which allows developers to take their client-side skills and create Web applications easily, he said. "MVC is a fundamental approach differentiation."

MVC follows the ASP.NET programming model, but it leads to better quality of code through a separation of concerns without dependencies, and that enables test-driven development, said Meredith. It also provides more control over how HTML is rendered on a page, whereas ASP.NET renders pages automatically.

The MVC framework also has a URL-routing system that allows developers to define URL mapping rules within applications, said Mehul Harry, technical evangelist for Developer Express. "The control picks pages up and routes as it needs to," he said, adding that the same system would be coming to Web Forms.

While it is true that traditional ASP.NET applications can be broken down into modules, it becomes difficult to maintain the application over its life cycle, Anglin noted. "MVC patterns make it easier to separate concerns. Presentation and application logic can be in two separate places."

Despite its advantages, Microsoft does not want to encourage developers to take their existing applications and rebuild them with a new pattern; however, it does want to change the way that developers think about Web applications, Goldfarb noted. He also acknowledged that some existing investments in components would not fit into the MVC model.

A startup in San Francisco that is building a modern, consumer-facing Web application will want the control and customization that MVC provides, but someone who is building a forms over data applications may not care where angle brackets are, Goldfarb explained. "An MVC app would be standards-based and mashable.

"We are taking the practice of building real software to the Web versus throwing things together quickly, which is great for applications that may only need small changes," he continued. "With MVC, the bar is not higher, but it's different."

"MVC is not a Web Forms replacement and will not be the technology to drive Web Forms to its grave," Anglin noted. "MVC follows the same ASP.NET programming model, but programmers have to do more things manually. The code is no more challenging, but the [helper methods] go away, and the productivity story changes."

"We need to educate developers about what MVC is and what they'll need to do," said Harry. It is a framework that provides a lot of benefits, but people initially struggle with anything that is new, he added.

It is the first release of MVC, and a core group of ASP.NET programming experts will lead the way. "Microsoft is thinking about ways for third-party control vendors to plug into it easier," Harry said.

Developer Express is testing out support for MVC in its controls, but it will focus on developer education before it releases anything, he said.

Controls for MVC models have big differences, and the existing ASP.NET model concept does not fit MVC, Goldfarb noted. "It is more of a template; the intrinsic functionality that is common among Web Forms does not exist in MVC. It is much more modular, and it will be a challenge to retrofit existing component investments to fit the modern model."

"The core MVC people are hesitant to drag controls into the MVC framework. They should be; it is different," Lombardo said. "Developers are looking at MVC and see a blank slate. They don't want to start from scratch and want components to make applications quicker to write.

"A lot of these things were a long time coming. ASP.NET was about how quickly a developer could put together an application. Now it's about things a developer should be concerned about."


Related Search Term(s): ASP.NETMicrosoft


Share this link: http://www.sdtimes.com/link/33584
 

Add comment


Name*
Email*  
Country     


  • Comment
  • Preview
Loading