You are on page 1of 12

1.

Project Details

2. Introduction to the Project

3. Brief Overview of .NET Framework

4. .NET Framework Remoting

5. Globalization

6. Manifest-based Activation

7. New Window-based Form Controls

 Project Name: - Microsoft .NET Framework


 Objective Name: - To give a brief description of Microsoft .NET
Framework

 Sources of Information: -

Internet: -

1. http://www.google.co.in

2. http://www.computing.net

3. http://www.wikipedia.org

4. http://www.microsoft.com

5. http://www.asp.net
This project aims at describing the brainstorming technology of .NET Framework. The
Microsoft .NET Framework version 2.0 extends from the .NET Framework version 1.1.
This upgraded framework comes with new features and improvements to the existing
features.

All the .NET Framework applications deal with system types in one way or another.
Whether it is user interface (UI) components in Microsoft® Windows® and web
applications or integer data returned by a Web service method, all are instances of a
.NET Framework system types. It is impossible to create a .NET Framework application
without using system types. Therefore, to be able to create robust applications and
become a productive .NET Framework developer, one needs to have a good
understanding of system types.

In addition to the system types that the .NET Framework provides, one can also create a
customized system types, such as classes and structures, and use interfaces to define
functionality.

This project describes the purpose of the system types that the .NET Framework provides
and their usage.

Finally this project is an overall overview of the software framework that is all helpful in
creating robust, reliable and compatible software’s for now-a-day use; Microsoft .NET.
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.

Version 3.0 of the .NET Framework is included with Windows Server 2008 and Windows
Vista. The current version of the framework can also be installed on Windows XP and
the Windows Server 2003 family of operating systems. A reduced version of the .NET
Framework is also available on Windows Mobile platforms, including smartphones as
the .NET Compact Framework. Version 4.0 of the framework was released as a public
Beta on 20 May 2009.
Microsoft® .NET Remoting provides a rich and extensible framework for objects living
in different AppDomains, in different processes and in different machines to
communicate with each other seamlessly. .NET Remoting offers a powerful yet simple
programming model and runtime support for making these interactions transparent. In
this article we will take a look at the different building blocks of the Remoting
architecture, as well as explore some of the common scenarios in which .NET Remoting
can be leveraged.

 .NET Remoting Objects

There are three types of objects that can be configured to serve as .NET remote
objects. You can choose the type of object depending on the requirement of your
application. This section explains the following objects in detail:

• Single Call

Single Call objects service one and only one request coming in. Single Call
objects are useful in scenarios where the objects are required to do a finite
amount of work. Single Call objects are usually not required to store state
information, and they cannot hold state information between method calls.
However, Single Call objects can be configured in a load-balanced
fashion.

• Singleton Objects

Singleton objects are those objects that service multiple clients and hence
share data by storing state information between client invocations. They
are useful in cases in which data needs to be shared explicitly between
clients and also in which the overhead of creating and maintaining objects
is substantial.

• Client-Activated Objects (CAO)

Client-activated objects (CAO) are server-side objects that are activated


upon request from the client. This way of activating server objects is very
similar to the classic COM coclass activation. When the client submits a
request for a server object using "new" operator, an activation request
message is sent to the remote application. The server then creates an
instance of the requested class and returns an ObjRef back to the client
application that invoked it. A proxy is then created on the client side using
the ObjRef. The client's method calls will be executed on the proxy. Client-
activated objects can store state information between method calls for its
specific client and not across different client objects. Each invocation of
"new" returns a proxy to an independent instance of the server type.

 Passing Objects Using .NET Remoting

In .NET Remoting, objects can be passed from one application to another in the
following ways:

1. As parameters in method calls


Example: public int myRemoteMethod (MyRemoteObject myObj)
2. Return Value of method calls
Example: public MyRemoteObject myRemoteMethod(String myString)

3. Values resulting from property or field access of a .NET component


Example: myObj.myNestedObject

For objects that are Marshal By Value (MBV), a complete copy of the object is
made when the object is passed from one application to another.

For objects that are Marshal By Reference (MBR), a reference to the object is
made when passed from one application to another. When the object reference
(ObjRef) arrives in the remote application, it is turned into a "proxy" back to the
original object.

 Sample Code for a Simple .NET Remoting Server Object


using System;
using System.Runtime.Remoting;
namespace myRemoteService
{
// Well Known Web Service object
public class myRemoteObject : MarshalByRefObject
{
// Method myRemoteMethod
public String myRemoteMethod(String s)
{
return "Hello World";
}
}
}

 Sample Client Code To Access This Object

using System;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Http;
using myRemoteService;
public class Client
{
public static int Main(string[] args)
{
ChannelServices.RegisterChannel(new HttpChannel());
// Create an instance of a myRemoteObject class
myRemoteObject myObj =
( myRemoteObject)Activator.GetObject(typeof(myRemoteObject),
"http://myHost:7021/host/myRemoteObject.soap");
myObj. myRemoteMethod ("Hello World");
return 0;
}
}

.NET remoting enables you to build widely distributed applications easily,


whether the application components are all on one computer or spread out across
the entire world. You can build client applications that use objects in other
processes on the same computer or on any other computer that is reachable over
its network. You can also use .NET remoting to communicate with other
application domains in the same process.

.NET remoting provides an abstract approach to interprocess communication that


separates the remotable object from a specific client or server application domain
and from a specific mechanism of communication. As a result, it is flexible and
easily customizable. You can replace one communication protocol with another,
or one serialization format with another without recompiling the client or the
server. In addition, the remoting system assumes no particular application model.
You can communicate from a Web application, a console application, a Windows
Service – from almost anything you want to use. Remoting servers can also be any
type of application domain. Any application can host remoting objects and
provide its services to any client on its computer or network.
Globalization refers to the process with which an application or software will be
designed and developed so as to make it run across all platforms and all sites with
minimum or no modification to the software application. The software is very amenable
to customization so as to suit to the location-specific conditions and it is also capable of
providing information based on the varied inputs and the location-specific operating
system.

Under any normal circumstance, there will be two processes in Globalization and they
are customization or localization of the application and internationalizing the
application codes so as to meet the standards of the local culture and other related
matters.

In internationalization process the application code base will be same and the efforts
will be on jobs such as translating, storing, retrieving and to make the application user
friendly for the selected locale. In any given place the culture and the language will
always be different and besides this you should also take into account the other factors
such as time zone, normal date pattern usage, cultural and language environments,
currencies, telephone numbers, and so many other factors that are specific to the locale.

In globalization the process of internationalization enables you to remove from the code
base and the presentation layer all the contents and make you to use only a single
presentation layer and single code base with a common contents that can suit any
culture. The internationalization process will aid you to keep all the contents in a
common place with an idea of making it easily accessible by the programmed codes and
the results can easily be populated all over presentation layer and the application with
ease and efficiently.

In addition to the above, the internationalization process also enables you to store the
contents and all the collected inputs from the user in a user friendly format and in a
highly secured manner without compromising any standards pertaining to the local
culture. The internationalization process is one step before any attempt for localizing the
application to suit to the local needs.

With the help of the localization process of globalization, you can make your application
adaptable to the various location specific conditions and it will be easy for you to
translate and re-format your application to suit to your new location and that too
without changing any of the codes. Further, you can make use of the process for
rectifying any of the reported bugs and for fine tuning the application for running
smoothly without any hitch.

The globalization process also makes use of the locally prevailing information on culture
where the software or the application is to be installed and maintained. The locational
details and the language used in that particular area constitute to culture information
and for working with any culture based information the namespace concept is utilized
and the SystemGlobalization, SystemResources and SystemThreading are the available
namespaces in .NET Framework.

Out of the various namespaces, the SystemGlobalization namespace constitute classes


that are used to hold information relating to region or country, the local language used,
type of calendars, date format used, numbers, currency, etc., all in a meticulously
arranged fashion and all these classes are used while developing the globalized
(internationalized) applications.

You can use advanced globalization functionalities with the assistance of classes such as
StringInfo and TextInfo classes and the various functionalities include text element
processing and surrogate support systems.

The SystemResources namespace constitutes interfaces and classes that are very helpful
for developers and maintenance experts in creating, storing, retrieving, and managing
various resources used in the application that are culture and location-specific.

The SystemThreading namespace constitutes interfaces and classes that aid in


multithreaded programming. The classes that are used in this type of SystemThreading
namespace are also useful in accessing data and for synchronization of thread activities.
With all of the current talk about the Web, it may appear that the Microsoft® Visual
Studio® .NET development system has de-emphasized support for building traditional
Microsoft Windows®-based applications.

Windows Forms is a new forms package that enables developers building Windows-
based applications to take full advantage of the rich user interface features available in
the Microsoft Windows operating system. Windows Forms is part of the new
Microsoft .NET platform and leverages many new technologies, including a common
application framework, managed execution environment, integrated security, and object-
oriented design principles. In addition, Windows Forms offers full support for quickly
and easily connecting to Web Services and building rich, data-aware applications based
on the ADO+ data model. With the new shared development environment in Visual
Studio .NET, developers will be able to create Windows Forms applications using any of
the languages supporting the .NET platform, including Microsoft Visual Basic® .NET
and C#.

Windows Forms controls are all based on the class System.Windows.Forms.Control.


Control has all the basic HWND functionality built in, and it handles most of the
common WM_xxxx messages we've all come to know and love, as well as layout logic
and painting code. Most of the controls in the System.Windows.Forms namespace are
actually derived from Control. ScrollableControl adds support for scrolling the client
area of a window. Generally, that scrolling support is accessed through
ContainerControl, which derives from ScrollableControl and adds support for
managing child controls, focus issues, and tabbing. Derived from ContainerControl is
Form, Windows Form's top-level control, which has properties to control caption bars,
system menus, non-rectangular windowing, and default controls. Also derived from
ContainterControl is UserControl, which is the base class for controls that developers
can build. UserControl is intended to host other child controls but to be exposed as a
single unit to outside clients. UserControl and Form both have visual designers in
Microsoft Visual Studio .NET and you'll find project items for adding and designing
classes derived from them.
Control

Rich Control

Scrollable Control

Container Control

Form

User Control

You might also like