DNN Blog

Microsoft Declares the Future of ASP.NET is Web API

by Shaun Walker on Sunday, June 17, 2012 3:54 AM

Web APISitting on a plane on my way home from Tech Ed 2012 in Orlando, I thought it would be a good time to jot down some key takeaways from this year’s conference. Some of these items I have known since the Microsoft MVP Summit which occurred in Redmond in late February ( but due to NDA restrictions I could not share them with the developer community at large ) and some of them are a result of insightful conversations with a wide variety of industry insiders and Microsoft employees at the conference.

First, let’s travel back in time 4 years to the Microsoft MVP Summit in 2008. Microsoft was facing some heat from market newcomer Ruby on Rails and responded with a new web development framework of its own, ASP.NET MVC. At the Summit they estimated that MVC would only be applicable for ~10% of all new web development projects. Based on that prediction I questioned why they were investing such considerable resources for such a relative edge case, but my guess is that they felt it was an important edge case at the time as some of the more vocal .NET evangelists as well as some very high profile start-ups ( ie. Twitter ) had publicly announced their intent to use Rails.

Microsoft made a lot of noise about MVC. In fact, they focused so much of their messaging and marketing hype around MVC that it appeared that WebForms was essentially dead. Yes, it may have been true that Microsoft continued to invest in WebForms, but from an outside perspective it really appeared that MVC was the only framework getting any real attention. As a result, MVC started to gain market share. An inside source at Microsoft told me that MVC usage has grown at a rate of about 5% per year and now sits at ~30%. Essentially by focusing so much marketing effort on MVC, Microsoft actually created a larger market demand for it.  This is because in the Microsoft ecosystem there is somewhat of a bandwagon mentality amongst developers. If Microsoft spends a lot of time talking about a specific technology, developers get the perception that it must be really important. So rather than choosing the right tool for the job, they often choose the tool with the most marketing hype and then try to sell it to the customer.

In 2010, I blogged about the fact that MVC did not make any business sense for the DotNetNuke platform. This was because our ecosystem relied on third party extensions which were dependent on the WebForms model. If we migrated the core to MVC it would mean that all of the third party extensions would no longer be compatible, which would be an irresponsible business decision for us to make at the expense of our users and customers. However, this did not stop the debate from continuing to occur in our ecosystem. Clearly some developers had drunk Microsoft’s Kool-Aid about MVC and were of the mindset, to paraphrase an old Scottish saying, “If its not MVC, it’s crap”. Now, this is a rather ignorant position to take as most of the benefits of MVC can be achieved in WebForms with solid architecture and responsible coding practices. Clean separation of concerns, unit testing, and direct control over page output are all possible in the WebForms model – it just requires diligence and discipline.

So over the past few years some horror stories have begun to bubble to the surface of software development projects focused on ground-up rewrites of web applications for the sole purpose of migrating from WebForms to MVC. These large scale rewrites were typically initiated by engineering teams with only a single argument driving the business decision, that Microsoft was promoting MVC as “the future”. These ill-fated rewrites offered no benefit to end users or customers and in fact resulted in a less stable, less scalable and more complicated systems – basically taking one step forward and two full steps back. A case in point is the announcement earlier this week that a popular open source .NET CMS provider has decided to pull the plug on their new MVC product which has been under active development for more than 18 months and revert back to WebForms.

The availability of multiple server-side development models has deeply fragmented the Microsoft developer community. Some folks like to compare it to the age-old VB vs. C# language debate. However, the VB vs. C# language debate was ultimately more of a religious war because at least the two dominant programming languages were compatible with one another and could be used interchangeably. The issue with WebForms vs. MVC is much more challenging. This is because the messaging from Microsoft has positioned the two solutions as being incompatible with one another and as a result web developers feel like they are forced to choose one path or another. Yes, it is true that it has always been technically possible to use WebForms and MVC in the same project, but the tooling support has always made this feel “dirty”. The fragmentation has also made it difficult to attract newcomers as the perceived barrier to entry for learning ASP.NET has become higher. As a result many new software developers entering the market are gravitating to environments where the development model seems more simple and intuitive ( ie. PHP or Ruby ).

Sharepoint 2010At the same time that the Web Platform team was busy promoting ASP.NET MVC, the Microsoft Office team has been promoting Sharepoint as a platform for building internal enterprise web applications. Sharepoint has great penetration in the enterprise and over time has been enhanced with improved extensibility capabilities for software developers. But, like many other mature enterprise ASP.NET web applications, it is built on the WebForms development model. Similar to DotNetNuke, Sharepoint leverages a rich third party ecosystem for both generic web controls and more specialized WebParts – both of which rely on WebForms. So basically this resulted in a situation where the Web Platform group had headed off in one direction and the Office team had gone in another direction, and the end customer was stuck in the middle trying to figure out what to do with their existing investments in Microsoft technology. It really emphasized the perception that the left hand was not speaking to the right hand, as strategically speaking there did not seem to be any high level plan from Microsoft to ensure consistency and continuity across the different product lines.

With the introduction of ASP.NET MVC, it also made some of the third party control vendors scratch their heads, and wonder what the heck Microsoft was thinking. The original value proposition of ASP.NET over Classic ASP was the ability for web developers to emulate the highly productive desktop development model by using abstract components for creating rich, interactive web interfaces. Web control vendors like Telerik, Infragistics, DevExpress, and ComponentArt had all built sizable businesses offering powerful user interface components to WebForms developers. And even after MVC was introduced these vendors continued to improve their products, offering greater productivity and a superior user experience via AJAX to what was possible in MVC. And since many developers were comfortable and satisfied with these third party solutions, the demand remained strong and the third party web control market continued to prosper despite the availability of MVC.

Web ServicesWhile all of this was going on in the Microsoft ecosystem, there has also been a fundamental shift in the general software development industry. Driven by the explosion of Internet-enabled devices, the focus has now centered on service-oriented architecture (SOA). Service-oriented architecture is all about defining a public API for your product that any client can consume; whether it’s a native application running on a smart phone or tablet, a web browser taking advantage of HTML5 and Javascript, or a rich desktop application running on a PC. REST-based services which utilize the less verbose characteristics of JSON as a transport mechanism, have become the preferred approach over older, more bloated SOAP-based techniques. SOA also has the benefit of producing a cross-platform API, as every major technology stack is able to interact with standard REST-based web services. And for web applications, more and more developers are turning to robust Javascript libraries like JQuery and Knockout for browser-based client-side development techniques for calling web services and rendering content to end users. In fact, traditional server-side page rendering has largely fallen out of favor, resulting in decreased demand for server-side frameworks like Ruby on Rails, WebForms, and (gasp) MVC.

ASP.NET vNextIn response to these new industry trends, Microsoft did what it always does – it immediately poured some resources into developing a solution which will ensure they remain relevant and competitive in the web space. This work culminated in a new framework which was branded as Web API. It is convention-based and designed to embrace native HTTP standards without copious layers of abstraction. This framework is designed to be the ultimate replacement for both the REST aspects of WCF and ASP.NET MVC Web Services. And since it was developed out of band with a dependency only on ASP.NET 4.0, it means that it can be used immediately in a variety of production scenarios.

So at Tech Ed 2012 it was made abundantly clear in numerous sessions that Microsoft views Web API as the “Future of ASP.NET”. In fact, one Microsoft PM even went as far as to say that if we look 3-4 years into the future, that all ASP.NET web applications will be developed using the Web API approach. This is a fairly bold prediction and clearly telegraphs where Microsoft plans to allocate its resources going forward. Currently Web API is being delivered as part of the MVC4 package, but this is only temporary for the sake of convenience. It also sounds like there are still internal discussions going on in terms of how to brand the various aspects of ASP.NET going forward – perhaps the moniker of “ASP.NET Web Stack” coined a couple years ago by Scott Hanselman and utilized as part of the open source release of ASP.NET bits on Codeplex a few months back will eventually stick.

One Ring To Bind Them AllWeb API is being positioned as the unification of ASP.NET – the glue that is able to pull this fragmented mess back together again. The  “One ASP.NET” strategy will promote the use of all frameworks - WebForms, MVC, and Web API, even within the same web project. Basically the message is utilize the appropriate aspects of each framework to solve your business problems. Instead of navigating developers to a fork in the road, the plan is to educate them that “hybrid” applications are a great strategy for delivering solutions to customers. In addition, the service-oriented approach coupled with client-side development promoted by Web API can effectively be used in both WebForms and MVC applications. So this means it is also relevant to application platforms like DotNetNuke and Sharepoint, which means that it starts to create a unified development strategy across all ASP.NET product lines once again.

And so what about MVC? There have actually been rumors floated that MVC has reached a stage of maturity where, similar to WebForms, it will be treated more as a maintenance product line going forward ( MVC4 may in fact be the last significant iteration of this framework ). This may sound alarming to some folks who have recently adopted MVC but it really shouldn’t, as both WebForms and MVC will continue to play a vital role in delivering solutions to customers. They will just not be the primary area where Microsoft is spending the majority of its R&D resources. That distinction will obviously go to Web API. And when the question comes up of why not enhance MVC to make it work with Web API, you must take a step back and look at this from the higher level to see that it really makes no sense. MVC is a server-side page compositing framework; whereas, Web API promotes client-side page compositing with a heavy focus on web services. In order to make MVC work well with Web API, would require a complete rewrite of MVC and at the end of the day, there would be no upgrade path for existing MVC applications. So it really does not make much business sense.

So what does this have to do with DotNetNuke?

DotNetNukeWell, around 8-12 months ago we recognized the software industry trends towards web services and client-side development. We decided to utilize a “hybrid” model which would provide compatibility for existing modules while at the same time provide a bridge for developers who wanted to utilize more modern web techniques. Customers who like the productivity and familiarity of WebForms can continue to build custom modules using the traditional approach. However, in DotNetNuke 6.2 we also introduced a new Service Framework which is actually built on top of MVC2 ( we chose to leverage MVC because it had the most intuitive, light-weight REST implementation in the .NET stack ). The Services Framework allowed us to build some rich interactive features in DotNetNuke 6.2, including the Messaging and Notification Center and Activity Feed. But based on where we know Microsoft is heading, it makes sense for the next major version of DotNetNuke ( which is expected to be released in Q4 2012 ) to migrate from MVC2 to Web API. This will likely result in some breaking changes in the Services Framework but we feel it is the best approach for ensuring the platform remains highly modern and relevant. The fact that our development strategy is perfectly aligned with the “One ASP.NET” strategy from Microsoft means that our customers and developer community can be confident in their current and future investments in the DotNetNuke platform.

Shaun Walker
DNN
asp.net
SharePoint
DotNetNuke
Webforms
MVC
Web API
Author

I am the Co-Founder and CTO for DotNetNuke Corporation. I am also the original creator of DotNetNuke, the most successful open source project native to the Microsoft platform. I have 20 years professional experience in architecting and implementing large-scale software solutions for private and public organizations. I am a frequent speaker at conferences and a contributing author to a variety of DotNetNuke publications including the WROX Press book titled Professional DotNetNuke 5 - Open Source Web Application Framework. I was a founding member of the Board of Directors for the OuterCurve Foundation, a non-profit organization created by Microsoft whose goal is to enable the exchange of code and understanding among software companies and open source communities.

18 comment(s) so far...

Torsten Weggen 6/18/2012

Thank you Shaun for this great insight on whats going on in the ASP.NET world. Could you make a suggestion what would be the best for adopting the services framework ? If you speak about "breaking changes" it seems to me that investing time in the current state of services framework is lost time - besides some general learning efforts?

 
Rod Weir 6/18/2012

Great write-up Shaun. Thanks for taking the time to explain this.

 
Peter Donker 6/18/2012

Very nice writeup, Shaun. I've experienced the whole MVC thing like you describe. And I'm still critical of the way MS is herding developers in different directions. It is hard to pick the right tool when everyone's screaming "screwdriver!!" into your ear. And now it's "hammer!!".

I'm particularly dismayed at the lack of support for the "component based development in ASP.NET" which is so specific about our way of doing things. I.e. modules that display controls embedded in a wider framework. I still find myself jumping through hoops at times when this style of development has now been around since ... DNN 1. I.e. 10 years!! I really wish we'd get the warm glow from MS again one day.

 
John Cornelison 6/18/2012

Shaun, excellent overview! Microsoft promotes competition internally and monitors the competition closely. That plus politics there seem to create "Dev Fads". Its OK they're questing I guess but it makes sense as a developer to maintain one's own direction. I've enjoyed the move to client side functionality (as so nicely demonstrated by Steve Fabian's recent series) and delighted that Microsoft's next direction will bolster that. We'll see how long before the next course change! Love the new DNN Service Framework and looking forward to their enhancement next fall/winter.

 
Katherine Moss 6/18/2012

Even with this post, the whole concept is still confusing: how can you have a hybrid web application consisting of WEB API and Web Forms? And even more importantly, which technology will be used for DNN's displaying of the site? Right now, I notice that it uses web forms, but will that change soon? And if Microsoft really means to include hybrid as an actual development option, doesn't that mean that they'd provide hybrid project templates?

 
John Burrows 6/18/2012

Great to hear this news summarised. I've been developing for 20 years and it really seemed like it all lost it's way for the last 6 years or so. The Services approach is us getting back on track. I'm so happy we are heading down this path. I just started working with Kendo UI and WCF. I was worried that the MVVM option and path away from strongly typed programming was going to come back at me but it looks like it's the right way to go. Developers seem to always prefer flexibility, we are happy to waste time :).

 
Katherine Moss 6/19/2012

I like the idea. Now just out of curiosity, if Microsoft declares the future as Web API, then what will the DNN core use? Web Forms? I ask only because it doesn't seem that to me the web API is something to write whole applications out of. Though the whole MVC/Web API thing is sort of confusing to me anyway.

 
2sicDev 6/19/2012

Excellent Schaun, thanks. I'd been preaching this line of thought for years (actually, since MVC came out :) and always had trouble with media-believing programmers, thinking that MVC is the must. Great idea with the standardized API.
We're currently finishing a new version of 2sexycontent.org, which will then also support lists, and then we'll move ahead and ensure that it can publish json etc. too for really nice reactive stuff.
Bummer BTW for Umbraco, but I believe their move is a good choice requiring lots of balls, but hats off to those who were able to make the decision.

 
Shaun Walker 6/19/2012

@torsten Since WebAPI just reached Release Candidate status recently, we are still working through the changes required to migrate from MVC2 to WebAPI. We don't expect the breaking changes to be significant but since our general product philosophy is to always preserve backward compatility, we thought it would be prudent in this case to give developers a heads up that there will likely be some breaking changes in V.Next.

 
Shaun Walker 6/19/2012

@Katherine - The DotNetNuke core application is going to remain on WebForms. WebForms is essentially a technique for rendering a web user interface using server-side code. And as I explained in my blog, there are hundreds of thousands of DotNetNuke sites running thousands of custom modules which are dependent on the WebForms model, so we need to ensure we continue to support them. At the same time, it is possible to create new custom modules that render their web user interface using client-side techniques such as JQuery, Knockout, HTML5, etc... and integrate seamlessly with the DotNetNuke framework. WebAPI will play a key part in delivering the back-end services in this new model. This is what I referred to as a "hybrid" strategy... essentially supporting multiple models to cater to the needs of different developers and business scenarios. And in regards to your question about Microsoft supplying "hybrid" project templates - I sat in a session at Tech Ed where Scott Hunter, Principal Product Manager at Microsoft, demonstrated a very early prototype of exactly this capability - a re-entrant project template dialog box where you could select all of the different technologies you wanted to use in your project - WebForms, MVC, and WebAPI :)

 
Mitch Labrador 6/19/2012

Hi Shaun,

Thanks for the write-up. I respectfully suggest that you are short changing MVC, and it comes across as a lack of understanding of the MVC framework. Not saying this is the case, just conveying that is the way it comes across to an experienced WebForms / MVC developer.

MVC is more than just a server side page framework, it is a full http stack which enabled us to write what WebAPI enables you to do right now. WebAPI is a formalization of the patterns we have been using in MVC for a while, with some conventions thrown in.

The very thing that you opine is great about WebAPI is what motivated a lot of people to choose MVC to write a certain type of application.

One of the benefits of MVC, which is what motivated us to choose it for a few of our projects, is that it provides the right blend for a modern web app. Server-side view rendering with very strong alternate rendering methods for a modern AJAX approach. It accomplishes this via the same infrastructure Controller > Model > View | JSON | XML | etc. So rendering the right format is extremely easy regardless of the client. It also made it very testable, not that ASP.NET was impossible to test, just very cumbersome to do unit testing with it.

I still use WebForms and I believe it has merits for certain projects. It would be crazy to re-write DNN and disrupt it's extension eco-system. Furthermore, I believe that WebForms is the perfect model for DNN from a module perspective - this coming from a guy that wrote an MVC framework for DNN. Is there room for both technologies? Absolutely, it is just a matter of choosing the right tool for the job.

Thanks for all your work in DNN, you guys do a great job of maintaining the best eco-system in the .net space.

Regards,
Mitch Labrador

 
Shaun Walker 6/20/2012

@Mitch - I 100% agree with your comments about MVC. My blog was not intended to come across as negative about MVC from a technical perspective - in fact we opted to use MVC2 as the basis of our Services Framework in DotNetNuke 6.2 because we thought it was the best solution for building REST-based services. My blog was intended to point out how the introduction of MVC created a lot of confusion and division in the Microsoft developer ecosystem and that there is now the potential for a unified ASP.NET strategy in the form of Web API.

 
Fabio Parigi 6/25/2012

Hi Shaun Do you think that investing time in the current state of services framework is lost time? Do you maintain services framework in the new release of DNN?
thanks
Rmartin

 
Ash DC 6/25/2012

Instead of WebAPI, DNN should look at servicestack.net
I had written some code and sent it to Scott Schlesier to see if it made sense to integrate it with DNN.

- Ash

 
John Tisdale 6/27/2012

Shaun, thanks for the update. As a 30-year development professional, I've learned to recognize trends in the industry pretty early. I've been investing heavily in educating myself on SOA. I highly recommend Thomas Erl's SOA Governance as a great reference on the concepts. SOA may be the most significant advancement forward in the software industry in decades. I've been hoping to see some CMS providers get on the bandwagon. As a DNN user since v1, I'm glad to see you guys are keeping pace with the trends. Once fully implemented, it will open entirely new doors for integrating DNN in with a host of enterprise applications such as BPM, ERP systems, etc.

 
Shaun Walker 6/28/2012

@Ash ServiceStack.Net does look interesting. I spoke to Scott Schlesier about it and he does plan on doing some more research on what ServiceStack.Net may be able to offer in terms of an optional alternative. In the big picture though we feel that based on the fact that Microsoft will be making a big investment in Web API, it will represent a greater value to our developer community as Microsoft generally provides much more than just a framework - they provide documentation, examples, integrated support in their various IDE's, and plenty of marketing exposure which usually results in high adoption.

 
Shaun Walker 6/28/2012

@Rmartin - You should definitely not get the idea that investment in the current version of the Services Framework is lost time. If you build a module for DNN 6.2 which utilizes the Services Framework, it will generally consist of some database entities to store the actual content, some data access logic either in the form of stored procedures or perhaps an ORM, a business layer class which defines your native .NET API and invokes the data access logic, and an MVC Controller which defines the service endpoints which can be called by client applications. The MVC Controller is typically a very light-weight implementation. In the migration from MVC2 to Web API we expect that they only code which you will need to change is the MVC Controller - so the actual "switching cost" for developers should be minimal.

 

Thank you for writing this article! I've felt this was since I was first subjected to ASP.net MVC back in 2009.

I was in a similar situation with a contract I once worked on. I was brought into a group that was mainly Java/Ruby on Rail experts, but they had received a contract to upgrade an old VB6 app to something better in the .NET stack.

Because they were Rails experts, they automatically started building it in ASP MVC 1.0, Linq to SQL, and Entity Framework because these technologies resembled what they were already used to. The application was cumbersome to maintain and I found myself writing tons of work around code to do simple things that Microsoft had not built into the system yet. After all, it was MVC 1.0!!

I really like MVC in frameworks like RoR and especially Grails, but it really does have its own space. Microsoft should have spun off a whole new product instead of trying to force MVC down ASP.net developers throats.

They also tried to change too much at once. MVC and Entity Framework was enough to swallow. But, at the time, they were really pushing integrating Linq into all this and it turned out to be one big, hot mess of confusion.

Attend A Webinar
Start  Professional Edition Trial
Have Someone Contact Me

Like Us on Facebook Join our Network on LinkedIn Follow DNN Corporate on Twitter Follow DNN on Twitter

Advertisers

Sponsors

DotNetNuke Corporation

DotNetNuke (DNN) provides a suite of solutions that make designing, building and managing feature-rich sites and communities fast, easy and cost-effective. The DotNetNuke Platform CMS is the foundation for more than one million websites worldwide. DNN Social, our newest solution, enables businesses to create immersive, interactive communities. Thousands of organizations like True Value Hardware, Bose, Cornell University, Glacier Water, Dannon, Delphi, USAA, NASCAR, Northern Health and the City of Denver have leveraged DNN to deploy highly engaging business- critical websites. Our rapid growth in product sales and deployments resulted in DotNetNuke Corp. being named one of the fastest growing private companies in America by Inc. Magazine in 2011 and 2012.