Web Site or Web Application (VS 2008)

Discussion in 'ASP .Net' started by Dan, Jul 15, 2009.

  1. Dan

    Dan Guest

    Hi ASP Gurus,
    I am about to write some asp pages, but got confused to pick between Web
    Site or Web Application.
    Can someone please explain some major differences between these two.

    I'll appreciate any help/suggestion/advice I get on this topic.

    Thanks, Dan
    Dan, Jul 15, 2009
    #1
    1. Advertising

  2. Dan

    sloan Guest

    It's been discussed a billion times.

    Google or Bing it.


    "Dan" <> wrote in message
    news:...
    > Hi ASP Gurus,
    > I am about to write some asp pages, but got confused to pick between Web
    > Site or Web Application.
    > Can someone please explain some major differences between these two.
    >
    > I'll appreciate any help/suggestion/advice I get on this topic.
    >
    > Thanks, Dan
    >
    sloan, Jul 15, 2009
    #2
    1. Advertising

  3. Dan

    sloan Guest

    http://www.google.com/search?hl=en&q=web site vs web application&aq=f&oq=&aqi=


    "sloan" <> wrote in message
    news:...
    > It's been discussed a billion times.
    >
    > Google or Bing it.
    >
    >
    > "Dan" <> wrote in message
    > news:...
    >> Hi ASP Gurus,
    >> I am about to write some asp pages, but got confused to pick between Web
    >> Site or Web Application.
    >> Can someone please explain some major differences between these two.
    >>
    >> I'll appreciate any help/suggestion/advice I get on this topic.
    >>
    >> Thanks, Dan
    >>

    >
    >
    sloan, Jul 15, 2009
    #3
  4. "Dan" <> wrote in
    news::

    > Hi ASP Gurus,
    > I am about to write some asp pages, but got confused to pick between
    > Web Site or Web Application.
    > Can someone please explain some major differences between these two.
    >
    > I'll appreciate any help/suggestion/advice I get on this topic.



    I will take a different direction from what sloan has taken, although I
    do love this site. ;-)

    http://snurl.com/nb453


    In general, use the web application template.

    In early 2.0 (and perhaps beyond), the only exception I know of is when
    you want to use custom Profiles, as you can end up having to rebuild the
    Profile when you use a web application template. It was not a huge
    thing, once you learned how to manually clear out your ASP.NET temporary
    directory (often including rebooting IIS), but it was a major pain. Not
    sure if it is fixed or not, but since I use custom Profile providers, I
    don't really care (when I use profile at all).

    On the converse side, if you are adding custom classes, the web site
    template can give you some heartache.

    In general, the difference is that one compiles and the other does not.
    If you like to change a single page on the fly, it is "easier" with a
    web app template. As an xcopy deploy does not take but a few seconds, it
    is not a major benefit for me.

    One benefit to web site is mixing code, but this is not as much of a
    benefit any more, as you can do it in both (on the page level). If you
    like to have one page in VB, one in C#, another in J# and another in
    C++, then you will love this feature. If you are "normal", this is
    probably not something you will cherish.

    The pain with the web site is when you put code in app_code and try to
    use it, but I am personally against putting anything in app code, as
    application code should not be placed in the UI ... NEVER. Okay, maybe
    not NEVER, as some might not want to build a separate WEB.UI library.
    ;-)

    With a web application, you can deploy everything as assemblies. Not
    completely true, as .NET will build pointer files with an @ Page
    directive pointing to the entry point in the compiled code. This means
    you can obfuscate your web app and not give away it's secrets. This is
    really only a measure when you build a web app for someone who is
    licensing the code, which is rare, but it is kewl none-the-less, even if
    it is hardly practical for most of us.

    In summary
    1. Web site - page compiled on fly
    2. Web app - application compiled

    Oversimplification, but it works here.


    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA

    Twitter: @gbworld
    Blog: http://gregorybeamer.spaces.live.com

    *******************************************
    | Think outside the box! |
    *******************************************
    Gregory A. Beamer, Jul 15, 2009
    #4
  5. Dan

    Stan Guest

    On 15 July, 21:14, "Dan" <> wrote:
    > Hi ASP Gurus,
    > I am about to write some asp pages, but got confused to pick between Web
    > Site or Web Application.
    > Can someone please explain some major differences between these two.
    >
    > I'll appreciate any help/suggestion/advice I get on this topic.
    >
    > Thanks, Dan


    Essentially a web application is executed on the server whereas a web
    site is handled by the client only. The most common reason for active
    server processing is to access a database, which cannot be done from
    the client.

    HTH
    Stan, Jul 16, 2009
    #5
  6. Dan

    Jeremy S. Guest

    RE:
    << Essentially a web application is executed on the server whereas a web
    site is handled by the client only >>

    You are completely wrong about this.

    Both Web applications and Web sites are compiled and served from the server.
    Neither are "handled by the client only" - in fact that is a non sensical
    statement as both Web sites and Web applications render plain old HTML + css
    + JavaScript or VBScript etc to the client/browser. Browsers know absolutely
    nothing about ASP.NET Web sites or Web applications or any other server-side
    technology.
    Jeremy S., Jul 16, 2009
    #6
  7. Dan

    Dan Guest

    Thanks Gregory for your detailed explanation.
    Things are clear now.

    Thanks again.
    Dan



    "Gregory A. Beamer" <> wrote in message
    news:Xns9C49AB9902B94gbworld@207.46.248.16...
    > "Dan" <> wrote in
    > news::
    >
    >> Hi ASP Gurus,
    >> I am about to write some asp pages, but got confused to pick between
    >> Web Site or Web Application.
    >> Can someone please explain some major differences between these two.
    >>
    >> I'll appreciate any help/suggestion/advice I get on this topic.

    >
    >
    > I will take a different direction from what sloan has taken, although I
    > do love this site. ;-)
    >
    > http://snurl.com/nb453
    >
    >
    > In general, use the web application template.
    >
    > In early 2.0 (and perhaps beyond), the only exception I know of is when
    > you want to use custom Profiles, as you can end up having to rebuild the
    > Profile when you use a web application template. It was not a huge
    > thing, once you learned how to manually clear out your ASP.NET temporary
    > directory (often including rebooting IIS), but it was a major pain. Not
    > sure if it is fixed or not, but since I use custom Profile providers, I
    > don't really care (when I use profile at all).
    >
    > On the converse side, if you are adding custom classes, the web site
    > template can give you some heartache.
    >
    > In general, the difference is that one compiles and the other does not.
    > If you like to change a single page on the fly, it is "easier" with a
    > web app template. As an xcopy deploy does not take but a few seconds, it
    > is not a major benefit for me.
    >
    > One benefit to web site is mixing code, but this is not as much of a
    > benefit any more, as you can do it in both (on the page level). If you
    > like to have one page in VB, one in C#, another in J# and another in
    > C++, then you will love this feature. If you are "normal", this is
    > probably not something you will cherish.
    >
    > The pain with the web site is when you put code in app_code and try to
    > use it, but I am personally against putting anything in app code, as
    > application code should not be placed in the UI ... NEVER. Okay, maybe
    > not NEVER, as some might not want to build a separate WEB.UI library.
    > ;-)
    >
    > With a web application, you can deploy everything as assemblies. Not
    > completely true, as .NET will build pointer files with an @ Page
    > directive pointing to the entry point in the compiled code. This means
    > you can obfuscate your web app and not give away it's secrets. This is
    > really only a measure when you build a web app for someone who is
    > licensing the code, which is rare, but it is kewl none-the-less, even if
    > it is hardly practical for most of us.
    >
    > In summary
    > 1. Web site - page compiled on fly
    > 2. Web app - application compiled
    >
    > Oversimplification, but it works here.
    >
    >
    > --
    > Gregory A. Beamer
    > MVP; MCP: +I, SE, SD, DBA
    >
    > Twitter: @gbworld
    > Blog: http://gregorybeamer.spaces.live.com
    >
    > *******************************************
    > | Think outside the box! |
    > *******************************************
    Dan, Jul 16, 2009
    #7
  8. Stan <> wrote in news:d67acc05-6144-46cc-88c1-
    :

    > Essentially a web application is executed on the server whereas a web
    > site is handled by the client only. The most common reason for active
    > server processing is to access a database, which cannot be done from
    > the client.


    This might work if you are talking a general HTML = web site and PHP,
    ASP.NET, JSP, etc = web application.

    In this case, the OP was asking about the web site template and the web
    application template in ASP.NET, both of which have server side code. The
    simple difference is one can be compiled into assemblies and the other is
    compiled on the fly when a page is hit and does not have an assembly bin
    for its own code (both can reference other assemblies).


    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA

    Twitter: @gbworld
    Blog: http://gregorybeamer.spaces.live.com

    *******************************************
    | Think outside the box! |
    *******************************************
    Gregory A. Beamer, Jul 16, 2009
    #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. shapper

    Windows 2008 and SQL 2008

    shapper, Dec 8, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    330
    Mark Fitzpatrick
    Dec 8, 2007
  2. Replies:
    0
    Views:
    493
  3. Barry Kelly
    Replies:
    0
    Views:
    396
    Barry Kelly
    Jan 9, 2008
  4. Replies:
    0
    Views:
    320
  5. HRsoft Informática

    Visual Web Express 2008 X Visual Studio Pro 2008

    HRsoft Informática, Jun 8, 2008, in forum: ASP .Net
    Replies:
    3
    Views:
    697
    Cowboy \(Gregory A. Beamer\)
    Jun 9, 2008
Loading...

Share This Page