Architecture and Design of Windows Forms Custom Controls—Basics of .NET Controls

Microsoft .NET Framework, ASP.NET, Visual C# (CSharp, C Sharp, C-Sharp) Developer Training, Visual Studio


Jump to: navigation, search
CSharp-Online.NET:Articles
.NET Articles

Custom Controls

© 2006 Eric White

Basics of .NET Controls

Most developers who are reading this book will already have a good understanding of both components and custom controls, which have been around in one form or another for quite a while. However, the .NET Framework adds some characteristics to components and custom controls that are worth discussing.

Component technology is very similar to object-oriented technology. In the .NET Framework, the two are closer than ever. However, there are aspects of component technology that are not part of traditional object-oriented programming (OOP), as you will learn in this section.

As you probably know, components and custom controls offer several advantages. Components are commonly used as a means to conceptually break an application into smaller pieces. They make software systems more modular and enable greater levels of code reuse. Components can be a convenient way to divide a large application among multiple programming groups, where each programming group is responsible for delivering a specific component or a set of components. Buying ready-made components and custom controls allows developers to use their time creating the custom aspects of their application, rather than handling more generic issues.

In addition, because .NET components have a very good mechanism for implementing properties, developers can use components and controls to implement a declarative style of programming. This is a particular programming style that increases programmer productivity and the robustness of the system, and decreases maintenance time. In brief, a declarative programming style is one where you focus on nonprocedural programming, rather than writing procedural code. Certainly, you will be writing procedural code, but you will be paying close attention to the nonprocedural portions of your application.

A declarative style of programming has such an advantage over the alternative that, for many developers, the idea of using a component without being able to bring up a Properties window to configure it would not even occur to them. At the end of this chapter, I will explain the generalization of declarative programming. It is a very valuable way to analyze and develop large software systems.


Previous_Page_.gif Next_Page_.gif


Personal tools