Shaun has recently
blogged about the progress, we have made in migrating DotNetNuke to ASP.NET 2.
He did however miss out one option for Commercial Developers. In
his blog he refers to the fact the a Commercial Developer, who is
concerned about IP would need to use a "separate" web-project, for the
UI components together with class libraries for the non-UI components,
such as the Controller\Info classes and any providers needed.
\lib
\DesktopModules
\Module
Module.vbproj
Module.vb
\bin
Module.dll
\module_web
web.config ( with pre-compilation option turned on )
\app_code
Module.vb
\bin
DotNetNuke.dll
Module_#hash#.dll
\DesktopModules
\Module
ViewModule.ascx
ViewModule.ascx.vb
EditModule.ascx
EditModule.ascx.vb
\app_LocalResources
ViewModule.ascx.resx
EditModule.ascx.resx
\web (core web-project)
While this approach is a viable option, it does require a post-build
event, to copy the module's web project files to the core project.
One of the advantages of the new ASP.NET 2 model is that each page is
compiled into its own assembly. In addition it is possible to
get each sub-folder of App_code to compile into its own assembly.
We can therefore develop our UI components (and some non-UI components
in the core web-project itself.
\lib
\DesktopModules
\Module
Module.vbproj
Module.vb
\bin
Module.dll
\web (core web-project)
web.config ( with pre-compilation option turned on )
\app_code
\Module
Module.vb
\bin
Module.dll (from \lib)
\DesktopModules
\Module
ViewModule.ascx
ViewModule.ascx.vb
EditModule.ascx
EditModule.ascx.vb
\app_LocalResources
ViewModule.ascx.resx
EditModule.ascx.resx
In this scenario, the UI components can be placed where they will
eventually reside in production. Non UI components that do not
need to be referenced by external assemblies can live in a subfolder of
App_Code, and any Provider classes will need to be in a Class Library,
with the Build Directory set to the \web\bin folder.
During development the developer can take advantage of dynamic
compilation for all those components that are inside the
web-project. When ready for deployment the developer will
"Publish" the Website (ie precompile) and using the Fixed Names
option, will be able to identify the assemblies that represent the
Module UI components and the App_Code components.
These assemblies can then be packaged in the same way as we currently do.