locked
Website Structure Planning RRS feed

Answers

  • User1291589676 posted

    First create a blank solution and then add you BLL & DAL applications as type class library and then add new project for each you website as type web application.

    In your each webapplication add reference to BLL and DAL.

    Note: Don't Create Website instead create as Web Application.

    In web application you can call any function of reference dll from anywhere in your application.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, March 19, 2013 2:25 AM
  • User-1002157272 posted

    The business layer doesn't technically HAVE to be in a seperate lib from the data access layer, however if you want it to be pluggable (modularized) then yes they should be in seperate libs. If there are shared common types between the two and you want seperate assemblies for bll and dal, create an additional lib that defines the common types and reference it in both.

    Website may deploy similar to web app now but structurally they are night and day. websites are still a file structure and web applications are precompiled assemblies.

    If you plan to use mvc 4, you could use custom routing configurations to emulate subdomains super easily. Seriously, I have been able to do some pretty crazy things with custom routing configurations. MVC also has a feature called "Areas" which sort of internally represent subdomains, but I would suggest doing your homework on areas first before getting too deep in them as they are rather finicky in some ways.

    Image links would be the same thing. You would supply the relative path to the html helper and bam, does it for you when it resolves it at runtime. And yes, you can still use custom handlers and modules in mvc, however, you may wanna look into custom filters instead.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, April 6, 2013 12:44 AM

All replies

  • User1291589676 posted

    First create a blank solution and then add you BLL & DAL applications as type class library and then add new project for each you website as type web application.

    In your each webapplication add reference to BLL and DAL.

    Note: Don't Create Website instead create as Web Application.

    In web application you can call any function of reference dll from anywhere in your application.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, March 19, 2013 2:25 AM
  • User1064403333 posted

    Thanks Prabu

    First create a blank solution and then add you BLL & DAL applications as type class library

    Cool, the blank solution sounds like a clean start.

    Do you mean Windows Class Library project type?

    Should the BLL be a seperate class library to DAL, or should they be together in the same class library, or it makes no difference?

    Note: Don't Create Website instead create as Web Application.

    Why? Please elaborate if you can ...

    Website now has the same publishing process as Web Application. Are there other reasons?

    In web application you can call any function of reference dll from anywhere in your application.

    I plan to use MVC 4 for some of the above subdomains and Web Forms for others. Can I still use the above reference strategy?

    Also, how do I programmatically reference static content such as images now.

    Previously I would use the "~/images/". I guess I replace that with the full URL e.g. http://images.example.com/images/file.jpeg but I do not know if I have programmatic control such as HttpHandler and Module from http://subdomain1.example.com/ ???

    Thanks

     

    Tuesday, March 19, 2013 3:13 AM
  • User-1002157272 posted

    The business layer doesn't technically HAVE to be in a seperate lib from the data access layer, however if you want it to be pluggable (modularized) then yes they should be in seperate libs. If there are shared common types between the two and you want seperate assemblies for bll and dal, create an additional lib that defines the common types and reference it in both.

    Website may deploy similar to web app now but structurally they are night and day. websites are still a file structure and web applications are precompiled assemblies.

    If you plan to use mvc 4, you could use custom routing configurations to emulate subdomains super easily. Seriously, I have been able to do some pretty crazy things with custom routing configurations. MVC also has a feature called "Areas" which sort of internally represent subdomains, but I would suggest doing your homework on areas first before getting too deep in them as they are rather finicky in some ways.

    Image links would be the same thing. You would supply the relative path to the html helper and bam, does it for you when it resolves it at runtime. And yes, you can still use custom handlers and modules in mvc, however, you may wanna look into custom filters instead.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, April 6, 2013 12:44 AM