Home > Articles > Programming > ASP .NET

  • Print
  • + Share This
This chapter is from the book

Compilation and Deployment

Since the release of ASP.NET 1.0 there's been a fairly standard approach to Web site architecture. In general there has been a separation of business logic into separate assemblies, often in a separate directory with a make file. Using Visual Studio .NET 1.0 and 2003 for this approach is fine since it provides the compilation step for you, but stand-alone tools (such as Web Matrix) don't, so you have to handcraft a batch file to make your assemblies.

ASP.NET 2.0 provides automatic compilation for satellite code by supporting a code directory. All files within this directory will be compiled on the first run, thus removing the need for separate compilation scripts. Files within the code directory don't have to be just pure code, such as Visual Basic .NET or C# files. Support is also included for Web Services Description Language (WSDL) files and strongly typed data sets (XSD) files. For WSDL files the proxy will automatically be created, and for XSD files the appropriate classes will be created.

Along with automatic compilation comes pre-compilation—an entire site (Web pages and code) can be pre-compiled. This not only provides a way to deploy compiled applications but also removes the performance hit taken by the compilation process on the first run. In addition, because only compiled files are deployed, intellectual property is protected.

Another automatic feature is that of resources, such as those used for globalization. The resources directory provides a place for these, which are included as part of the compilation process.

Compilation is covered in Chapter 2.

  • + Share This
  • 🔖 Save To Your Account