Vous êtes sur la page 1sur 48

(Ratibad, Bhopal, M P)

Approved by: A.I.C.T.E, New Delhi (Affiliated To R.G.P.V. Bhopal)

A Industrial Training Report On

"Microsoft .Net Framework"
Submitted in partial fulfillment of Bachelor's Degree in Computer Science & Engineering
Of RAJIV GANDHI PROUDYOGIKI VISHWAVIDYALAYA (University of Technology of Madhya Pradesh)

Group Members:Pragyanand pandey

Project Guide:Mr.HariRam Sir

IES College of Technology

(Ratibad, Bhopal, M P)
(Approved by: A.I.C.T.E, New Delhi (Affiliated To R.G.P.V. Bhopal)

This is to certify that project report entitled .Net Framework presented by, Pragyanand Pandey of 4th year BE in Computer Science and Engineering, is a bona fide presentation of their work done by them under my supervision and guidance. They have submitted this project report towards partial fulfillment of the award of the degree of Bachelor of Engineering of the Rajiv Gandhi Proudyogiki Vishwavidyalaya during the academic year2011-2012. Its further certified that this work hasnt been Submitted elsewhere for the award of any other degree.
Miss.Sunita Singh
Director (IES College of Tech.)

Mr.HariRam Sir
Guide (Lect . CSDeptt.)

Company Profile

Connecting business & relations

Syscom Infotech works as a network / team and as an offshore company in Web Site Development India / Offshore Development Center Outsourcing world. We are truly dedicated in web-development and Offshore Software Outsourcing professionals. Our mission or aim is to fulfill our client's need. Our expertise includes ASP.NET and Database Design utilizing the latest web techniques. Marketing & Sales work flow automation, Monitoring & tracking of workflows and many more functional components. We have provided turnkey solutions to our Indian clients on this aspect of business.

Services offered by the company: Software Development. Full GUI Development. Web Development. Logo Animation Graphic Design. Custom Database Design. Software Architecture Design.

Some of The Key Customers are:

State Bank Of Indore SanField Bearing (India) Pvt Limited. Indian Railways (Central Western) Amit Shukla Classes Pvt Limited. Narmada Valley Development Authority.
ICR Education Society Quality Engineering & Insulation Pvt ltd. Saurabh Metals Pvt. Limited. All India Radio

We have a wide range of experience in designing and developing. Our capabilities range from analysis and design through to training and troubleshooting. We have a strong focus on business analysis to ensure solutions fit your business needs.

About The Training

Microsoft .NET is software that connects information, people, systems and devices. It spans clients, servers and developer tools and consists of: The .NET Framework programming model that enables developers to build Web-based applications which expose their functionality programmatically over a network using standard protocols such as SOAP and HTTP. Developer tools such as Microsoft Visual Studio .NET, which provide a rapid application integrated development environment for programming with the .NET Framework. A set of servers including Microsoft Windows 2000, Microsoft SQL, Server and Microsoft BizTalk Server that integrates, runs, operates and manages XML Web services and applications. Client software such as Windows XP, Windows CE and Microsoft Office XP that helps developers deliver a deep and compelling user experience across a family of devices and existing products. The .NET Framework is the programming model of the .NET environment for building, deploying and running Web- based applications, smart client applications and XML Web services. It manages much of the plumbing, enabling developers to focus on writing the business logic code for their applications. The .NET Framework includes the common language runtime and class libraries.




Microsoft Visual Studio is Microsofts flagship software development product for computer programmers. It centers on an integrated distribution environment which has programmers create stand alone, and web services that run on any platforms supported by Microsofts .Net Framework (for all versions after 6). Supported platforms include Microsoft windows, servers

and workstations, Pocket PC, Smart Phones and World Wide Web browsers not the Java Virtual Machine that all other java tools target. VISUAL STUDIO 2005 The most important language added in this version was the introduction of generics, which are similar in many aspects to C++ templates. This potentially increases the number of bugs caught at compile- time instead of run- time by encouraging the use of strict type checking in areas where it was not possible before, C++ also got a similar upgrade with the addition of C++/CLI which is slated to replace the use of Managed C++. Other new features of Visual Studio 2005 include the Development Designer which allows application designs to be validated before deployments, an improved environment for web publishing when combined with ASP.NET 2.0 and load testing to see application performance under various sorts of user loads. Visual Studio 2005 also added extensive 64- bit support. While the development environment itself only available as a 32- bit application, visual C++ 2005 supports compiling for (x64AMD64 and EM64T) as well as IA- 64 (Itanium). The platforms SDK include 64- bit and 64-bit versions of the libraries.


The .NET framework is an integral windows component that supports building and running the next generation of applications and XML web services. The key component of the .NET frame work are the common language run time and the . NET frame work class library, which includes ADO.NET, ASP.NET and windows forms. The .NET framework provides a managed execution environment simplified development and deployment and integration with a wide variety of programming languages. This framework is made up of the following parts: The common language runtime(CLR) The base class libraries. Object oriented internet development with ASP.NET Rich client user interface using windows forms RAD for the internet using web forms


The .NET framework is a new computing platform that simplifies application development in the highly distributed environment of the internet. The .NET framework is designed to fulfill following objectives: To provide a consistent object oriented programming environment whether object code is stored and executed locally but internet- distributed or executed remotely. To provide a code execution environment that minimizes software deployment and versioning conflicts. To provide a code execution environment that guarantees safe execution of code, including code created by an unknown or semi trusted third party. To provide a code execution environment that eliminates the performance problem of scripted or interpreted environments. To make the developer experience consistent across widely types of application, such as windows based applications and web based applications. To build all communication on industry standards to ensure that code based on the .NET framework can integrate with any other code. The .NET framework has two main components: the common language runtime and the .Net framework class library. The common language runtime is the foundation of the .NET framework. You can think of the runtime as an agent that manages code at execution time, and remoting while also enforcing strict type safely and other forms of code accuracy that ensure security and robustness in fact the concept of code management is a fundamental principle of the runtime. Code that targets the runtime is known as managed code, while code that does not target the runtime is known as un managed code. The class library, the other main component of the .NET frameworks is a comprehensive, object-oriented collection reusable types that you can use to develop applications ranging from traditional command line or graphical user interface (FGUI) applications to application base d on the latest innovations provided by ASP.NET, such as web forms and XML web services. The .NET framework can be hosted by unmanaged component that load the common language runtime into their processes and initiate the execution of managed code. ASP.NET works directly with the runtime to enable ASP.NET application and XML web services, both of which

are discussed later in this topic, Internet explorer is an example of unmanaged application that hosts the runtime (in the form of a MIME type extension). Using internet explorer to the host runtime enables you to embed managed components or windows forms controls in HTML documents. Hosting the runtime in this way makes mobile code 9similar to Microsoft Active Xr controls) possible, but with significant improvement that only managed code can offer, such as semi-trusted execution and secure isolated file storage.

The following illustration shows the relationship of the common language runtime and the class library to your application and to the over all system. The illustration also shows how managed code operated with in a larger architecture.

We can use the .NET framework to develop the following types of application and services: Console applications Window GUI application (Windows Forms) ASP.NET applications XML Web services Windows services

2.1. Introduction To .NET What is .NET?
1.The overall vision of Microsoft .NET is to create a common platform for building applications that can be delivered as reusable, interoperable services over the Internet and corporate intranets. 2. .NET is a Microsofts next generation revolutionary new platform for Windows and Internet software development, based on open Internet protocols and standards. Thus, as already stated, the overall vision of Microsoft .NET is to create a common platform for building applications that can be delivered as reusable, interoperable services over the Internet and corporate intranets. 3. Several software will be developed by Microsoft to achieve this goal. Microsoft wants every player in the industry, be it a software developer or a device manufacturer, to adopt .NET so that they are easily integrated. .NET initiative is all about enabling data transfer between networks, PCs and devices independent of platforms, architecture and solutions. 4. The developers have broad freedom to write their applications in whatever programming language they are comfortable with. At present, Microsoft is shipping four different programming languages: VB, C++, C# and Jscript within Visual Studio.NET, but there are actually 57+ languages in all that are going to target the .NET framework. 5. The programming language support of .NET allows easy and consistent access to any other component, regardless of what programming language it was developed in. A VB application can call a method in a component written in C++, and can catch events from an application written in COBOL. And none of these participants would know each others language. Microsoft .NET initiative basically revolves around the .NET Framework that encompasses the actual language, and execution platform. It also has extensive class libraries providing rich built-in functionality. 6.The .NET framework embraces XML and SOAP to provide integration of software over the Internet. There is also a family of server-based products called .NET Enterprise Servers. These are nothing but next generation of Microsoft BackOffice and are a part of .NET strategy; however, they are not built on the .NET framework. They have a major role to play in future software development projects. When actual .NET framework projects are developed, most of these will depend on the technologies in the .NET Enterprise Servers for functions like data storage and messaging.

2.2 What are Web Services?

1. A Web Service represents a black box functionality that can be reused without worrying about how the service is implemented. They provide well-defined interfaces that describe the services provided. Developers can assemble applications using a combination of remote services, local services and custom code. For example, a company might assemble an online store using Microsofts Passport service to authenticate users a third party personalization service to adapt web pages to each users preferences, a credit card processing service Package tracking services from each shipping company, an in-house catalog service that connects to the companys internal inventory management applications, and a bit of custom code to make sure that their store stands out from the crowd. 2. Web services do not use object-model specific protocols such as DCOM and RMI that require specific homogenous infrastructures on both client and service machine. This kind of implementation, which is tightly coupled to specific component technologies, is acceptable in a controlled environment; but on web, they become impractical. 3. It becomes difficult to guarantee a single, unified infrastructure to all the participants in the web application due to rapid technological changes. Web services have a different approach. They communicate using ever-present web protocols and data formats such as HTTP and XML. Any system supporting these web standards will be able to support web services. 4. Services provided by a web service are in terms of messages the web service accepts and generates rather than how the service is implemented. Thus, by focusing totally on messages, web services are language, platform and object agnostic. A web service can be implemented using any programming language, object model and platform. This service can be consumed by applications written in any language for any platform. 5. The interfaces provided by the web services are called contracts. This contract explains the capabilities of the service, message sequences and protocols it expects. As long as these are honored, a web service can be implemented. The minimum infrastructure required for implementing web services model is low to ensure that these can be implemented and accessed from any platform, using any technology and any programming language. 6. The web service and the web service consumer should rely on standard ways to represent the data and commands, web service interfaces (contracts) and to figure out what service does a web service offer. Such thing is possible by using XML and SOAP. XML (extensible Markup Language) represents a way to describe information so that it is easy to programmatically extract the information needed. SOAP (Simple Object Access Protocol) is an industry standard for using XML to represent data and commands in extensible way. This is where Microsoft .NET comes in that uses XML extensively to facilitate data interchange between different computer systems.

2.3 .NET and Web Services

.NET is founded on this principle of web services. Through .NET, Microsoft is providing the infrastructure to enable the evolution of web services through each of the pieces of .NET platform. It allows applications to use straightforward code to access and utilize web-based services. The web servers can thus easily expose their services to external applications. The server that is providing the services or the client applications and web sites that are utilizing these services do not have to be necessarily written using .NET. It is just that .NET platform will make a lot easier to develop these applications. The entire .NET plan of Microsoft is based on XML that helps create a common format to send and transfer data over a network. Microsoft wants everyone from software developers to software users to use XML technology for transferring data over the web.

2.4 Program Interfaces

Web Services Till now, applications are a piece of software that access basic operating system services such as file system and graphics etc and database services. Web services are the next step in this direction. In web services, software functionality is exposed as a service that does not have any concern with the consumer of the service. In .NET, web services are implemented as a part of ASP.NET that handles all web interfaces. It allows programs to talk to each other directly over the web. Stock tickers, weather information, current financial rates, shipping status and a host of other types of information could be exposed as web services, ready for integration into any application that needs it.

2.5 Describe the .NET Framework?

The goal of the Microsoft .NET Framework is to make it easy to build Web applications and web services. It covers all the layers of software development from operating system up. It provides the richest level of integration among presentation technologies, component technologies and data technologies, particularly on a Microsoft platform. .NET wraps the operating system, insulating software developed with .NET from most operating system specifics such as file handling and memory allocation. Thus, software developed for .NET is portable to a wide variety of hardware and operating system foundations. Fig. 1.1 shows the Microsoft .NET Framework architecture. Built on top of operating system services is a 1. Common Language Runtime (CLR), theheart of the .NET Framework, the engine that drives the key functionality. It manages the needs of running code written in any modern programming language. It supplies many services that help simplify the code development and application deployment. It also does memory allocation and management and the garbage collection. 2. The framework also includes a set of class libraries that developers can use from any Programming language. 3. Above that are various programming models that provide components and services for Developing web sites and web services. It includes user and program interfaces. Windows Forms and Web Forms provide a powerful user interface for the web.

System Services includes COM+ services and Windows API:a)Common Language Runtime (CLR) A runtime is an environment in which programs are executed. Thus, CLR is the environment in which .NET applications are run that have been compiled to a common language, called as Microsoft Intermediate Language (MSIL). This is also referred as Intermediate Language (IL). The runtime loads and runs the code written in any programming language that is aware of the Common Language Runtime. It enables deep multi-language integration. Code written in one language can now inherit implementation from classes written in another language. Self-describing components are now possible on .NET Framework, which simplify the development and deployment. With self-describing components no other files are needed to use the components. Runtime also supplies integrated, pervasive security services to ensure that unauthorized users cannot access resources on machine and that code cannot perform unauthorized actions.

b) Services Framework

This layer includes a base set of class libraries that developers would expect in a standard language library, such as collections, input/output, string and numerical classes. It also provides classes to access operating system services such as graphics, networking, threading, globalization and cryptography. It also includes a data access class library as well as classes that can be used by the development tools such as debugging and profiling services. All languages based on the .NET Framework have these framework classes available. The Base Class Library (BCL) is the portion of the .NET framework that defines all the basic data types such as System.object,numeric ,String type, arrays and collections. The way types are implemented in BCL follows the common type system (CTS) specifications. For example, for extracting the square root, there is a method called system.math.sqrt in the framework classes. COBOL as well as Visual Basic can use the same function for calculating the square root. This makes such base functionality widely available and highly consistent across languages. All calls to sort look essentially the same (allowing for syntactical differences among languages) and access the same underlying code.

Data Access Services

Almost all the web services need to work with the data. The data can be in simple files, relational Databases or any other type of data stores. Services framework includes ActiveX Data Objects .NET (ADO.NET) class library to provide data access. ADO.NET has evolved from ADO and is designed to provide data access services for scalable web applications and services. Using ADO.NET, any data regardless of how is it stored can be manipulated as XML or relational data; whichever is most appropriate for the application at a given point of time. It provides APIs for connected cursor style data access as well as disconnected data model.

ADO.NET contains classes for connecting to, issuing commands against, and retrieving data from data stores. These classes are implemented by managed data providers. .NET framework has managed data providers for MS-SQL Server and any data store that can be accessed via OLE DB. ADO.NET has introduced Dataset. A Dataset is an in-memory data cache providing a relational view of the data. The Dataset knows the source of data. It can be created and populated programmatically or by loading data from a data store. No matter where the data comes from, it is manipulated using the same programming model and uses the same underlying cache. Managed data providers expose a Dataset Command object for interfacing between data stores and Datasets. This object uses other objects inside it to fill datasets from the data stores .A new class called XMLReaders exposes efficient stream access to XML data. Since all data can be viewed as XML, developers can take advantage of ADO.NET transformation and validation services for any data.

What is the difference between Web Forms and Win Forms? User and Program Interfaces
On top of the services framework, .NET provides three ways to render and manage user interfaces (Windows Forms, Web Forms and Console Applications), and one way to handle interfaces with remote components (Web Services).

User Interfaces
Win Forms Win Forms are also called as windows Forms. These are descended from Windows Foundation Classes (WFC) originally created for J++.Win Forms are actually the part of the framework classes in the System.Winforms namespace, which them available to all languages based on .NET framework. The drag and drop designer of Win Forms can be used to design forms visually with any .NET language. For writing, client applications for Windows, Win Forms can be used. By doing this, the developers have an advantage of using al the rich user interfaces features of Windows, including existing ActiveX controls, new features of Win 2000, such as transparent, layered and floating windows. The framework security model can safely execute applications and components on client machines provided they are written using Win Forms or used from a Win Forms application. Moreover, a win forms based application can easily be installed and updated with a simple XCOPY deployment and no registration issues like Visual Basic forms. Web Forms Web forms are a part of ASP.NET. They provide a web browser based user interface. These consist of two parts: A template containing HTML based layout information for all user interface elements and A component that contains all logic to be hooked to the user interface. They have a lot of built-in intelligence. Controls on Web Forms run on the server but make their presence

known on the client. These can look and behave like Win32 interfaces. They can deal with different browsers, optimizing their output for each particular browser. Like Win Forms, Web Forms are also available to all the languages of the .NET framework. Like we have controls in Visual Basic, similarly, the controls in Web Forms are called server-side controls. They create a proxy on the server for a user interface element that is on a Web Form or ASP. It communicates with local logic as necessary and renders its own user interface as HTML as necessary in any pages that are sent out containing the control. These controls need intelligence for rendering HTML for different types of browsers and coordinating events with the client on which the page is running. Also, these controls can manage their own state. Thus, when every time the page is refreshed, there is no need to write the code to reload state information into HTML controls.

2.6. Benefits of .NET

The major benefits of .NET can be summarized as follows: Faster development Lots of built-in functionality through rich object model Variety of ways to interface and integrate with the outside world More reuse Easy to integrate different languages into one system Easier deployment Scalability Easy to build sophisticated tools Interfaces well to existing software Fewer bugs due to use of CLR

3. Execution Process
The managed execution process includes the following steps:
1.Choosing a compiler. To

obtain the benefits provided by the common language runtime, you must use one or more language compilers that target the runtime, such as Visual Basic, C#, Visual C++, JScript, or one of many third-party compilers such as an Eiffel, Perl, or COBOL compiler. Because it is a Multilanguage execution environment, the runtime supports a wide variety of data types and language features. The language compiler you use determines which runtime features are available and you design your code using those features. Your compiler, not the runtime, establishes the syntax your code must use. If your component must be completely usable by components written in other languages, your component's exported types must expose only language features that are included in the Common Language Specification (CLS).

Common Language Specification:-

To fully interact with other objects regardless of the language they were implemented in, objects must expose to callers only those features that are common to all the languages they must interoperate with. The Common Language Specification (CLS), which is a set of basic language features needed by many applications, has been defined. The CLS helps enhance and ensure language interoperability by defining a set of features that developer can rely on to be available in a wide variety of languages. If your component uses only CLS features in the API that it exposes to other code (including derived classes), the component is guaranteed to be accessible from any programming language that supports the CLS. Components that adhere to the CLS rules and use only the features included in the CLS are said to be CLS-compliant components.
2. Compiling your code to Microsoft intermediate language (MSIL).

Compiling translates your source code into MSIL and generates the required metadata. A Managed Module consists of following components: Windows Portable Executable File Header: This is a standard Windows file header. In future, other operating systems will understand this file format as well.

.NET Framework File Header: This header contains the information that makes this a managed module. This is interpreted by the CLR. It includes version of the CLR required, certain flags, location and size of the metadata, resources, the Method Def metadata take of the managed modules entry point method (Main method) and some other stuff. Metadata: These are data tables that describe the types that the module defines and that module refers to. A type is a template used to describe the encapsulation of the data and an associated set of behaviors i.e. a type has properties, methods and fields. Fields are nothing but the member data within the type i.e. they define particular behaviors exhibited by the type. Metadata can be considered as a superset of the older technologies such as type libraries and IDL files with the difference that metadata is always associated with the file that contains the IL code. Intermediate Code: This is the code produced by the compiler as it compiled the source code. Sometimes, it is also referred as Managed Code. Every compiler targeting the CLR emits the full metadata into every managed module. The CLR then works with the Managed Modules. Thus, the compilers that target the CLR always produce managed modules that require CLR to execute. End users must have CLR on their machine to execute any managed modules. This is analogous to how end users must have MFC or VB DLLs installed. Note: SDK contains CLR compliant compilers for C++, C#, Visual Basic and Jscript, and the CLR itself. Combining Managed Modules to Assemblies Actually CLR does not work with modules. It works with Assemblies. An assembly is nothing but logical grouping of managed modules and resource files. These can be considered as the smallest unit of reuse and deployment for the .NET Framework.

3.Compiling MSIL to native code. At execution time, a just-in-time (JIT) compiler translates the MSIL into native code. During this compilation, code must pass a verification process that examines the MSIL and metadata to find out whether the code can be determined to be type safe. 4.Running code. The common language runtime provides the infrastructure that enables execution to take place as well as a variety of services that can be used during execution.

Common Type System:The common type system defines how types are declared, used, and managed in the runtime, and is also an important part of the runtime's support for cross-language integration. The common type system performs the following functions: Establishes a framework that helps enable cross-language integration, type safety, and high performance code execution. Provides an object-oriented model that supports the complete implementation of many programming languages. Defines rules that languages must follow, which helps ensure that objects written in different languages can interact with each other.

MetaData:Metadata is binary information describing your program that is stored either in a common language runtime portable executable (PE) file or in memory. When you compile your code into a PE file, metadata is inserted into one portion of the file, while your code is converted to Microsoft intermediate language (MSIL) and inserted into another portion of the file. Every type and member defined and referenced in a module or assembly is described within metadata. When code is executed, the runtime loads metadata into memory and references it to discover information about your code's classes, members, inheritance, and so on. Metadata describes every type and member defined in your code in a language-neutral manner. Metadata stores the following information: Description of the assembly. o Identity (name, version, culture, public key). o The types that are exported. o Other assemblies that this assembly depends on. o Security permissions needed to run. Description of types. o Name, visibility, base class, and interfaces implemented. o Members (methods, fields, properties, events, nested types). Attributes. o Additional descriptive elements that modify types and members. BENEFITS OF METADATA Metadata is the key to a simpler programming model, eliminating the need for Interface Definition Language (IDL) files, header files, or any external method of component reference. Metadata allows .NET languages to describe themselves automatically in a language-neutral manner, unseen by both the developer and the user. Additionally, metadata is extensible through the use of attributes. Metadata provides the following major benefits: Self-describing files. Common language runtime modules and assemblies are self-describing. A module's metadata contains everything needed to interact with another module. Metadata automatically provides the functionality of IDL in COM, allowing you to use one file for both definition and implementation. Runtime modules and assemblies do not even require registration with the operating system. As a result, the descriptions used by the runtime always reflect the actual code in your compiled file, which increases application reliability. Language interoperability and easier component-based design. Metadata provides all the information required about compiled code for you to inherit a class from a PE file written in a different language. You can create an instance of any class written in any managed language (any language that targets the common language runtime) without worrying about explicit marshaling or using custom interoperability code. Attributes. The .NET Framework allows you to declare specific kinds of metadata, called attributes, in your compiled file. Attributes can be found throughout the .NET Framework and are used to control in more detail how your program behaves at run time. Additionally, you can emit your own custom metadata into .NET Framework files through user-defined custom attributes.

Microsoft intermediate language (MSIL):When compiling to managed code, the compiler translates your source code into Microsoft intermediate language (MSIL), which is a CPU-independent set of instructions that can be efficiently converted to native code. MSIL includes instructions for loading, storing, initializing, and calling methods on objects, as well as instructions for arithmetic and logical operations, control flow, direct memory access, exception handling, and other operations. Before code can be run, MSIL must be converted to CPU-specific code, usually by a just-in-time (JIT) compiler. Because the common language runtime supplies one or more JIT compilers for each computer architecture it supports, the same set of MSIL can be JIT-compiled and run on any supported architecture. When a compiler produces MSIL, it also produces metadata. Metadata describes the types in your code, including the definition of each type, the signatures of each type's members, the members that your code references, and other data that the runtime uses at execution time. The MSIL and metadata are contained in a portable executable (PE) file that is based on and extends the published Microsoft PE and common object file format (COFF) used historically for executable content. This file format, which accommodates MSIL or native code as well as metadata, enables the operating system to recognize common language runtime images. The presence of metadata in the file along with the MSIL enables your code to describe itself, which means that there is no need for type libraries or Interface Definition Language (IDL). The runtime locates and extracts the metadata from the file as needed during execution.

Assemblies:Assemblies are a fundamental part of programming with the .NET Framework. An assembly performs the following functions:

It contains code that the common language runtime executes. Microsoft intermediate language (MSIL) code in a portable executable (PE) file will not be executed if it does not have an associated assembly manifest. Each assembly can have only one entry point (that is, DllMain, WinMain, or Main). It forms a security boundary. An assembly is the unit at which permissions are requested and granted.. It forms a type boundary. Every type's identity includes the name of the assembly in which it resides. A type called My Type loaded in the scope of one assembly is not the same as a type called My Type loaded in the scope of another assembly. It forms a reference scope boundary. The assembly's manifest contains assembly metadata that is used for resolving types and satisfying resource requests. It specifies the types and resources that are exposed outside the assembly. The manifest also enumerates other assemblies on which it depends. It forms a version boundary. The assembly is the smallest versionable unit in the common language runtime; all types and resources in the same assembly are versioned as a unit. The assembly's manifest describes the version dependencies you specify for any dependent assemblies. It forms a deployment unit. When an application starts, only the assemblies that the application initially calls must be present. Other assemblies, such as localization

resources or assemblies containing utility classes, can be retrieved on demand. This allows applications to be kept simple and thin when first downloaded It is the unit at which side-by-side execution is supported

Assemblies can be
1) Static: - Static assemblies can include .NET Framework types (interfaces and classes), as well as resources for the assembly (bitmaps, JPEG files, resource files, and so on). Static assemblies are stored on disk in portable executable (PE) files. Or 2) Dynamic. You can also use the .NET Framework to create dynamic assemblies, which are run directly from memory and are not saved to disk before execution. You can save dynamic assemblies to disk after they have executed. There are several ways to create assemblies. You can use development tools, such as Visual Studio 2005, 2008 that you have used in the past to create .dll or .exe files. You can use tools provided in the .NET Framework SDK to create assemblies with modules created in other development environments. You can also use common language runtime APIs, such as Reflection. Emit, to create dynamic assemblies. Benefits Of Assemblies:Assemblies are designed to simplify application deployment and to solve versioning problems that can occur with component-based applications. End users and developers are familiar with versioning and deployment issues that arise from today's component-based systems. Some end users have experienced the frustration of installing a new application on their computer, only to find that an existing application has suddenly stopped working. Many developers have spent countless hours trying to keep all necessary registry entries consistent in order to activate a COM class. Many deployment problems have been solved by the use of assemblies in the .NET Framework. Because they are self-describing components that have no dependencies on registry entries, assemblies enable zero-impact application installation. They also simplify uninstalling and replicating applications. Assembly Contents:In general, a static assembly can consist of four elements: The assembly manifest, which contains assembly metadata. Select * from Ref_Roles Where RoleID in (Select Distinct RoleID from Mas_DesignationRoles where DesignationID =" + designationId + " ) order by ParentRoleID,RoleOrder" Type metadata. Microsoft intermediate language (MSIL) code that implements the types. A set of resources.

Assembly manifest:Every assembly, whether static or dynamic, contains a collection of data that describes how the elements in the assembly relate to each other. The assembly manifest contains this assembly metadata. An assembly manifest contains all the metadata needed to specify the assembly's

version requirements and security identity, and all metadata needed to define the scope of the assembly and resolve references to resources and classes. The assembly manifest can be stored in either a PE file (an .exe or .dll) with Microsoft intermediate language (MSIL) code or in a standalone PE file that contains only assembly manifest information.

Global Assembly Cache (GAC):Each computer where the common language runtime is installed has a machine-wide code cache called the global assembly cache. The global assembly cache stores assemblies specifically designated to be shared by several applications on the computer. Use a developer tool called the Global Assembly Cache tool (Gacutil.exe), provided by the .NET Framework SDK.strong name consists of the assembly's identityits simple text name, version number, and culture information (if provided)plus a public key and a digital signature. It is generated from an assembly file (the file that contains the assembly manifest, which in turn contains the names and hashes of all the files that make up the assembly), using the corresponding private key. Microsoft Visual Studio .NET and other development tools provided in the .NET Framework SDK can assign strong names to an assembly. Assemblies with the same strong name are expected to be identical. Strong Name Assemblies You can ensure that a name is globally unique by signing an assembly with a strong name. Strong names satisfy the following requirements: Strong names guarantee name uniqueness by relying on unique key pairs. No one can generate the same assembly name that you can, because an assembly generated with one private key has a different name than an assembly generated with another private key. Strong names protect the version lineage of an assembly. A strong name can ensure that no one can produce a subsequent version of your assembly. Users can be sure that a version of the assembly they are loading comes from the same publisher that created the version the application was built with. Strong names provide a strong integrity check. Passing the .NET Framework security checks guarantees that the contents of the assembly have not been changed since it was built. Note, however, that strong names in and of themselves do not imply a level of trust like that provided, for example, by a digital signature and supporting certificate.

C# Type .NET Type Framework Range Description It is used to declare variables to store the Boolean values, true and false. 0-255 -128 to 127 8 bit unsigned integer 8 bit signed integer 16 bit Unicode Character +/-1.4*10-45 to 128 bit digits +/-3.4*1038 (28 significant) +/-5.0*10-324 to +/-1.7*10308 64 bit significant digits(Precision -7 significant digits)

bool byte sbyte char decimal

System.Boolean System.Byte System.SByte System.Char System.Decimal





+/-1.4*10-45 to 32 bit floating point variable(7 +/-3.4*1038 Significant digits)

int uint long ulong object short ushort string

System.Int32 System.UInt32 System.Int64 System.UInt64 System.Object System.Int16 System.UInt16 System.String

-231 to 231 -1 0 to 65535 -263 to 2 63-1 0 to 264-1

32 bit signed integer 32 bit unsigned integer

64 unsigned integer

-32768 to 32767 0-65535 16 bit unsigned integer

5.ActiVe X Data Object(ADO.NET)

ADO.NET is the data access model that comes with the .NET Framework. ADO.NET provides the classes required to communicate with any database source (including Oracle, Sybase, Microsoft Access, Xml, and even text files). CHOOSING A .NET FRAMEWORK DATA PROVIDER Depending on the design and data source for your application, your choice of .NET Framework data provider can improve the performance, capability, and integrity of your application. A DATA PROVIDER is a set of classes that can be used to access, retrieve and manipulate data from the databases. The advantages and limitations of each .NET Framework data provider. Provider Notes Recommended for middle-tier applications using Microsoft SQL Server 7.0 or later. .NET Framework Recommended for single-tier applications using Microsoft Database Data Provider for Engine (MSDE) or SQL Server 7.0 or later. Recommended over use of the OLE DB Provider for SQL Server (SQLOLEDB) with the .NET SQL Server Framework Data Provider for OLE DB.For SQL Server 6.5 and earlier, you must use the OLE DB Provider for SQL Server with the .NET Framework Data Provider for OLE DB. Recommended for middle-tier applications using SQL Server 6.5 or .NET Framework earlier. For SQL Server 7.0 or later, the .NET Framework Data Provider Data Provider for for SQL Server is recommended. Also recommended for single-tier applications using Microsoft Access databases. Use of an Access database OLE DB for a middle-tier application is not recommended. .NET Framework Recommended for middle and single-tier applications using ODBC data Data Provider for sources. ODBC .NET Framework Recommended for middle and single-tier applications using Oracle data Data Provider for sources. Or.

Integrated Security and ASP.NET SQL Server integrated security (also known as trusted connections) helps to provide protection when connecting to SQL Server as it does not expose a user ID and password in the connection string and is the recommended method for authenticating a connection. Integrated security uses

the current security identity, or token, of the executing process. For desktop applications, this is typically the identity of the currently logged-on user. ADO.NET is a set of classes that expose data access services to the .NET programmer. Access to relational, XML, and application data ADO.NET provides a rich set of components for creating distributed, data-sharing applications. It is an integral part of the .NET Framework, providing. ADO.NET supports a variety of development needs, including the creation of front-end database clients and middle-tier business objects used by applications, tools, languages, or Internet browsers. As you develop applications that access data in Visual Studio, you will have different requirements. In some cases, you might simply want to display data on a form. In other cases, you might need to devise a way to share information with other applications or processes. The underlying data architecture used to create applications in Visual Studio is ADO.NET. No matter what you do with data, there are certain fundamental concepts that you should understand. You might never need to know some of the details of data handling for example, you might never need to programmatically create a database, but it is very useful to understand the basic concepts of ADO.NET, as well as the data tools (wizards and designers) available in Visual Studio. The overall task of working with data in an application can be broken down into several top-level processes. For example, before you display data to a user on a form, you must first connect to a data source (possibly a database), and then fetch the data you want to display. Once you bring this data into your application, you may need somewhere to temporarily store it, such as a Dataset object. A typical data application will utilize most of the processes illustrated in the following diagram:

Connecting to Data To bring data into your application (and send changes back to the data source), some kind of two-way communication needs to be established. This two-way communication is typically handled by a connection object (for example, a SqlConnection) that is configured with a connection string, the information it needs to connect to the data source. Visual Studio provides several tools to assist in creating connections that can be used by your Application.

Preparing Your Application to Receive Data If your application uses a disconnected data model you need to temporarily store the data in your application while you work with it; a dataset (an in-memory cache of data) simplifies the process of working with data until you reconnect with your data source. Prior to querying your data, you create a dataset to receive the results of a query. The dataset is created with the same shape (schema) of the returned data. Note: An application that uses a disconnected data model will typically connect to a database, run a query bringing data into the application, disconnect from the database, and then manipulate the data "offline" before reconnecting and updating the database Fetching Data into Your Application Whether your application uses a disconnected data model or not, you need to be able to fetch data into your application. You bring data into your application by executing queries or stored procedures against a database. You execute queries and stored procedures using Table Adapters and command objects.

Manipulating Data using Dataset and Data Table Dataset and Data Table are the key components in ADO.NET programming. In simple words, Dataset represents an in memory representation of the database. We can load an entire database

into a Dataset and manipulate the data in memory, you can Add, Edit and Update data in the dataset and then just call a single method 'Accept Changes ()' which will save all the changes back to the database. A Dataset contains one or more Data Tables A Data Table contains Data Rows. What is Dataset? Datasets store data in a disconnected cache. The structure of a dataset is similar to that of a relational database; it exposes a hierarchical object model of tables, rows, and columns. In addition, it contains constraints and relationships defined for the dataset. You can create and manipulate datasets using the following portions of the .NET Framework namespaces.

Dataset Namespace

The Connection String The connection string is actually a series of distinct pieces of information separated by Semicolons (;). In the preceding example, the connection string identifies the following pieces of information:Data source: This indicates the name of the server where the data source is located. If the server is on the same computer that hosts the ASP.NET site, local host is sufficient. The only exception is if youre using a named instance of SQL Server. For example, if youve installed SQL Server 2005 Express Edition, youll need to use the data source local host\SQLEXPRESS, because the instance name is SQLEXPRESS. Initial catalog: This is the name of the database that this connection will be accessing. Its only the initial database because you can change it later by using the Connection.ChangeDatabase () method. Integrated security: This indicates you want to connect to SQL Server using the Windows user account thats running the web page code. Alternatively, you can supply a user ID and password thats defined in the database for SQL Server authentication. Connection Timeout: This determines how long your code will wait, in seconds, before generating an error if it cannot establish a database connection. Our example connection string doesnt set the Connection Timeout, so the default of 15 seconds is used. You can use 0 to

specify no limit, but this is a bad idea. This means that, theoretically, the code could be held up indefinitely while it attempts to contact the server. ADO.NET Command Objects:Using an adapter, you can read, add, update, and delete records in a data source. ExecuteNonQuery:-Execute Commands That Returns No Records such as INSERT, UPDATE or DELETE.

6. Introduction To ASP.NET
ASP.NET is a unified Web development model that includes the services necessary for you to build enterprise-class Web applications with a minimum of coding. ASP.NET is part of the .NET Framework, and when coding ASP.NET applications you have access to classes in the .NET Framework. You can code your applications in any language compatible with the common language runtime (CLR), including Microsoft Visual Basic, C#, JScript .NET, and J#. These languages enable you to develop ASP.NET applications that benefit from the common language runtime, type safety, inheritance, and so on. The ASP.NET is the infrastructure built inside the .NET Framework for running web applications. The Asp.Net Infrastructure consists of Two main parts: A set of Classes and interfaces that enables communication between browser and Web Server. These classes are organized in the System. Web namespace of the FCL. A runtime host that handles the web request for ASP.NET resources .The ASP.NET host loads the CLR into a process creates the application domains within the process and then loads and executes the requested code within the application domains. An ASP.NET application is executed with a series of HTTP(Hyper Text Transfer Protocol ) request and response messages between the client browsers and Web server. 1. User Requests a resource from a Web Server by typing a URL in the browser. Browser sends the HTTP request to the destination Web server. 2. Web Server analyses the HTTP request and searches for a process capable of executing this request. 3. The results of the HTTP request are returned to the client browser in the form of an HTTP response. 4. Browser reads the HTTP response and displays it as a Web page to the user.

6.1. Process of Execution:1. When IIS (inetinfo.exe) receives an HTTP request it uses the filename extension of the requested resource to determine which Internet Server Application Programming Interface (ISAPI) program to run to process a request. When the request is for an ASP.NET page (an .aspx) it passes the request to the ISAPI DLL capable of handling request for ASP.NET pages which is aspnet_isapi.dll. 2. The aspnet_isapi.dll process the request to the ASP.NET worker process (aspnet_wp.exe) which fulfills the request. 3. The ASP.NET worker process compiles the .aspx file into an assembly, creates an application domain and instructs the CLR to execute the resulting assembly in the newly created application domain. 4. When the assembly containing the code for an ASP.NET page executes it takes the service of various classes in the FCL to accomplish its work and generate response messages for the requesting client.

5. The ASP.NET worker process collects the response generated by the execution of the web Page creates a response packet and passes it to the aspnet_isapi.dll process. 6. Aspnet_isapi.dll forwards the response packet to IIS which in turn passes the response to the requesting client machine.

6.2. ASP.NET includes:

1. A page and controls framework: The ASP.NET page and controls framework is a programming framework that runs on a Web server to dynamically produce and render ASP.NET Web pages. ASP.NET Web pages can be requested from any browser or client device, and ASP.NET renders markup (such as HTML) to the requesting browser. As a rule, you can use the same page for multiple browsers, because ASP.NET renders the appropriate markup for the browser making the request. 2. The ASP.NET compiler: All ASP.NET code is compiled, which enables strong typing, performance optimizations, and early binding, among other benefits. Once the code has been compiled, the common language runtime further compiles ASP.NET code to native code, providing improved performance. 3. Security infrastructure: In addition to the security features of .NET, ASP.NET provides an advanced security infrastructure for authenticating and authorizing user access as well as performing other security related tasks. You can authenticate users using Windows authentication supplied by IIS, or you can manage authentication using your own user database using ASP.NET forms authentication and ASP.NET membership State-management facilities: ASP.NET provides intrinsic state management functionality that enables you to store information between page requests, such as customer information or the contents of a shopping cart. You can save and manage application-specific, session-specific, page-specific, user-specific, and developer-defined information. This information can be independent of any controls on the page.

Application configuration: ASP.NET applications use a configuration system that enables you to define configuration settings for your Web server, for a Web site, or for individual applications Health monitoring and performance features: ASP.NET includes features that enable you to monitor health and performance of your ASP.NET application. ASP.NET health monitoring enables reporting of key events that provide information about the health of an application and about error conditions Debugging support: ASP.NET takes advantage of the run-time debugging infrastructure to provide cross-language and cross-computer debugging support. An XML Web services framework: ASP.NET supports XML Web services. An XML Web service is a component containing business functionality that enables applications to exchange information across firewalls using standards like HTTP and XML messaging. Extensible hosting environment and application life cycle management: ASP.NET includes an extensible hosting environment that controls the life cycle of an application from when a user first accesses a resource (such as a page) in the application to the point at which the application is shut down. An extensible designer environment: ASP.NET includes enhanced support for creating designers for Web server controls for use with a visual design tool such as Visual Studio. ASP.NET Web pages are the programmable user interface for your Web application. An ASP.NET Web page presents information to the user in any browser or client device and implements application logic using server-side code. ASP.NET Web pages are based on Microsoft ASP.NET technology, in which code that runs on the server dynamically generates Web page output to the browser or client device. Compatible with any browser or mobile device. An ASP.NET Web page automatically renders the correct browser-compliant HTML for features such as styles, layout, and so on. Alternatively, you can design your ASP.NET Web pages to run on a specific browser such as Microsoft Internet Explorer 6 and take advantage of browser-specific features. Compatible with any language supported by the .NET common language runtime, including Microsoft Visual Basic, Microsoft Visual C#, Microsoft J#, and Microsoft JScript .NET. Built on the Microsoft .NET Framework. This provides all the benefits of the framework, including a managed environment, type safety, and inheritance. Flexible because you can add user-created and third party controls to them. 6.3. Components of ASP.NET Web Pages In ASP.NET Web pages, user interface programming is divided into two pieces: the visual component and the logic.

If you have worked with tools like Visual Basic and Visual C++ in the past, you will recognize this division between the visible portion of a page and the code behind the page that interacts with it. The visual element consists of a file containing static markup such as HTML or ASP.NET server controls or both. The ASP.NET Web page works as a container for the static text and controls you want to display. The logic for the ASP.NET Web page consists of code that you create to interact with the page. The code can reside either in a script block in the page or in a separate class. If the code is in a separate class file, this file is referred to as the code-behind file. The code in the code-behind file can be written in Visual Basic, Visual C#, Visual J#, or JScript . ASP.NET Web pages are compiled into a dynamic-link library (.dll) file. The first time a user browses to the .aspx page, ASP.NET automatically generates a .NET class file that represents the page and then compiles it. The .dll file runs on the server and dynamically produces the HTML output for your page What ASP.NET Web Pages Help You Accomplish: Web application programming presents challenges that do not typically arise when programming traditional client-based applications. Among the challenges are:

Implementing a rich Web user interface It can be difficult and tedious to design and implement a user interface using basic HTML facilities, especially if the page has a complex layout, a large amount of dynamic content, and full-featured user-interactive objects. Separation of client and server In a Web application, the client (browser) and server are different programs often running on different computers (and even on different operating systems). Consequently, the two halves of the application share very little information; they can communicate, but typically exchange only small chunks of simple information. Stateless execution When a Web server receives a request for a page, it finds the page, processes it, sends it to the browser, and then discards all page information. If the user requests the same page again, the server repeats the entire sequence, reprocessing the page from scratch. Put another way, a server has no memory of pages that it has processedpage are stateless. Therefore, if an application needs to maintain information about a page, its stateless nature can become a problem. Unknown client capabilities In many cases, Web applications are accessible to many users using different browsers. Browsers have different capabilities, making it difficult to create an application that will run equally well on all of them. Complications with data access Reading from and writing to a data source in traditional Web applications can be complicated and resource-intensive. Complications with scalability In many cases Web applications designed with existing methods fail to meet scalability goals due to the lack of compatibility between the various components of the application. This is often a common failure point for applications under a heavy growth cycle.

Meeting these challenges for Web applications can require substantial time and effort. ASP.NET Web pages and the ASP.NET page framework address these challenges in the following ways: Intuitive, consistent object model The ASP.NET page framework presents an object model that enables you to think of your forms as a unit, not as separate client and server pieces. In this model, you can program the page in a more intuitive way than in traditional Web applications, including the ability to set properties for page elements and respond to events. In addition, ASP.NET server controls are an abstraction from the physical contents of an HTML page and from the direct interaction between browser and server. Event-driven programming model ASP.NET Web pages bring to Web applications the familiar model of writing event handlers for events that occur on either the client or server. The ASP.NET page framework abstracts this model in such a way that the underlying mechanism of capturing an event on the client, transmitting it to the server, and calling the appropriate method is all automatic and invisible to you. The result is a clear, easily written code structure that supports event-driven development. Intuitive state management The ASP.NET page framework automatically handles the task of maintaining the state of your page and its controls, and it provides you with explicit ways to maintain the state of application-specific information. This is accomplished without heavy use of server resources and can be implemented with or without sending cookies to the browser. Browser-independent applications The ASP.NET page framework enables you to create all application logic on the server, eliminating the need to explicitly code for differences in browsers. However, it still enables you to take advantage of browser-specific features by writing client-side code to provide improved performance and a richer client experience. .NET Framework common language runtime support The ASP.NET page framework is built on the .NET Framework, so the entire framework is available to any ASP.NET application. Your applications can be written in any language that is compatible that is with the runtime. In addition, data access is simplified using the data access infrastructure provided by the .NET Framework, including ADO.NET. .NET Framework scalable server performance The ASP.NET page framework enables you to scale your Web application from one computer with a single processor to a multi-computer Web form cleanly and without complicated changes to the application.

7. Three Tier Architecture

When automation first hit business, it was in the form of a huge "Mainframe" computer. Here, a central computer served the whole business community and was accessed via dumb terminals. All processing took place on a single computer - and therefore in one place. All resources associated with the computer (tape and disk drives, printers etc.) were attached to this same computer. This is single tier (or 1-tier) computing. It is simple, efficient, uncomplicated, but terribly expensive to run.

Figure 1 - Single Tier Architecture Figure 1 shows a physical layout of a single tier environment. All users run their programs from a single machine. The ease with which deployment and even development occurs makes this model very attractive. The cost of the central machine makes this architecture prohibitive for most companies, especially as system costs and return on investment (ROI) are looked at carefully nowadays.


In the 1980s, a revolution happened in the world of business computing: the Personal Computer (nearly unimaginable until then) hit the streets. The PC quickly became the standard equipment on desks around the world. In order to provide personal software, which ran on personal computers, a model needed to be, found where the enterprise could still share data. This became known as the client/server model. The client (on the personal computer) would connect to a central computer (server) and request data. With limited network bandwidth, this would offload the need for expensive infrastructure since only data would be transmitted, not the huge graphics necessary to make a windows application display. In Figure 2, we see the very model implemented in most organizations today. This model is also quite easy to implement. All you need is an RDBMS, such as MS-SQL Server 2000, running on Windows 2000 Server and a PC running TCP/IP. You application connects to the database server and requests data. The server just returns the data requested.

Figure 2 - Client Server Physical Model There are, however, several problems with this model: The connections are expensive - they take a long time to establish and require a lot of RAM on the server. Because the fact of connecting is slow, most applications connect when launching the client application and disconnect when the application is shut down. Of course, if the application crashes, then the connection is left open on the server and resources are lost. One can only connect a limited number of users to a server before SQL server spends more time managing connections than processing requests. Even if you are willing to increase server resources exponentially, as your user base grows there still comes a time when your server will choke. This can be solved in part by splitting the database in two or three and replicating the data. This is definitely NOT recommended as replication conflicts can occur. The more users you connect, the more errors you're likely to get. This method is so cost-ineffective. Many users only use their connection 2-3% of the time. The rest of the time it is just sitting there hogging memory resources. This particular problem is usually resolved artificially, by using a TP monitor such as Tuxedo which pools and manages the connections in order to provide client/server for the masses. TP monitors are quite expensive and sometimes require their own hardware platform to run efficiently. Figure 3 puts the above into context and shows the logical system components - most of which are on the client.

Figure 3 - Logical View of a 2-Tier Architecture

There's a large movement afoot in the database industry to replace classic client/server (or twotier) databases with more complex n-tier databases. The client is commonly a custom application implemented in a language like Delphi or Visual Basic while the server is a database engine like SQL Server or Oracle. Commonly, database developers will embed the business logic in the client and/or the server. The fat client/thin server approach advocates embedding as much processing as possible on the client removing the data processing burden from the server and allowing it to serve more clients. Alternatively, the thin client/fat server approach entails developing an extremely light client that consumes few client resources and requires a large amount of server CPU cycles. This approach would be very appropriate when developing applications for wireless applications and other lowpower computing devices. 5.3. 3-Tier Model n-tier databases are most commonly implemented as a three-tier model .These databases extract the business rules and place them in an independent middle layer. The server and client never communicate directly with one another, passing all data through the middle layer, which performs the business rule validation. There are several benefits to this model. First, the middle tier provides a layer of abstraction. Client applications are written to communicate with the middle tier and do not depend upon the type of server that actually stores the data. The back-end server could be changed (say from Oracle to SQL Server) and only the middle layer would require modification. Second, three-tier databases provide a good method to separate responsibilities when database developers are not provided administrative access to the database engine itself for political reasons. Finally, three-tier implementations can be designed to have more efficient network footprints by aggregating operations to reduce bandwidth consumption. Many people consider database-enabled Internet applications to be three-tiered systems consisting of the browser, web server and database server. While this may be an accurate description from a networking perspective, it's often not true from the database point-ofview. In this case, the web server does not normally implement any of the business rules and, therefore, should not be considered a database tier. It would be more accurate to describe the web server as a component of the database client tier in partnership with the web browser.

Fig. A typical 3.Tier Architecture

Mainframes ruled the it-landscape until mid 1980s .The main characteristic of a Host Architecture is that the application and databases reside on the same host computer and the user interacts with the host using an unfriendly and dump terminal. This monolith architecture does not support distributed computing (the host applications are not able to connect a database of a strategically allied partner). Some mangers found that developing a host application take too long and expensive. Consequently led these disadvantages to Client-Server(C/S) architecture. In fact, Client Server(C/S) architecture is a 2-Tier architecture because the client does not distinguish between Presentation Tier and Logical Tier. That is why we call this type of client as Fat Client. The increasing demands on GUI controls caused difficulty to manage the mixture of source code from GUI and Business Logic Further, C\S Architecture does not support enough the Change Management. Let us suppose that the government increases the consume tax rate from 14% to 16 %, then in the C\S case, you have to send an update to each clients and they must update synchronously on a specific time otherwise you may store corrupt information. The C/S Architecture is also a burden to network traffic and resources. Let us assume that about five hundred clients are working on a data server then we will have five hundred ODBC connections and several ruffian record sets, which must be transported from the server to the clients (because the Business Logic Tier is situated in the client side). The fact that C/S does not have any caching facilities like in ASP.NET caused additional traffic in the network. In the late 1990s, designers have shifted the Business Logic from the client to server to elude the handicaps from C/S Architecture. Normally, a server has a better hardware than client therefore it is able compute algorithms faster than a client, so this fact is also an additional pro argument for the 3.Tier Architecture. Data Tier This Tier is responsible for retrieving; storing and updating from Information therefore this tier can be ideally represented through a commercial database. Usage of stored procedures increases the performance and code transparency of an application

Figure 5 - Logical 3-Tier View Did you also notice that the software model has not significantly changed over the 2-tier model? We have merely moved the 2-tier client processing onto the web server. Also the thin client user interfaces, by their very nature, are not as rich as their Windows counterparts. Therefore, applications developed using this model tends to be inferior to their Windows counterparts.

8. XML
Extensible Markup Language (XML) a subset of Standard Generalized Markup Language (SGML) that is optimized for delivery over the Web. XML provides a uniform method for describing and exchanging structured data that is independent of applications or vendors. The XML Classes .NET provides a rich set of classes for XML manipulation in several namespaces that start with System.Xml. One of the most confusing aspects of using XML with .NET is deciding which combination of classes you should use. Many of them provide similar functionality in a slightly different way, optimized for specific scenarios or for compatibility with specific standards. The System.Xml namespace is the core namespace. The classes here allow you to read and write XML files, manipulate XML data in memory, and even validate XML documents. Reading and writing XML directly, just like you read and write text files using XmlTextWriter and XmlTextReader. Dealing with XML as a collection of in-memory objects, such as XmlDocument and XmlNode. Binding to the XmlDataSource to display XML information with minimum fuss. Dealing with XML as an interface to relational data using the XmlDataDocument Class. XML Schema (XSD) The World Wide Web Consortium (W3C) standard language used for creating XML Schema documents. The XML Schema contains two parts: a set of predefined types (for example, string, date Time, decimal), and an XML language for defining new types (for example, complexType, minOccurs, element). XML Schema Document A specification that describes the complex types used in a Web method and thereby enables interoperability between clients and Web services built on different platforms by adhering to a common type system, as defined by the W3C.

Ajax, or AJAX (Asynchronous JavaScript and XML), is a group of interrelated web development techniques used to create interactive web applications or rich Internet applications. With Ajax, web applications can retrieve data from the server asynchronously in the background without interfering with the display and behavior of the existing page. The use of Ajax has led to an increase in interactive animation on web pages. Data is retrieved using the XMLHttpRequest object or through the use of Remote Scripting in browsers that do not support it. Despite the name, the use of JavaScript and XML is not actually required, nor do the requests need to be asynchronous. XMLHttpRequest (XHR) is a DOM API that can be used by JavaScript and other web browser scripting languages to transfer XML and other text data between a web server and a browser The Term Ajax has come to represent a broad group of web technologies that can be used to implement a web application that communicates with a server in the background, without interfering with the current state of the page. XHTML and CSS for presentation the Document Object Model for dynamic display of and interaction with data XML and XSLT for the interchange, manipulation and display of data, respectively the XMLHttpRequest object for asynchronous communication JavaScript to bring these technologies together Since then, however, there have been a number of developments in the technologies used in an Ajax application, and the definition of the term Ajax. In particular, it has been noted that: JavaScript is not the only client-side scripting language that can be used for implementing an Ajax application. Other languages such as VBScript and EGL Programming Language are also capable of the required functionality. XML is not required for data interchange and therefore XSLT is not required for the manipulation of data. JavaScript Object Notation (JSON) is often used as an alternative format for data interchange, although other formats such as preformatted HTML or plain text can also be used

In many cases, related pages on a website consist of much content that is common between them. Using traditional methods, that content would have to be reloaded on every request. However, using Ajax, a web application can request only the content that needs to be updated, thus drastically reducing bandwidth usage and load time. The use of asynchronous requests allows the client's Web browser UI to be more interactive and to respond quickly to inputs, and sections of pages can also be reloaded individually. Users may perceive the application to be faster or more responsive, even if the application has not changed on the server side. The use of Ajax can reduce connections to the server, since scripts and style sheets only have to be requested once.

Pages dynamically created using successive Ajax requests do not automatically register themselves with the browser's history engine, so clicking the browser's "back" button may not return the user to an earlier state of the Ajax-enabled page, but may instead return them to the last full page visited before it. Workarounds include the use of invisible IFrames to trigger changes in the browser's history and changing the anchor portion of the URL (following a #) when AJAX is run and monitoring it for changes. Because most web crawlers do not execute JavaScript code, web applications should provide an alternative means of accessing the content that would normally be retrieved with Ajax, to allow search engines to index it. A Web crawler (also known as a Web spider, Web robot, orespecially in the FOAF communityWeb scutter) is a program or automated script that browses the World Wide Web in a methodical, automated manner. Other less frequently used names for Web crawlers are ants, automatic indexers, bots, and worms. This process is called Web crawling or spidering. Many sites, in particular search engines, use spidering as a means of providing up-to-date data. Web crawlers are mainly used to create a copy of all the visited pages for later processing by a search engine that will index the downloaded pages to provide fast searches. Crawlers can also be used for automating maintenance tasks on a Web site, such as checking links or validating HTML code. Also, crawlers can be used to gather specific types of information from Web pages, such as harvesting e-mail addresses (usually for spam). AJAX brings about a much-desired shift in this paradigm that allows for Cleaner Web applications and it lays the groundwork for a new generation of applications. AJAX is really about the end user. With AJAX features, a Web application is much more interactive, more responsive. It's faster and friendlier. The user is encouraged to do more with the page as interaction and responses (and feedback in case of slow operations) are all handled more elegantly With AJAX, more code is executed on the browser and this requires more script being given to the client pages.

The AJAX Architecture:-

Fig.7.1 An AJAX application uses a client-side framework that takes care of issuing calls to the Web server. An AJAX server-side framework then takes care of the request and returns a data feed to the client. This will often be a JavaScript Object Notation (JSON) data stream, but other formatssuch as XML, RSS, and CSVcan be used. The client receives data feeds and updates the UI using JavaScript. The server responds to requests by returning raw data, encoded in a given format. Bandwidth consumption is minimized, the speed of the app increases since requests take less time to complete, and UI updates are able to take effect with no visible postback. What's an AJAX Framework? To keep AJAX alive in a Web page, a few conditions must be met. 1. JavaScript support from the browser. 2. A full-time Internet connection is also requiredan AJAX application can't work offline. 3. When all the requests are made at the page level, as they are with non-AJAX applications, the browser can offer to navigate through a cached set of these pages, and thus can proceed offline. There are two main types of script code in an AJAX page: System-level code:- from the framework of choice - provides the engine used to send asynchronous requests to the Web server and process any responses User-level code that implements the page's expected behavior. The user-level code updates the UI of the page, essentially using Document Object Model (DOM) scripting.

.NET has its implications on all sorts of software professionals: Developers, Infrastructure Engineers and End Users. The biggest impact of .NET is on developers. The development has been simplified, new architectural options have been provided and they have also got a wide range of programming models. Today developers can start with ASP and when they become cumbersome they switch over to component based three-tier development in Visual Basic, which is a big leap. To become proficient in C++, ATL and related technologies for system level work, it is another leap. Using .NET has an advantage over this.

1. 2. 3. 4. 5. Windows programming ASP. NET Unleashed Visual Basic .NET Black Book Professional ASP. NET Web services SQL Server Essential Reference Charles Petzoid Stephen Walther Steven Holzer Alex Homer, Dave Sussman Sharon Dooley