componentspot.com Where programmers go for fresh, free code.
Home Learn More About...
.NET FrameworkClass LibrariesComponentsControls
ActiveX ComponentsControlsLibraries
Providing the highest-quality .NET and ActiveX software components for 10 years. Products include components for compression, encryption, and networking, as well as grid and other UI controls.
.NET Framework

The .NET Framework (pronounced, “dot net”) is just one part of Microsoft’s .NET technology. The purpose of the .NET Framework is to create and run next-generation applications and XML Web services. Some of its main characteristics include the following:
  • It provides a multi-language object-oriented environment for programmers, whether code is stored and executed entirely locally or remotely.
  • It facilitates software deployment and minimizes versioning conflicts.
  • It provides an environment that promotes safe code execution, including that of less trusted third-party code.
  • It allows developers to create both Windows-based and Web-based applications in a consistent manner.
The .NET Framework has two principal components:
  • The .NET Framework class library: an object-oriented collection of reusable types. This is a fully-fledged application framework, meaning that developers can use it for the entire development process of applications. The Framework in turn has various components, such as:
    • ADO.NET: for connecting applications to databases
    • ASP.NET: for creating, deploying, and running Web applications and Web services (distributed applications)
    • Windows Forms: for writing smart client applications (Windows-based applications)
  • The Common Language Runtime (CLR): the runtime engine that executes managed code. It provides core services to managed code such as memory and thread management, type verification, and garbage collection; consequently, developers no longer have to worry about such things when it comes to managed code. Running code under the CLR isolates it from the operating system, which improves security and robustness. Managed code is compiled into the CPU-independent MSIL (Microsoft Intermediate Language) instruction set, which is then converted to CPU-specific code by the runtime. Unmanaged code runs outside of the runtime and lacks the security of managed code. Programming languages such as C#, VB.NET, J# all take advantage of the .NET Framework class library and of the services offered by the CLR.

    A major goal of the .NET Framework is to promote and facilitate code reusability.
Back to Top  Previous Page

Class Libraries

The Microsoft .NET Framework class library is an object-oriented collection of reusable and extendable types (classes, interfaces, structures, and enumerated types). These types provide access to system functionality such as input/output, data manipulation, windows and other GUI elements, security, network communications, and creating web-based or windows-based applications.

The types of the .NET class library are grouped hierarchically in namespaces to facilitate their use. For example, types for implementing GUI elements such as TextBoxes, Buttons, and many more can be accessed by using the System.Windows.Forms namespace.

With the .NET class library, developers can write managed code in any .NET programming language (such as C#, VB.NET, or J#) to build component-based applications, components, or controls, using the types as-is or extending them. Managed code is code that provides information to the common language runtime, which consequently provides services such as memory management and object management, cross-language portability, and code execution security to the managed code.

Being fully object-oriented, the classes in the .NET Framework class library are derived from base classes higher up in the Framework’s hierarchy, inheriting their characteristics. Unlike in previous frameworks, classes in the .NET Framework can be interoperable, meaning that a C# class could inherit from a VB.NET class, allowing developers from different backgrounds to work seamlessly together. Developers can therefore use the programming language of their choice (such as C# or VB.NET, or any one of roughly 20 others), or the one that is most suitable for the task, even within the same application.

Developers can write classes derived from the classes of the .NET Framework to create third-party .NET class libraries. These libraries are similar to the .NET Framework class library in many respects. However, they are designed with the following goals in mind:
  • specialization of a given functionality
  • improvement of a functionality in the .NET Class Library
  • simplification of a functionality in the .NET Class Library
Subsequently, other developers can use a third-party class library’s specialized types as-is, or extend and combine them even further for their own needs. Class libraries can be seen as containing the building blocks for everything, including applications, web services, components, and controls, among others.
Back to Top  Previous Page

Components

A software component is a reusable object that performs a set of related functions and interacts with other components or applications. It is the logical isolation or encapsulation of a given type of functionality.

.NET components have additional characteristics. First, they control external resources explicitly (for example, memory), giving developers precise control. Second, they feature design-time support. This means that they can be used in a rapid application development environment, where, for example, developers can drag and drop components easily onto the Form of the application they are developing, and modify its characteristics. Most components allow their characteristics to be modified by changing values in the Properties tab of Visual Studio .NET, but more sophisticated components have more advanced WYSIWYG capabillities, such as allowing developers to change details directly on a Form, and even contextualized assistants.

A .NET component is built up from the types in the hierarchy of the .NET Framework class library. In other words, a component will have inherited many of its characteristics from classes higher up in the hierarchy of types, but will have been extended and/or specialized by the component’s author. Because a component may expose some or all of the details of its classes (data members and methods, etc.), a developer can further specialize it in order to extend its capabilities.

Another advantage to using components is that developers can add a functionality to their code without writing the code themselves. For example, rather than having to learn the intricacies of FTP and how to use this protocol using the .NET Framework (which possesses no classes to accomplish this directly), developers can simply “plug in” a component that offers the desired functionality. This translates directly into savings in time-to-market. Yet another advantage is that components are generally more stable, because they are written and tested by specialists. Finally, component developers can dedicate the resources necessary to produce code that is more intuitive and flexible.

Examples of components include data compression, encryption, and networking objects.
Back to Top  Previous Page

.NET control

A control is a visual component that is part of a user interface, such as a GUI element like a button, a toolbar, or a text box. Although these GUI elements can all be produced using the .NET Framework class library—and indeed this is how third-party .NET controls are created—a third-party control offers developers some advantages:
  • Third-party component developers can provide more advanced controls that are not available in VS.NET.
  • Third-party controls are often more flexible or easier to use, with powerful WYSIWYG (what-you-see-is-what-you-get) design capabilities.
  • Third-party developers can provide controls that have unique or specialized capabilities.
Of course, since .NET controls are based on the .NET Framework, incorporating them in an application is generally much easier than it is with, say, an ActiveX control.
Back to Top  Previous Page

ActiveX

ActiveX is an older set of Microsoft technologies originally intended to allow Web site developers to provide interactive content in their Web pages. However, it was eventually used in Windows-based applications. It is not a programming language, but rather a set of rules describing how applications can share information.

Although ActiveX can be used in applications, it is limited to providing parts of an application, such as user interface elements or a given functionality, rather than an entire application. In other words, unlike the .NET Framework, it is not an application framework. Developers using ActiveX components or controls write the application in a given progamming language, such as C++ or Visual Basic, and use the Win32 API, MFC, or WTL frameworks to access the rest of the functionality necessary to create a program. Nevertheless, developers are often constrained by the technology used in their workplace. Many controls and components based on this technology are available.

ActiveX components and controls are generally COM objects. This means that they can be used in a programming language other than the one used to create them. However, ActiveX components and controls are compiled for a specific type of processor and operating system, which limits their reusability. In fact almost all of them are compiled for Intel (x86) processors. A major disadvantage of ActiveX is its lack of security: ActiveX components and controls can directly access a user’s hard drive, potentially wreaking havoc.
Back to Top  Previous Page

Components

Just as .NET components encapsulate a given functionality, so do ActiveX components. However, this type of technology lacks the advantages of the .NET Framework. For example, because they are not extensions of a common framework or hierarchy of classes, a specialized component cannot be used in a context where a non-specialized component is called for. Furthermore, because ActiveX components do not expose all of the details of their class, programmers cannot inherit from them or extend their capabilities. ActiveX components are specific to CPUs and operating systems, limiting their usefulness to users without PCs and Windows. However, because ActiveX components are COM objects, developers can use them in a programming language other than the one used to create them. For example, a component written in Visual Basic can be used in an application being written in C++.
Back to Top  Previous Page

ActiveX Controls

ActiveX controls are visual components. Examples of ActiveX controls include menus, toolbars, buttons, etc. As with ActiveX components, ActiveX controls are limited because they do not belong to a common framework. Neverthelesse, because ActiveX are COM objects, developers can use them in a programming language other than the one used to create them. For example, a control written in Visual Basic can be used in an application being written in C++.
Back to Top  Previous Page

Libraries

Unlike third-party .NET class libraries, ActiveX libraries do not “fit into” a framework. Whereas a class in a .NET class library inherits from a class or from classes in the .NET Framework, an ActiveX component or control does not. What this can mean for developers is that they must write much more code to get the functionality that would normally be inherited from higher classes, as is the case with the .NET Framework.

Back to Top  Previous Page

 

ComponentSpot – Xceed Software 2004 | Contact us | Add a Component | ComponentWatch