Whats diference?

Discussion in 'ASP .Net' started by Paulo, Oct 10, 2007.

  1. Paulo

    Paulo Guest

    Hi, what is diference between:

    File -> New Web Site
    and
    File -> New Project -> VB/C# -> Web Application

    ??????

    VS 2005

    Thanks!
    Paulo, Oct 10, 2007
    #1
    1. Advertising

  2. Two completely different types of project. The first creates a Web Site
    Project. The second created a Web Application Project.

    The main difference is the web site project does not compile into a single
    dll, it creates many dlls, one for each page or directory.

    The Web Application Project compiles all the code in the project into a
    single dlls. The Web Application Project behaves more like the one that
    shipped with VS 2003 and 2002. It was introduced for VS 2005 after launch
    and later integrated into SP1 because a large number of developers didn't
    like the new Web Site Project.


    --
    Hope this helps,
    Mark Fitzpatrick
    Microsoft MVP - Expression
    "Paulo" <> wrote in message
    news:...
    > Hi, what is diference between:
    >
    > File -> New Web Site
    > and
    > File -> New Project -> VB/C# -> Web Application
    >
    > ??????
    >
    > VS 2005
    >
    > Thanks!
    >
    Mark Fitzpatrick, Oct 10, 2007
    #2
    1. Advertising

  3. Paulo

    bruce barker Guest

    web application projects still create one dll per page. the difference
    is that visual studio compiles the codebehind files into one dll, then
    call the asp_compiler to build a dll per page, referencing the dll. so
    web application actually end up with one more dll than web sites.

    the practical difference is for web applications a project file is
    maintained by visual studio (to compile the codebehind files) and
    because the codebehinds are in one dll, they implicitly have a reference
    to each other.

    in a web site the pages are independent and if a page references another
    page the proper way (as good coding would require anyway) is to
    implement an interface in the app_code dir, then have the page implement
    the interface. to call methods on another page, you cast it the known
    interface. this turned out to be too complicated for causal coders, so
    web application projects were added to asp.net 2.0.

    i'd recommend you use web sites instead of web applications, as its a
    cleaner approach.


    -- bruce (sqlwork.com)




    Mark Fitzpatrick wrote:
    > Two completely different types of project. The first creates a Web Site
    > Project. The second created a Web Application Project.
    >
    > The main difference is the web site project does not compile into a single
    > dll, it creates many dlls, one for each page or directory.
    >
    > The Web Application Project compiles all the code in the project into a
    > single dlls. The Web Application Project behaves more like the one that
    > shipped with VS 2003 and 2002. It was introduced for VS 2005 after launch
    > and later integrated into SP1 because a large number of developers didn't
    > like the new Web Site Project.
    >
    >
    bruce barker, Oct 10, 2007
    #3
  4. Bruce,
    Where does the web application create additional dlls? This was the whole
    point of the web application project and is one of the major features that
    Scott Guthrie mentions in his announcement about their release? I've been
    using it since the beta version of it and I only have the one dll for the
    application, not one per page. Are you talking about the .compiled files
    that are within the ASP.Net tempory cache? The only .compiled files I have
    are for the ascx user controls in my app, not for all the pages.

    --
    Mark Fitzpatrick
    Microsoft MVP - Expression

    "bruce barker" <> wrote in message
    news:...
    > web application projects still create one dll per page. the difference is
    > that visual studio compiles the codebehind files into one dll, then call
    > the asp_compiler to build a dll per page, referencing the dll. so web
    > application actually end up with one more dll than web sites.
    >
    > the practical difference is for web applications a project file is
    > maintained by visual studio (to compile the codebehind files) and because
    > the codebehinds are in one dll, they implicitly have a reference to each
    > other.
    >
    > in a web site the pages are independent and if a page references another
    > page the proper way (as good coding would require anyway) is to implement
    > an interface in the app_code dir, then have the page implement the
    > interface. to call methods on another page, you cast it the known
    > interface. this turned out to be too complicated for causal coders, so web
    > application projects were added to asp.net 2.0.
    >
    > i'd recommend you use web sites instead of web applications, as its a
    > cleaner approach.
    >
    >
    > -- bruce (sqlwork.com)
    >
    >
    >
    >
    > Mark Fitzpatrick wrote:
    >> Two completely different types of project. The first creates a Web Site
    >> Project. The second created a Web Application Project.
    >>
    >> The main difference is the web site project does not compile into a
    >> single dll, it creates many dlls, one for each page or directory.
    >>
    >> The Web Application Project compiles all the code in the project into a
    >> single dlls. The Web Application Project behaves more like the one that
    >> shipped with VS 2003 and 2002. It was introduced for VS 2005 after launch
    >> and later integrated into SP1 because a large number of developers didn't
    >> like the new Web Site Project.
    >>
    Mark Fitzpatrick, Oct 10, 2007
    #4
  5. Paulo

    Paulo Guest

    So, what you all recommends?

    WebApp ou WebSite ?

    "Mark Fitzpatrick" <> escreveu na mensagem
    news:...
    > Bruce,
    > Where does the web application create additional dlls? This was the whole
    > point of the web application project and is one of the major features that
    > Scott Guthrie mentions in his announcement about their release? I've been
    > using it since the beta version of it and I only have the one dll for the
    > application, not one per page. Are you talking about the .compiled files
    > that are within the ASP.Net tempory cache? The only .compiled files I have
    > are for the ascx user controls in my app, not for all the pages.
    >
    > --
    > Mark Fitzpatrick
    > Microsoft MVP - Expression
    >
    > "bruce barker" <> wrote in message
    > news:...
    >> web application projects still create one dll per page. the difference is
    >> that visual studio compiles the codebehind files into one dll, then call
    >> the asp_compiler to build a dll per page, referencing the dll. so web
    >> application actually end up with one more dll than web sites.
    >>
    >> the practical difference is for web applications a project file is
    >> maintained by visual studio (to compile the codebehind files) and because
    >> the codebehinds are in one dll, they implicitly have a reference to each
    >> other.
    >>
    >> in a web site the pages are independent and if a page references another
    >> page the proper way (as good coding would require anyway) is to implement
    >> an interface in the app_code dir, then have the page implement the
    >> interface. to call methods on another page, you cast it the known
    >> interface. this turned out to be too complicated for causal coders, so
    >> web application projects were added to asp.net 2.0.
    >>
    >> i'd recommend you use web sites instead of web applications, as its a
    >> cleaner approach.
    >>
    >>
    >> -- bruce (sqlwork.com)
    >>
    >>
    >>
    >>
    >> Mark Fitzpatrick wrote:
    >>> Two completely different types of project. The first creates a Web Site
    >>> Project. The second created a Web Application Project.
    >>>
    >>> The main difference is the web site project does not compile into a
    >>> single dll, it creates many dlls, one for each page or directory.
    >>>
    >>> The Web Application Project compiles all the code in the project into a
    >>> single dlls. The Web Application Project behaves more like the one that
    >>> shipped with VS 2003 and 2002. It was introduced for VS 2005 after
    >>> launch and later integrated into SP1 because a large number of
    >>> developers didn't like the new Web Site Project.
    >>>

    >
    Paulo, Oct 10, 2007
    #5
  6. Paulo

    Ian Semmel Guest

    Actually it seems a little more complicated than that.

    As well as those two methods, you can also create a website in IIS and
    Microsoft Expression.

    All the methods seem slightly incompatible. Depending on how you created
    it, you get different errors sometmes running them. VS uses its own web
    server I think.

    Anyway, as you asked, what's the best way ?

    > -----Original Message-----
    > From: Paulo [mailto:p]
    > Posted At: Wednesday, 10 October 2007 9:28 PM
    > Posted To: microsoft.public.dotnet.framework.aspnet
    > Conversation: Whats diference?
    > Subject: Whats diference?
    >
    > Hi, what is diference between:
    >
    > File -> New Web Site
    > and
    > File -> New Project -> VB/C# -> Web Application
    >
    > ??????
    >
    > VS 2005
    >
    > Thanks!
    Ian Semmel, Oct 10, 2007
    #6
  7. WAP project creates a temporary assembly for each ASPX "Page" in addition to
    the single assembly for the "Site" in the /bin folder, same as VS 2003 always
    did.
    However Bruce asserts that Web Site projects are preferable, an idea with
    which I totally disagree. It is Web Application Projects that are cleaner,
    more manageable, and less prone to errors.
    --Peter
    Recursion: see Recursion
    site: http://www.eggheadcafe.com
    unBlog: http://petesbloggerama.blogspot.com
    BlogMetaFinder: http://www.blogmetafinder.com



    "Mark Fitzpatrick" wrote:

    > Bruce,
    > Where does the web application create additional dlls? This was the whole
    > point of the web application project and is one of the major features that
    > Scott Guthrie mentions in his announcement about their release? I've been
    > using it since the beta version of it and I only have the one dll for the
    > application, not one per page. Are you talking about the .compiled files
    > that are within the ASP.Net tempory cache? The only .compiled files I have
    > are for the ascx user controls in my app, not for all the pages.
    >
    > --
    > Mark Fitzpatrick
    > Microsoft MVP - Expression
    >
    > "bruce barker" <> wrote in message
    > news:...
    > > web application projects still create one dll per page. the difference is
    > > that visual studio compiles the codebehind files into one dll, then call
    > > the asp_compiler to build a dll per page, referencing the dll. so web
    > > application actually end up with one more dll than web sites.
    > >
    > > the practical difference is for web applications a project file is
    > > maintained by visual studio (to compile the codebehind files) and because
    > > the codebehinds are in one dll, they implicitly have a reference to each
    > > other.
    > >
    > > in a web site the pages are independent and if a page references another
    > > page the proper way (as good coding would require anyway) is to implement
    > > an interface in the app_code dir, then have the page implement the
    > > interface. to call methods on another page, you cast it the known
    > > interface. this turned out to be too complicated for causal coders, so web
    > > application projects were added to asp.net 2.0.
    > >
    > > i'd recommend you use web sites instead of web applications, as its a
    > > cleaner approach.
    > >
    > >
    > > -- bruce (sqlwork.com)
    > >
    > >
    > >
    > >
    > > Mark Fitzpatrick wrote:
    > >> Two completely different types of project. The first creates a Web Site
    > >> Project. The second created a Web Application Project.
    > >>
    > >> The main difference is the web site project does not compile into a
    > >> single dll, it creates many dlls, one for each page or directory.
    > >>
    > >> The Web Application Project compiles all the code in the project into a
    > >> single dlls. The Web Application Project behaves more like the one that
    > >> shipped with VS 2003 and 2002. It was introduced for VS 2005 after launch
    > >> and later integrated into SP1 because a large number of developers didn't
    > >> like the new Web Site Project.
    > >>

    >
    >
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=, Oct 10, 2007
    #7
  8. "Peter Bromberg [C# MVP]" <> wrote
    in message news:...

    > However Bruce asserts that Web Site projects are preferable, an idea with
    > which I totally disagree.


    Me too, FWIW...

    > It is Web Application Projects that are cleaner, more manageable, and less
    > prone to errors.


    Absolutely! I never, ever create a web site project in ASP.NET...

    --
    Mark Rae
    ASP.NET MVP
    http://www.markrae.net
    Mark Rae [MVP], Oct 10, 2007
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Neo

    whats this error??

    Neo, Jan 31, 2005, in forum: VHDL
    Replies:
    4
    Views:
    481
  2. Eduard W. Lohmann
    Replies:
    1
    Views:
    626
  3. Bruno Piovan

    What is the diference?

    Bruno Piovan, Oct 30, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    318
    Marina
    Oct 30, 2003
  4. aa

    Why diference numbers

    aa, Feb 6, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    292
    Chris Jackson
    Feb 6, 2004
  5. jonathan castro

    diference between signal and variable?

    jonathan castro, May 20, 2008, in forum: VHDL
    Replies:
    1
    Views:
    471
    jeppe
    May 20, 2008
Loading...

Share This Page