views:

18

answers:

1

Hi all,

I have a rather loaded question regarding a library/framework my company uses to build websites from that I hope I can convey without too much trouble.

Present Situation: Currently, we have a solution in VS 2010 that has a Web Project, "Framework_Web", which currently contains all the web pages in the application as well as other stuff like images folder, web.config. The web project includes pages that should be shared across all applications and pages specific to the application. We also have a class library project, "Framework_Library" that contains all the framework code that should be shared across applications. It produces an assembly "Framework_Library" and uses the namespace "Framework_Library".

When a developer wants to create a new application AppY, we used to copy the solution from a previously built application AppX (yes I know, really stupid) and modify it as need be for AppY.

Question: The question I have is, how do I create a new application AppY, such that AppX and AppY are able to have thier own webpages and web.config, yet share the core framework (web pages, class library).

Current Roadmap: So now that we are using VS 2010 Team Foundation Studio, we want to create a Base Framework Solution as a TFS Team Project (e.g. "Base_Framework") that contains all the webpages, etc. for the core of the framework as a web project. Also, I want to include the "Framework_Library" into this solution. Then for each application (e.g. AppX) we can create a new Team Project. This would allow us to manage the core framework web pages & code seperate from each of the applications that utilize it. Sharing the "Framework_Library" class library between applications is trivial because it's packaged as an assembly. But, I'm not sure how to share the web project?

+1  A: 
  1. Create a project that creates a class library with the "Framework_Library".
  2. In your new Web Applications Add a reference to the Framework_Libraray project.
  3. On sharing web pages, you can create a base class with similar that can be compiled into the Framework_Library Project and inherited to to your web pages. But I do not think sharing full web pages will work. You will probably have to copy the pages.
Robert
Thanks for your reply Robert. I find it hard to believe that you can't share .ascx and .aspx files, master page, images in some manner. I guess I'll have to figure out something thru trial and error.
Sephrial
No problem. I understand what you mean by being unable to share pages. Though you may be able simulate page sharing by nesting web applications using a virtual directory within virtual directory or project within a project. Although I wouldn't recommend that unless you know what you are doing.
Robert