The Web Dot Net Help Group

Thursday, June 26, 2008

NET Framework Conceptual Overview

.NET Framework Conceptual Overview
The .NET Framework is an integral Windows component that supports building and running the next generation of applications and XML Web services.
The .NET Framework is designed to fulfill the following objectives:
->To provide a consistent object-oriented programming environment whether object code is stored and executed locally, 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 promotes 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 problems of scripted or interpreted environments.
->To make the developer experience consistent across widely varying types of applications, 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:
-> Common Language Runtime CLR and
-> .NET Framework class library.
The CLR (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, providing core services such as memory management, thread management, and remoting, while also enforcing strict type safety and other forms of code accuracy that promote 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 unmanaged code.
The class library, the other main component of the .NET Framework, is a comprehensive, object-oriented collection of reusable types that you can use to develop applications ranging from traditional command-line or graphical user interface (GUI) applications to applications based on the latest innovations provided by ASP.NET, such as Web Forms and XML Web services.

The .NET Framework can be hosted by unmanaged components that load the common language runtime into their processes and initiate the execution of managed code, thereby creating a software environment that can exploit both managed and unmanaged features. The .NET Framework not only provides several runtime hosts, but also supports the development of third-party runtime hosts.
For example, ASP.NET hosts the runtime to provide a scalable, server-side environment for managed code. ASP.NET works directly with the runtime to enable ASP.NET applications and XML Web services, both of which are discussed later in this topic.
Internet Explorer is an example of an unmanaged application that hosts the runtime (in the form of a MIME type extension). Using Internet Explorer to host the runtime enables you to embed managed components or Windows Forms controls in HTML documents. Hosting the runtime in this way makes managed mobile code (similar to Microsoft® ActiveX® controls) possible, but with significant improvements that only managed code can offer, such as semi-trusted execution and isolated file storage.
The following illustration shows the relationship of the common language runtime and the class library to your applications and to the overall system. The illustration also shows how managed code operates within a larger architecture. .NET Framework in context
The following sections describe the main components and features of the .NET Framework in greater detail.

Features of the Common Language Runtime
The common language runtime manages memory, thread execution, code execution, code safety verification, compilation, and other system services. These features are intrinsic to the managed code that runs on the common language runtime. With regards to security, managed components are awarded varying degrees of trust, depending on a number of factors that include their origin (such as the Internet, enterprise network, or local computer). This means that a managed component might or might not be able to perform file-access operations, registry-access operations, or other sensitive functions, even if it is being used in the same active application.
The runtime enforces code access security. For example, users can trust that an executable embedded in a Web page can play an animation on screen or sing a song, but cannot access their personal data, file system, or network. The security features of the runtime thus enable legitimate Internet-deployed software to be exceptionally feature rich.
The runtime also enforces code robustness by implementing a strict type-and-code-verification infrastructure called the common type system (CTS). The CTS ensures that all managed code is self-describing. The various Microsoft and third-party language compilers generate managed code that conforms to the CTS. This means that managed code can consume other managed types and instances, while strictly enforcing type fidelity and type safety.
In addition, the managed environment of the runtime eliminates many common software issues. For example, the runtime automatically handles object layout and manages references to objects, releasing them when they are no longer being used. This automatic memory management resolves the two most common application errors, memory leaks and invalid memory references.
The runtime also accelerates developer productivity. For example, programmers can write applications in their development language of choice, yet take full advantage of the runtime, the class library, and components written in other languages by other developers. Any compiler vendor who chooses to target the runtime can do so. Language compilers that target the .NET Framework make the features of the .NET Framework available to existing code written in that language, greatly easing the migration process for existing applications.
While the runtime is designed for the software of the future, it also supports software of today and yesterday. Interoperability between managed and unmanaged code enables developers to continue to use necessary COM components and DLLs.
The runtime is designed to enhance performance. Although the common language runtime provides many standard runtime services, managed code is never interpreted. A feature called just-in-time (JIT) compiling enables all managed code to run in the native machine language of the system on which it is executing. Meanwhile, the memory manager removes the possibilities of fragmented memory and increases memory locality-of-reference to further increase performance.
Finally, the runtime can be hosted by high-performance, server-side applications, such as Microsoft® SQL Server™ and Internet Information Services (IIS). This infrastructure enables you to use managed code to write your business logic, while still enjoying the superior performance of the industry's best enterprise servers that support runtime hosting.

.NET Framework Class Library
The .NET Framework class library is a collection of reusable types that tightly integrate with the common language runtime. The class library is object oriented, providing types from which your own managed code can derive functionality. This not only makes the .NET Framework types easy to use, but also reduces the time associated with learning new features of the .NET Framework. In addition, third-party components can integrate seamlessly with classes in the .NET Framework.
For example, the .NET Framework collection classes implement a set of interfaces that you can use to develop your own collection classes. Your collection classes will blend seamlessly with the classes in the .NET Framework.
As you would expect from an object-oriented class library, the .NET Framework types enable you to accomplish a range of common programming tasks, including tasks such as string management, data collection, database connectivity, and file access. In addition to these common tasks, the class library includes types that support a variety of specialized development scenarios. For example, you can use the .NET Framework to develop the following types of applications and services:
->Console applications. See Building Console Applications.
->Windows GUI applications (Windows Forms). See Windows Forms.
->Windows Presentation Foundation (WPF) applications.
->ASP.NET applications. See Creating ASP.NET Web Pages.
->Web services. See Creating Web Services in Managed Code.
->Windows services. See Introduction to Windows Service Applications.
->Service-oriented applications using Windows Communication Foundation (WCF).
->Workflow-enabled applications using Windows Workflow Foundation (WF).

Tuesday, March 25, 2008

.Net Framework

The Microsoft .NET Framework
The .NET Framework is Microsoft's managed code programming model for building applications on Web, Windows clients, servers, and mobile or embedded devices. Developers use .NET to build applications of many types:
Web applications,
Server applications,
Smart client applications,
Console applications,
Database applications, and more.

The .NET Framework is the infrastructure for the Microsoft .NET platform.
The .NET Framework is an environment for building, deploying, and running Windows, Web applications and Web Services.

Microsoft's first server technology ASP (Active Server Pages), was a powerful and flexible "programming language". But it was too code oriented. It was not an application framework and not an enterprise development tool.

The Microsoft .NET Framework was developed to solve this problem.

.NET Frameworks keywords:
-> Easier and quicker programming
-> Reduced amount of code
-> Declarative programming model
-> Richer server control hierarchy with events
-> Larger class library
-> Better support for development tools

The .NET Framework consists of 3 main parts:
1.Programming languages:
-> C# (Pronounced C sharp)
-> Visual Basic (VB .NET)
-> J# (Pronounced J sharp)
-> Visual C++
2.Server technologies and client technologies:
-> ASP .NET (Active Server Pages)
-> Windows Forms (Windows desktop solutions)
-> Compact Framework (PDA / Mobile solutions)
3.Development environments:
-> Visual Studio .NET (VS .NET)
-> Visual Web Developer

To support this variety, the .NET Framework includes a broad set of supporting class libraries, including:
Windows Presentation Foundation (WPF), for visually stunning user experiences on Windows clients;
Windows Communication Foundation (WCF), enabling fast and flexible communications among applications across your enterprise;
Workflow Foundation (WF), allowing developers to build workflows into any application; ASP.NET, for high-performance and interactive Web-based applications;
Libraries for handling XML, data, IO, cryptography, text-to-speech, and more.

To develop these Applications we are using Powerful Languages C#.Net, VB.Net, J#, Vicual C++ etc. Almost every Application have the three layered Architecture as fallows
1.Presentation Layer
2.Business Logic Layer and
3.Data Access Layer.
we will see brief about these layers
Presentation Layer: Presentation Layer is the Interface between both user and the syste.
Most simple presentation layers contain user interface components, such as Microsoft® Windows Forms or ASP.NET Web Forms. These components typically contain code to perform functions such as configuring the visual appearance of controls; accepting and validating user input; and acquiring and rendering data from data access logic components or business components. The presentation layer can also include user interface process components. User interface process components perform presentation layer tasks that are not directly concerned with user interactions. For example, user interface process components orchestrate the flow of control between forms in the presentation layer and coordinate background tasks such as state management and handling of concurrent user activities.

Business Logic Layer: Business Logic Layer is the interface between Presentation layer and the Data Access layer. This Business logic layer is usually one of the tiers in a multitier architecture. It separates the business logic from other modules, such as the Data access layer and Presentation Layer User interface. The business logic of an application can often withstand modifications or replacements of other tiers. For example, in an application with a properly separated Business logic layer and Data access layer, the Data access layer could be rewritten to retrieve data from a different database, without affecting any of the business logic. This practice allows software application development to be more effectively split into teams, with each team working on a different tier simultaneously.

Within a Business Logic Layer objects can further be partitioned into Business Processes (aka Business Activities) and Business Entities. Business Process objects typically implement the Controller Pattern, ie: they contain no data elements but have methods that orchestrate interaction among Business Entities. Business Entities typically correspond to entities in the logical domain model (rather than the physical database model).

Data Access Layer:Data Access Layer is to provide data to your business objects without using database specific code. You accomplish this by exposing a series of data access methods from the Data Access Layer that operate on data in the data-tier using database specific code but do not expose any database specific method parameters or return types to the business tier. Any time a business object needs to access the data tier, you use the method calls in the DAL instead of calling directly down to the data tier. This pushes database-specific code into the DAL and makes your business object database independent.
 
web stats