Chapter 6. Separating Code from Presentation


IN THIS CHAPTER

  • Creating Business Components

  • Creating Multitiered Web Applications

  • Using Code-Behind

Web developers are not necessarily good designers. Most companies divide the task of building Web sites between two teams . Normally, one team is responsible for the design content of a page, and the other team is responsible for the application logic.

Maintaining this separation of tasks is difficult when both the design content and application logic are jumbled together on a single page. A carefully engineered ASP.NET page can be easily garbled after being loaded into a design program. Likewise, a beautifully designed page can quickly become mangled in the hands of an engineer.

In this chapter, you learn two methods of dividing your application code from your presentation content. In other words, you learn how to keep both your design and engineering teams happy.

First, you learn how to package application code into custom business components. Using a business component, you can place all your application logic into a separate Visual Basic class file. You also learn how to use business components to build multitiered Web applications.

Next, you learn how to take advantage of a feature of ASP.NET pages named code-behind . Using code-behind, you can place all your application logic into a file and create one or more ASP.NET pages that inherit from this file. Code-behind is the technology used by Visual Studio .NET to divide presentation content from application logic.

NOTE

You can view "live" versions of many of the code samples in this chapter by visiting the Superexpert Web site at:

http://www.Superexpert.com/AspNetUnleashed/




ASP.NET Unleashed
ASP.NET 4 Unleashed
ISBN: 0672331128
EAN: 2147483647
Year: 2003
Pages: 263

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net