Saturday, August 1, 2009

PRINCIPAL DESIGN FEATURES OF .NET FRAMEWORK

Principal design features

Interoperability
Because interaction between new and older applications is commonly required, the .NET Framework provides means to access functionality that is implemented in programs that execute outside the .NET environment. Access to COM components is provided in the System.Runtime.InteropServices and System.EnterpriseServices namespaces of the framework; access to other functionality is provided using the P/Invoke feature.
Common Runtime Engine
The Common Language Runtime (CLR) is the virtual machine component of the .NET framework. All .NET programs execute under the supervision of the CLR, guaranteeing certain properties and behaviors in the areas of memory management, security, and exception handling.
Language Independence
The .NET Framework introduces a Common Type System, or CTS. The CTS specification defines all possible datatypes and programming constructs supported by the CLR and how they may or may not interact with each other. Because of this feature, the .NET Framework supports the exchange of instances of types between programs written in any of the .NET languages. This is discussed in more detail in Microsoft .NET Languages.
Base Class Library
The Base Class Library (BCL), part of the Framework Class Library (FCL), is a library of functionality available to all languages using the .NET Framework. The BCL provides classes which encapsulate a number of common functions, including file reading and writing, graphic rendering, database interaction and XML document manipulation.
Simplified Deployment
The .NET framework includes design features and tools that help manage the installation of computer software to ensure that it does not interfere with previously installed software, and that it conforms to security requirements.
Security
The design is meant to address some of the vulnerabilities, such as buffer overflows, that have been exploited by malicious software. Additionally, .NET provides a common security model for all applications.
Portability
The design of the .NET Framework allows it to theoretically be platform agnostic, and thus cross-platform compatible. That is, a program written to use the framework should run without change on any type of system for which the framework is implemented. Microsoft's commercial implementations of the framework cover Windows, Windows CE, and the Xbox 360.[4] In addition, Microsoft submits the specifications for the Common Language Infrastructure (which includes the core class libraries, Common Type System, and the Common Intermediate Language),[5][6][7] the C# language,[8] and the C++/CLI language[9] to both ECMA and the ISO, making them available as open standards. This makes it possible for third parties to create compatible implementations of the framework and its languages on other platforms.

Architecture

Visual overview of the Common Language Infrastructure (CLI)

Common Language Infrastructure (CLI)

The core aspects of the .NET Framework lie within the Common Language Infrastructure, or CLI. The purpose of the CLI is to provide a language-neutral platform for application development and execution, including functions for exception handling, garbage collection, security, and interoperability. Microsoft's implementation of the CLI is called the Common Language Runtime or CLR.

Assemblies

The CIL code is housed in .NET assemblies. As mandated by specification, assemblies are stored in the Portable Executable (PE) format, common on the Windows platform for all DLL and EXE files. The assembly consists of one or more files, one of which must contain the manifest, which has the metadata for the assembly. The complete name of an assembly (not to be confused with the filename on disk) contains its simple text name, version number, culture, and public key token. The public key token is a unique hash generated when the assembly is compiled, thus two assemblies with the same public key token are guaranteed to be identical from the point of view of the framework. A private key can also be specified known only to the creator of the assembly and can be used for strong naming and to guarantee that the assembly is from the same author when a new version of the assembly is compiled (required to add an assembly to the Global Assembly Cache).

Metadata

All CIL is self-describing through .NET metadata. The CLR checks the metadata to ensure that the correct method is called. Metadata is usually generated by language compilers but developers can create their own metadata through custom attributes. Metadata contains information about the assembly, and is also used to implement the reflective programming capabilities of .NET Framework.

Security

.NET has its own security mechanism with two general features: Code Access Security (CAS), and validation and verification. Code Access Security is based on evidence that is associated with a specific assembly. Typically the evidence is the source of the assembly (whether it is installed on the local machine or has been downloaded from the intranet or Internet). Code Access Security uses evidence to determine the permissions granted to the code. Other code can demand that calling code is granted a specified permission. The demand causes the CLR to perform a call stack walk: every assembly of each method in the call stack is checked for the required permission; if any assembly is not granted the permission a security exception is thrown.

When an assembly is loaded the CLR performs various tests. Two such tests are validation and verification. During validation the CLR checks that the assembly contains valid metadata and CIL, and whether the internal tables are correct. Verification is not so exact. The verification mechanism checks to see if the code does anything that is 'unsafe'. The algorithm used is quite conservative; hence occasionally code that is 'safe' does not pass. Unsafe code will only be executed if the assembly has the 'skip verification' permission, which generally means code that is installed on the local machine.

.NET Framework uses appdomains as a mechanism for isolating code running in a process. Appdomains can be created and code loaded into or unloaded from them independent of other appdomains. This helps increase the fault tolerance of the application, as faults or crashes in one appdomain do not affect rest of the application. Appdomains can also be configured independently with different security privileges. This can help increase the security of the application by isolating potentially unsafe code. The developer, however, has to split the application into subdomains; it is not done by the CLR.

Class library

Namespaces in the BCL[10]
System
System. CodeDom
System. Collections
System. Diagnostics
System. Globalization
System. IO
System. Resources
System. Text
System. Text.RegularExpressions

The .NET Framework includes a set of standard class libraries. The class library is organized in a hierarchy of namespaces. Most of the built in APIs are part of either System.* or Microsoft.* namespaces. These class libraries implement a large number of common functions, such as file reading and writing, graphic rendering, database interaction, and XML document manipulation, among others. The .NET class libraries are available to all .NET languages. The .NET Framework class library is divided into two parts: the Base Class Library and the Framework Class Library.

The Base Class Library (BCL) includes a small subset of the entire class library and is the core set of classes that serve as the basic API of the Common Language Runtime.[10] The classes in mscorlib.dll and some of the classes in System.dll and System.core.dll are considered to be a part of the BCL. The BCL classes are available in both .NET Framework as well as its alternative implementations including .NET Compact Framework, Microsoft Silverlight and Mono.

The Framework Class Library (FCL) is a superset of the BCL classes and refers to the entire class library that ships with .NET Framework. It includes an expanded set of libraries, including WinForms, ADO.NET, ASP.NET, Language Integrated Query, Windows Presentation Foundation, Windows Communication Foundation among others. The FCL is much larger in scope than standard libraries for languages like C++, and comparable in scope to the standard libraries of Java.

Memory management

The .NET Framework CLR frees the developer from the burden of managing memory (allocating and freeing up when done); instead it does the memory management itself. To this end, the memory allocated to instantiations of .NET types (objects) is done contiguously[11] from the managed heap, a pool of memory managed by the CLR. As long as there exists a reference to an object, which might be either a direct reference to an object or via a graph of objects, the object is considered to be in use by the CLR. When there is no reference to an object, and it cannot be reached or used, it becomes garbage. However, it still holds on to the memory allocated to it. .NET Framework includes a garbage collector which runs periodically, on a separate thread from the application's thread, that enumerates all the unusable objects and reclaims the memory allocated to them.

The .NET Garbage Collector (GC) is a non-deterministic, compacting, mark-and-sweep garbage collector. The GC runs only when a certain amount of memory has been used or there is enough pressure for memory on the system. Since it is not guaranteed when the conditions to reclaim memory are reached, the GC runs are non-deterministic. Each .NET application has a set of roots, which are pointers to objects on the managed heap (managed objects). These include references to static objects and objects defined as local variables or method parameters currently in scope, as well as objects referred to by CPU registers When the GC runs, it pauses the application, and for each object referred to in the root, it recursively enumerates all the objects reachable from the root objects and marks them as reachable. It uses .NET metadata and reflection to discover the objects encapsulated by an object, and then recursively walk them. It then enumerates all the objects on the heap (which were initially allocated contiguously) using reflection. All objects not marked as reachable are garbage. This is the mark phase. Since the memory held by garbage is not of any consequence, it is considered free space. However, this leaves chunks of free space between objects which were initially contiguous. The objects are then compacted together, by using memcpy to copy them over to the free space to make them contiguous again.[11] Any reference to an object invalidated by moving the object is updated to reflect the new location by the GC. The application is resumed after the garbage collection is over.

The GC used by .NET Framework is actually generational. Objects are assigned a generation; newly created objects belong to Generation 0. The objects that survive a garbage collection are tagged as Generation 1, and the Generation 1 objects that survive another collection are Generation 2 objects. The .NET Framework uses up to Generation 2 objects. Higher generation objects are garbage collected less frequently than lower generation objects. This helps increase the efficiency of garbage collection, as older objects tend to have a larger lifetime than newer objects. Thus, by removing older (and thus more likely to survive a collection) objects from the scope of a collection run, fewer objects need to be checked and compacted.

What does a .net framework include?


What does a .net framework include?

The Microsoft .NET Framework is a software framework that can be installed on computers running Microsoft Windows operating systems. It includes a large library of coded solutions to common programming problems and a virtual machine that manages the execution of programs written specifically for the framework. The .NET Framework is a key Microsoft offering and is intended to be used by most new applications created for the Windows platform.

The framework's Base Class Library provides a large range of features including user interface, data and data access, database connectivity, cryptography, web application development, numeric algorithms, and network communications. The class library is used by programmers, who combine it with their own code to produce applications.

Programs written for the .NET Framework execute in a software environment that manages the program's runtime requirements. Also part of the .NET Framework, this runtime environment is known as the Common Language Runtime (CLR). The CLR provides the appearance of an application virtual machine so that programmers need not consider the capabilities of the specific CPU that will execute the program. The CLR also provides other important services such as security, memory management, and exception handling. The class library and the CLR together constitute the .NET Framework.

What is a web server used for?

Web Server:

A computer program that is responsible for accepting HTTP requests from clients (user agents such as web browsers), and serving them HTTP responses along with optional data contents, which usually are web pages such as HTML documents and linked objects (images, etc.).

What is a web server used for?

That's is according to Web servers are computers on the internet that host websites, serving pages to viewers upon request. This service is referred to as web hosting.

Every web servers has a unique address so that other computers connected to the internet know where to find it on the vast network. The IP (Internet Protocol) address looks something like this: 69.93.141.146. This address maps to a more human friendly address, such as wiseGEEK.

Web hosts rent out space on their web servers to people or businesses to set up their own websites. The web server allocates a unique website address to each website it hosts.

When you connect to the internet, your personal computer also receives a unique IP address assigned by your ISP (internet service provider). This address identifies your computer's location on the network. When you click on a link to visit a website, like www.wisegeek.com, your browser sends out a request to wiseGEEK's IP address. This request includes return information and functions like a postal letter sent across town, but in this case the information is transferred across a network. The communiqué passes through several computers on the way to wiseGEEK, each routing it closer to its ultimate destination.

When your request reaches its destination, the web serverr that hosts wiseGEEK's website sends the page in HTML code to your IP address. This return communiqué travels back through the network. Your computer receives the code and your browser interprets the HTML code then displays the page for you in graphic form.

The more powerful the server, the faster it can serve up website pages. Slower, smaller servers may result in frustrating lag time for viewers. High traffic can also slow servers that are not powerful enough to handle high volumes of data exchange. This lag time should be a concern if you are shopping for a web host. Most web hosts have a page dedicated to sharing technical information about their web server, including speed, capacity, network configuration and other details.

In theory, web servers stay connected to the Internet 24/7, 365 days a year. In truth they experience occasional downtime due to maintenance and technical problems. Web servers with consistent records of an uptime of 99.5% or better are considered reliable.

What is a server?

What is a Server?
A server is a device with a particular set of programs or protocols that provide various services, which other machines or clients request, to perform certain tasks.
Together, a server and its clients form a client/server network which provides routing systems and centralized access to information, resources, stored data, etc. At the most ground level, one can consider it as a technology solution that serves files, data, print, fax resources and multiple computers.
The advanced server versions, like Windows Small Business Server 2003 R2 enable the user to handle the accounts and passwords, allow or limit the access to shared resources, automatically support the data and access the business information remotely. For example, a file server is a machine that maintains files and allows clients or users to upload and download files from it.
Similarly, a
web server hosts websites and allows users to access these websites. Clients mainly include computers, printers, faxes or other devices that can be connected to the server. By using a server, one can securely share files and resources like fax machines and printers. Hence, with a server network, employees can access the Internet or company e-mail simultaneously.

Types of Servers in WINDOWS OS

There are 4 Types of Servers:
1.Windows Server 2003 Standard Edition
2.Windows Server 2003 Enterprise Edition
3.Windows Server 2003 Datacentre Edition
4.Windows Server 2003 Web Edition

You have Domain controllers, Member servers and Standalone
Servers.
Windows 2003 Servers are configured based on the services
they provide. You can set them up to do certain roles.
The roles servers are setup with are:
Application Server - Web Services

DHCP Server - Assigning IPs to PC's

DNS Server - Resolves PC Names into IP

Domain Controller - has ADS, manages logon, Authenticates,
Provides Driectory services and has a Data store. Installs
DNS and ADS.

File server - Manages access to files

Mail server - For small sites where you need mail, but not
a powerful Echange server

Print Server - manages printers

Remote Access/VPN Server - routes Network traffic
Server Cluster Node - Server that operates as part of a
group. supported by Datacentre and Enterprise only

Streaming media Server - a server that provides Streaming
media to other systems on the network. Suported by Standard
and snterprise servers only

Terminal Server - a server that proceses tasks for multiple
client pc's in a termanl services mode.

Wins Server - Resolved Netbios Names into IP

Saturday, October 11, 2008

Server Types

This list, courtesy of serverwatch.com, categorizes the many different
types of servers used in the marketplace today. Click on the server
category you'd like to know more about, and you will be taken directly
to a serverwatch.com page that provides additional information and
resources.

Server Platforms
A term often used synonymously with operating system, a platform is
the underlying hardware or software for a system and is thus the
engine that drives the server.
Application Servers
Sometimes referred to as a type of middleware, application servers
occupy a large chunk of computing territory between database servers
and the end user, and they often connect the two.
Audio/Video Servers
Audio/Video servers bring multimedia capabilities to Web sites by
enabling them to broadcast streaming multimedia content.
Chat Servers
Chat servers enable a large number of users to exchange information in
an environment similar to Internet newsgroups that offer real-time
discussion capabilities.
Fax Servers
A fax server is an ideal solution for organizations looking to reduce
incoming and outgoing telephone resources but that need to fax actual
documents.
FTP Servers
One of the oldest of the Internet services, File Transfer Protocol
makes it possible to move one or more files securely between computers
while providing file security and organization as well as transfer
control.
Groupware Servers
A groupware server is software designed to enable users to
collaborate, regardless of location, via the Internet or a corporate
intranet and to work together in a virtual atmosphere.
IRC Servers
An option for those seeking real-time discussion capabilities,
Internet Relay Chat consists of various separate networks (or "nets")
of servers that allow users to connect to each other via an IRC
network.
List Servers
List servers offer a way to better manage mailing lists, whether they
be interactive discussions open to the public or one-way lists that
deliver announcements, newsletters, or advertising.
Mail Servers
Almost as ubiquitous and crucial as Web servers, mail servers move and
store mail over corporate networks (via LANs and WANs) and across the
Internet.
News Servers
News servers act as a distribution and delivery source for the
thousands of public news groups currently accessible over the USENET
news network.
Proxy Servers
Proxy servers sit between a client program (typically a Web browser)
and an external server (typically another server on the Web) to filter
requests, improve performance, and share connections.
Telnet Servers
A Telnet server enables users to log on to a host computer and perform
tasks as if they're working on the remote computer itself.
Web Servers
At its core, a Web server serves static content to a Web browser by
loading a file from a disk and serving it across the network to a
user's Web browser. This entire exchange is mediated by the browser
and server talking to each other using HTTP. Also read ServerWatch's
Web Server Basics article.

Friday, June 6, 2008

Getting started with IMAP for Gmail

Getting started with IMAP for Gmail

What is IMAP?

IMAP, or Internet Message Access Protocol, lets you download messages from Gmail's servers onto your computer so you can access your mail with a program like Microsoft Outlook Express or Apple Mail, even when you aren't connected to the Internet.

IMAP creates a constant connection between mail clients (desktop and/or mobile) and Gmail.

What's the difference between IMAP and POP?

Unlike POP, IMAP offers two-way communication between your web Gmail and your email client(s). This means when you log in to Gmail using a web browser, actions you perform on email clients and mobile devices (ex: putting mail in a 'work' folder) will instantly and automatically appear in Gmail (ex: it will already have a 'work' label on that email).

In addition, IMAP provides a better method to access your mail from multiple devices. If you check your email at work, on your mobile phone, and again at home, IMAP ensures that new mail is accessible from any device at any given time.

Finally, IMAP offers a more stable experience overall. Whereas POP is prone to losing messages or downloading the same messages multiple times, IMAP avoids this through its two-way syncing capabilities between your mail clients and your web Gmail.

If you're trying to decide between using POP and using IMAP with Gmail, we recommend IMAP.

How much does IMAP cost?

IMAP for Gmail is free.

Great! How do I get started?

First, you'll need to enable IMAP in Gmail. Once IMAP is enabled, follow the configuration instructions for your client of choice. Currently, only the clients listed are supported for IMAP. If you'd like to download your Gmail messages with a different client, please check to see if it's on our list of supported POP clients.

When you've enabled IMAP and set up your client, sign in to Gmail through the client and watch your messages arrive. You'll notice that all of your custom Gmail labels will appear in your client as folders, with copies of the messages to which you've applied those labels. While we'd like to make your IMAP experience match the Gmail web interface as much as possible, some Gmail-specific features and terms, such as conversation threading and stars, won't appear in your client. Don't worry; you can still perform all the usual Gmail functions, just in a slightly different way. The IMAP behavior chart shows you how to perform common functions on your IMAP client.

Please note that every client handles IMAP in a slightly different way. If you're curious about the specific use of your client, please contact the client's support team.