Multiple-Project Modules with Web Forms

Topics: UIP Application Block discussion, User Forum, Web Client Software Factory, Web Guidance v-Next (not WCSF)
Apr 10, 2012 at 6:36 AM

Good day,

I was wondering if you could perhaps help me,

I was reading the guidance associated with the following: Composite Web Guidance

I was reading through the section titled "Define the Solution Structure for a Modular Web Application", particularily the section "Multiple-Project Modules". I seem to understand the basic concepts surrounding this, however I can't seem to figure out a reasonable way to allow this to work with my web forms in seperate projects.

I realise design time support for masterpages will not be supported here, my question however is how to use something like MEF(or another container) to allow me to deploy my projects (which include web form pages and code behind files) as completely independent into a folder and plug them into a solution, the guidance seems a bit unclear as to how to support this and whenever I attempt to import these modules I get run time errors. I've had this working successfully with MVC by exporting the controllers. I would appreciate your support, however I realise that you are an extremely busy people. If you could perhaps link me to a blog or a resource explaining this in detail I would be forever greatful. Thank you for taking the time to read this. To summarise I wish to achieve the following.

  1. Create my web shell project using asp.net web forms (without silverlight or any client technology)
  2. Create my modules which exist inside their own projects, which contain my aspx and aspx code behing pages as well as any dependent assemblies
  3. I wish these pages to be exportable and importable by my shell.
  4. If possible I'd like my module assemblies to be within their own folders as to not muddy my solution.
Apr 10, 2012 at 11:47 AM
Edited Apr 10, 2012 at 11:47 AM

Hi Elixir,

I was unable to get to that portion of the guidance you mentioned in your post. Your link points somewhere else.

I don't think you can hook your seperate web applications as modules within an asp.net solution.

This wireing up is provided within the CWAB via the objectbuilder infrastructure.(as of now). There are folks working on using Unity (http://http://unity.codeplex.com/) as the Dependency Injection mechanism for WCSF. This should greatly reduce the code required.

To specifically answer your question,

What the WCSF/CWAB affords you is to build modules as seperate folders in your web application with their own dlls that will reside in the bin folder as well. These modules can still interact with each other via services. Your web pages/master pages/user controls must be written in such a way that the objectbuilder knows what to inject at runtime.

I suggest you start with the WCSF hands on labs. Go to the MSDN page at http://msdn.microsoft.com/en-us/library/ff648752.aspx and look for the hands on lab link. (It's for a previous release).

I think that this guidance has now really turned into a community effort and a new guidance (silk.codeplex.com) seems to have subsumed it.

I haven't had the time to look at it. But it looks promising and is based on asp.net mvc3.