Summary


This chapter has been all about saving time. It may not seem that obvious, but it really is. I once saw a statistic that said developers spend 60% of their time maintaining old code. There are many reasons for this – badly designed systems, badly written code, inadequate development tools, and so on. Without rewriting completely is hard to rectify this for existing applications, but that shouldn't be the case for new applications.

The goal of all developers should be to write bug-free, easy-to-maintain code, and part of the way of doing that is to reuse existing code and content. The reason is simple – existing code and content has already been tested. This means that you not only save time during development, but also during testing, and your application will be more stable. More stable means less time going back to fix old code at a later date.

In this chapter we've explored just one method of reuse – that of user controls. These encapsulate both code and content, and allow you to quickly share common features between pages. In particular we've looked at how to create user controls to share parts of the interface, and then how to extend that model to include shared code. We then went a step further, showing how user controls can be used dynamically, allowing their display to be customised depending upon user actions.




Beginning Dynamic Websites with ASP. NET Web Matrix
Beginning Dynamic Websites: with ASP.NET Web Matrix (Programmer to Programmer)
ISBN: 0764543741
EAN: 2147483647
Year: 2003
Pages: 141

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