Somewhat confusingly, Visual Studio offers two ways to create an ASP.NET-powered web application:
• Project-based development: When you create a web project, Visual Studio
generates a .csproj project file (assuming you’re coding in C#) that records the files
in your project and stores a few debugging settings. When you run a web project,
Visual Studio compiles all your code into a single assembly before launching your
web browser.
• Projectless development: An alternate approach is to create a simple website
without any project file. In this case, Visual Studio assumes that every file in the
website directory (and its subdirectories) is part of your web application. In this
scenario, Visual Studio doesn’t need to precompile your code. Instead, ASP.NET
compiles your website the first time you request a page. (Of course, you can use
precompilation to remove the first-request overhead for a deployed web
application. Chapter 18 explains how.)
The first .NET version of Visual Studio used the project model. Visual Studio 2005 removed the
project model in favor of projectless development. However, a small but significant group of developers
revolted. Realizing that there were specific scenarios that worked better with project-based
development, Microsoft released a download that added the project feature back to Visual Studio 2005.
Now, both options are supported in Visual Studio 2010.
In this chapter, you’ll begin by creating the standard projectless website, which is the simpler, more
streamlined approach. Later in this chapter, you’ll learn what scenarios work better with project-based
development, and you’ll see how to create web projects.
Hiç yorum yok:
Yorum Gönder