Exposing the .NET Framework


When designing and building software components , developers must choose carefully how the functionality of their components will be exposed. A number of scenarios must be considered , including the following:

  • Producing components that will be installed on client machines with a separate installation process. This approach permits the component to query its environment at installation time and modify its functionality to suit its environment.

  • Producing components whose functionality will be downloaded over the Internet and hosted inside an application such as a Web browser. This approach permits the component to expose its functionality to a large and diverse range of clients but can also limit the component's opportunity to tailor its functionality to individual clients .

  • Producing components that will be hosted locally but accessed via remote clients. In situations where the component provides access to a local resource, such as a database, the component may reside locally and be accessed by remote clients. Web Services are an example of this scenario.

  • Producing components (or, more likely, a framework) that support all of the preceding scenarios.

Component architectures should support as many of these scenarios as possible. Importantly, an architecture should not arbitrarily restrict the developer from using a user -defined component with any of these models. The .NET Framework provides a number of facilities and services for just this purpose. A brief explanation of some of the major facilities in the .NET Framework for exposing a component's functionality follows ; a more extensive and complete discussion appears in the later chapters of the book.

Windows Clients

The System.Windows.Forms namespace of the .NET Framework provides types that support the creation of rich graphical user interface (GUI) applications, often called smart clients, developed for Windows operating systems. The types found in this namespace are similar in functionality to some of the classes found in the Microsoft Foundation Classes (MFCs) or the Abstract Windows Toolkit (AWT); however, the .NET Framework types can be used from any .NET-compatible language. Such GUI libraries offer enormous support for rapid application development (RAD). A major advantage of these libraries is that they provide the specification and default implementation of GUI applications and require developers only to override the behavior of types when the provided functionality differs from the application's requirements.

A number of useful classes are defined in the System.Windows.Forms namespace. For example, the class System.Windows.Forms.Form represents a window in a desktop application. The namespace also includes classes to represent buttons , check boxes, combo boxes, controls, dialog boxes, forms, labels, menus , panels, status bars, tab controls, and many other useful windowing elements.

ASP.NET: Web Forms

ASP.NET provides a complete set of types for the development of Web-based applications. It defines types that represent all of the elements of a fully functional Web-based system, ranging from types that represent the visual elements of a Web application to types that provide Web site functionality, such as caching and security. ASP.NET, as the name suggests, is built on top of the .NET Framework and, therefore, offers facilities such as dynamic compilation of Web pages, the ability to script Web pages in many .NET languages, and the ability to reuse .NET types from Web pages. Useful classes defined in ASP.NET include System.Web.UI.Page , the base class that defines all the common features and facilities utilized by Web pages. Other classes represent elements such as buttons, list boxes, calendars, and data display controls.

ASP.NET: Web Services

Web Services is an emerging standard for exposing programmatic functionality on the Internet. These services are built on top of open standards and protocols such as HTTP, XML, and SOAP, all of which enable components to communicate independently of the underlying system on which the component resides. The .NET Framework provides types and services to support the creation, deployment, and consumption of Web Services. The namespace System.Web.Services defines types such as WebService , a class for accessing ASP.NET functionality from Web Services.

This brief overview of some of the means of exposing the functionality of the .NET Framework is intended to whet your appetite to learn more. The remainder of this book describes the features and services provided by the .NET Framework in detail.



Programming in the .NET Environment
Programming in the .NET Environment
ISBN: 0201770180
EAN: 2147483647
Year: 2002
Pages: 146

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