Michael Washington blogged about this subject earlier in the week and I would like to provide some more detail on how Web Application Projects will impact DotNetNuke.
Way back in September 2005, we had a variety of meetings with Microsoft to discuss the complications of migrating DotNetNuke from ASP.NET 1.1 to ASP.NET 2.0. During these discussions we identified a variety of use cases which were not possible using the *new* ASP.NET 2.0 project model. Some of these use cases were critically important to specific developer groups and I predicted that there would be significant backlash when the issues came to the surface. To be honest, I was a bit surprised that Microsoft never got this feedback earlier in their community beta testing program but based on my own experience with DotNetNuke beta releases, developers are often hesitant to really get their hands dirty with bleeding edge code. Based largely on our feedback, Microsoft immediately went to work to address some of the issues identified. This resulted in the Web Deployment Project add-on which was announced not long after the official Visual Studio 2005 launch on November 7, 2005. Unfortunately, the Web Deployment Project option only addressed a specific subset of the items raised, and did not address one of the most critical issues - the migration of VS2003 web projects to VS2005. Realizing ( too late ) the importance of this item, Microsoft began furiously working on another VS2005 project model which has been dubbed Web Application Projects ( or WAP ). Beta versions of WAP have been available to select stakeholders for a number of months already and on May 8, Version 1.0 was announced for free public download. It has been amazing to see the Microsoft public relations machine at work throughout this process... Microsoft has been able to generate a massive amount of positive community feedback - ironically for giving back something which they ignorantly took away in the first place.
So if we now shift our focus to the DotNetNuke web application framework, even though we identified some serious deficiencies in ASP.NET 2.0, we were still able to release DotNetNuke 4.0 on November 7, 2005 with full support for VS2005. In addition we were able to provide backward compatibility for modules created in VS2003/ASP.NET 1.1 ( from a RUN-TIME perspective ). We did this by reorganizing our project structure to conform to the VS2005 Web Project model. This involved a lot of time and effort but it also paid dividends by providing a number of new project benefits including support for the new Express development tools and support for some new RAD development concepts. However, one thing which we were not able to provide ( due to the limitations in VS2005 ) was a simple method for migrating the development environment for a DotNetNuke Module which was developed as a VS2003 web project and built/deployed as a private assembly.
The lack of a decent migration strategy for early adopters of the DotNetNuke web application framework has created some confusion and frustration within the community. Although we were able to provide detailed tutorials and samples on how to create modules in DNN4, there is no simple method to convert an existing DNN3 module to DNN4. Luckily, developers have understood that the limitation is mainly related to the changes which Microsoft made in VS2005, an issue which is largely out of our hands. However with the recent announcements by Microsoft regarding the availability of the Web Application Projects, there is a large group of developers who think that their migration problems have been solved. Unfortunately, these conclusions are based more on marketing propaganda rather than fact.
Recently, we have spent some time analyzing the Web Application Project model to determine its potential benefit to DotNetNuke. Almost immediately we ran into some serious technical challenges which we had not anticipated. It turns out that from a development perspective the two web project models are incompatible with one another. This means that within the same web project, you can only use one model or the other - not both. On the surface this may not seem like a big a deal but from a product development perspective, it certainly has an impact on the ways in which your developer audience will be able to use your application. Before we dig into the technical details, let's consider the high level business cases of the two project models:
1. Web Site Projects ( WSP ) - supported out-of-the-box in VS2005. Can be leveraged by ALL product SKUs from Express to Enterprise. Provides RAD development and deployment.
2. Web Application Projects ( WAP ) - supported as a separate download from the Microsoft site ( will be included as a fully supported model in VS2005 SP1 *official release date unspecified* ). Can only be leveraged in higher level SKUs - Standard Edition and above ( no support for Express Editions ).
As you can see, the developer tool support aspect of Web Application Projects is sorely lacking. This is unfortunate as the changes made in DotNetNuke 4.0 to support the Express tools resulted in a massive benefit to our community. It completely eliminated the barrier of entry for developers by providing a rich set of development tools at absolutely no cost. And the Web Site Project model used in DotNetNuke 4.0 provides a RAD development environment which satisfies the needs for 90% of the developer community. For the other 10%, a free development environment is not a critical requirement; therefore, the Web Application Project model is a viable alternative. So why can't we have one DotNetNuke code base which supports both Web Site Projects and Web Application Projects simutaneously - providing the maximum flexibility and benefit to all stakeholders? Here is where we dive into the technical details...
1. WSP uses the app_code folder for dynamic compilation. If you switch a project to use WAP and do not remove the app_code folder, you will get "double" compilation - as ASP.NET 2.0 will automatically compile anything in app_code whether there is a WAP project file present or not. So basically you will end up with assemblies that have namespace clashes in the /bin.
2. All user interface files ( ie. *.aspx, *.ascx ) have a different syntax in WAP than they do in WSP. WAP projects use the old "CodeBehind=" attribute and must have an associated *.designer file for each user interface file. WSP projects use the new code-beside model which does not require "CodeBehind=". You can not have a mixture of these 2 types within the same development solution. In order to support WAP for the DNN core, we would need to convert every user interface file to use the WAP syntax - producing a completely different code base ( one that no longer supports WSP ).
3. WAP has different settings in web.config than WSP, since they use totally different compilation models.
As a result of the technical issues noted above, we can not have a single DotNetNuke code base which supports both we project models. And since we feel that the Web Site Projects satisfy the needs of the majority of the developer community,
WE WILL NOT CONVERT DOTNETNUKE TO A WEB APPLICATION PROJECT
So what is the good news?
We CAN support both web project models from a RUN-TIME perspective. Even though the core framework we ship will conform to a Web Site Project model, modules which are built using the Web Application Project model can be deployed directly into DotNetNuke ( just like the modules built with ASP.NET 1.1 modules today ). So this does offer us the best of both worlds.
That being said, we recognize that there are still some challenges for members of our community and we absolutely do not want to ignore or neglect their needs. So lets examine some of the issues:
1. Commercial Modules
We have a group of stakeholders who are building commercial modules for DotNetNuke. Protection of intellectual property is an important requirement for these stakeholders - so including source code for dynamic compilation is not really an option. Packaging, versioning, and distribution of assemblies is an important requirement.
Possible Solution #1:
As part of our release offering, we could create a WAP release version of DotNetNuke. This version would be created at the end of our dev cycle using the automated conversion utility within WAP. This version would primarily be used by developers who create commercial DNN components.
Possible Solution #2:
Construct and document a development model which allows you to build WAP modules outside of the core DotNetNuke WSP.
2. Legacy Migration
We have developers who have created modules for themselves or their clients as ASP.NET 1.1 private assemblies. In this case, the new dynamic compilation option would be acceptable; however, they need an efficient mechanism to upgrade their VS2003 projects.
Possible Solution:
Create a migration utility which provides an automated process for upgrading a private assembly module. This would include moving the code to the appropriate folders, parsing the code files to include the necessary attributes, and modifying any config files. The utility would need to prompt for source and destination parameters in order to migrate files.
3. Resistance to Change
We have stakeholders who have a deep knowledge and expertise in building modules using the private assembly approach. Obviously there are some psychological aspects to learning new concepts but there is also a cost involved in training developers and migrating legacy code. Some of these stakeholders are also using utilities and tools which are hard-wired to the old private assembly structure ( ie. code generators, build scripts, etc... ).
Possible Solution:
Beyond automated utilities to ease the transition ( see #2 ), education is the key to making people comfortable with new concepts. We need to provide more examples and tutorials on how to develop using the new Web Site Project model.