NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

The NGWS Frameworks

You don't have to design all your NGWS types from the ground up. NGWS includes libraries of classes, interfaces, and value types -- called the NGWS Frameworks -- that help expedite and optimize the development process and gives you access to system functionality. To facilitate interoperability between languages, the NGWS Frameworks are CLS-compliant and can be used from any language compiler that targets the runtime.

The NGWS Frameworks include classes that encapsulate data structures, perform I/O, give you access to information about a loaded class, and provide a way to invoke security checks, as well as classes that encapsulate exceptions, and other helpful functionality such as data access, server side UI projections and rich GUI generation. The NGWS Frameworks are designed to be the foundation on which NGWS applications, components, and controls are built.

The NGWS Frameworks provide both abstract base classes and class implementations derived from those base classes. You can use these derived classes "as is" or derive your own classes from them. Also provided are interfaces and default implementations of those interfaces. To get the interface's functionality, you can either implement the interface yourself or you can use or derive a class from one of the runtime-based classes that implements the interface.

Frameworks classes are named using a dot-syntax naming scheme that connotes a naming hierarchy. This technique is used to logically group related classes together so that they can be searched and referenced more easily. For example, the System.Reflection.FieldInfo class is related to other classes that also use a System.Reflection.x naming pattern: all of the classes named with a System.Reflection prefix can be used to discover information about types at runtime. The part of the name up to the last dot (e.g., System.Reflection) is often referred to as the namespace name and the last part (e.g., FieldInfo) as the class name. The use of naming patterns to group related classes into namespaces is a very useful way to build and document class libraries. This naming syntax has no effect on visibility, member access, inheritance, or binding. A logical namespace may be partitioned across multiple assemblies and a single assembly may contain classes from multiple namespaces. It is the assembly that provides the formal structure for visibility and versioning in the runtime.

The root namespace for the NGWS Frameworks is the System namespace. In this namespace are the classes that represent the base data types used by every application: Object (the root of the inheritance hierarchy), Byte, Char, Array, Int32, String, etc. Many of these types correspond to the primitive data types that your language compiler uses. When you write code using NGWS Frameworks types, you can, if you wish, use your language's corresponding primitive type when a runtime-based primitive type is expected. The following table lists the NGWS Frameworks types that represent primitive types, briefly describes each type, and indicates the corresponding type in Visual Basic, C#, and managed extensions to C++.

  Class name Description Visual Basic data type C# data type Managed extensions to C++ data type
Integral Byte 1-byte unsigned integer Byte byte unsigned char
  SByte 1-byte signed integer Not applicable sbyte char
  Int16 2-byte signed integer Short short short
  Int32 4-byte signed integer Integer int int
  Int64 8-byte signed integer Long long __int64
  UInt16 2-byte unsigned integer Not applicable ushort unsigned short
  UInt32 4-byte unsigned integer Not applicable uint unsigned int
  UInt64 8-byte unsigned integer Not applicable ulong unsigned __int64
Floating Point Single 4-byte floating point number Single float float
  Double 8-byte floating point number Double double double
Other Char A Unicode character, which is a 2-byte unsigned integer Char char __wchar_t
Logical Boolean true or false Boolean bool bool

Along with the base data types, there are almost 100 classes directly in the System namespace ranging from classes for handling exceptions and forming delegates to dealing with core runtime concepts such as application domains and the automatic memory manager.

The System namespace also contains 24 second-level namespaces. The following list shows the categories of functionality that are covered, and the namespaces in each category:

Data: System.Data, System.XML
Component Model: System.CodeDOM, System.ComponentModel, System.Core
Configuration: System.Configuration
Frameworks Services: System.Diagnostics, System.DirectoryServices, System.ServiceProcess, System.Messaging, System.Timers
Globalization: System.Globalization, System.Resources
Net: System.Net
Programming Basics: System.Collection, System.IO, System.Text, System.Threading
Reflection: System.Reflection
Rich Client-Side GUI: System.Drawing, System.Winforms
Runtime Infrastructure Services: System.Runtime
Security: System.Security
Web Services: System.Web

The reference documentation for the NGWS Frameworks provides an overview of each class along with a formal description of its members (including parameters and return values). For more detailed information about the Frameworks, see the NGWS Frameworks reference documentation.