32

Introduction OF “INTRODUCTION”.NET is a major technology change for Microsoft and in the software world. Just like the computer world moved from DOS

Embed Size (px)

Citation preview

Page 1: Introduction OF “INTRODUCTION”.NET is a major technology change for Microsoft and in the software world. Just like the computer world moved from DOS
Page 2: Introduction OF “INTRODUCTION”.NET is a major technology change for Microsoft and in the software world. Just like the computer world moved from DOS

Introduction OF

Page 3: Introduction OF “INTRODUCTION”.NET is a major technology change for Microsoft and in the software world. Just like the computer world moved from DOS

“INTRODUCTION”

.NET is a major technology change for Microsoft and in the software world. Just like the computer world moved from DOS to Windows, now they are moving to .NET. But don't be surprised if you find anyone saying that "I do not like .NET and I would stick with VB and C++". There are still lot of people who like to use the old cart instead of the latest car.

The simple answer is ‘.Net is a latest technology from Microsoft, on which all other Microsoft technologies will be depending on in future’.

Page 4: Introduction OF “INTRODUCTION”.NET is a major technology change for Microsoft and in the software world. Just like the computer world moved from DOS

History

.NET technology was introduced by Microsoft, to catch the market from the SUN's Java. Few years back, Microsoft had only C++ and VB to compete with Java, but Java was catching the market very fast. With the world depending more and more on the Internet/Web and java related tools becoming the best choice for the web applications, Microsoft seemed to be loosing the battle. Thousands of programmers moved to java from C++ and VB. This was alarming for Microsoft and many of the Microsoft fan's kept on asking "is Microsoft sleeping?". And Microsoft had the answer. On One fine morning, they announced : "We are not sleeping. We have the answer for you. And that answer was “.NET Technology”.

Page 5: Introduction OF “INTRODUCTION”.NET is a major technology change for Microsoft and in the software world. Just like the computer world moved from DOS

Microsoft has a wonderful history of starting late but catching up quickly. This is also true in case of .NET too. Microsoft put their best men at work for a secret project called Next Generation Windows Services (NGWS)., under the direct supervision of Mr. Bill Gates. It is a grand FUD (Fear, Uncertainty, Doubt) campaign. Out of that grand FUD campaign emerged the very capable and useful .NET development environment and framework for both the Web and Windows desktop application, it has really outperformed their competitors.

Microsoft announced .NET to the world in June 2000 and released version 1.0 of the .NET framework in January 2002.

Page 6: Introduction OF “INTRODUCTION”.NET is a major technology change for Microsoft and in the software world. Just like the computer world moved from DOS

• Microsoft's C++ was powerful But it was too complex. It has too many data types and developers had to learn many libraries.

• Visual Basic was too easy and many serious programmers hated it just for that reason. Even though Visual basic was very easy to use, it was not very flexible to develop serious applications.

• Sun's Java became a very good choice for these reasons. It had the flexibility and power of C++ and at the same time easy enough to catch the attention of VB programmers.

• Microsoft recognized these factors and they introduced the .NET considering all these factors. All unwanted complexities are eliminated and a pure object oriented programming model was introduced. This makes programmer's life very easy.

Page 7: Introduction OF “INTRODUCTION”.NET is a major technology change for Microsoft and in the software world. Just like the computer world moved from DOS

What is .NET

• .NET is not an operating system. It is a framework.• .NET is not a programming language it support

multiple programming languages. It supports many programming languages, including C++, VB.NET, C# etc.

• Is a layer between the operating system and the programming language.

• .NET provides a common set of class libraries, which can be accessed from any .NET based programming language. There will not be separate set of classes and libraries for each language. If you know any one .NET language, you can write code in that .NET language by using the same .net class libraries!!

• In future versions of Windows, .NET will be freely distributed as part of operating system and users will never have to install .NET separately.

Page 8: Introduction OF “INTRODUCTION”.NET is a major technology change for Microsoft and in the software world. Just like the computer world moved from DOS

What is .NET

.NET framework comes with a single class library. And that's all programmers need to learn!! Whether they write the code in C# or VB.NET or J#, it doesn't matter, you just use the .NET class library.

There is no classes specific to any language. There is nothing more you can do in a language, which you can't do in any other .NET language. You can write code in C# or VB.NET with the same number of lines of code, same performance and same efficiency, because everyone uses same .NET class library.

Page 9: Introduction OF “INTRODUCTION”.NET is a major technology change for Microsoft and in the software world. Just like the computer world moved from DOS

What is .NET

We cannot define .NET as a 'single thing'. It is a new, easy, and extensive programming framework. It is not a programming language, but it supports several programming languages. By default .NET comes with few programming languages including C# (C Sharp), VB.NET, J# and C++. .NET is a common platform for all the supported languages. It gives a common class library, which can be called from any of the supported languages. So, developers need not learn many libraries when they switch to a different language. Only the syntax is different for each language.

Page 10: Introduction OF “INTRODUCTION”.NET is a major technology change for Microsoft and in the software world. Just like the computer world moved from DOS

What is .NET

When you write code in any language and compile, it will be converted to an 'Intermediate Language' (Microsoft Intermediate Language - MSIL). So, your compiled executable contains the IL and not really executable machine language. When the .NET application runs, the .NET framework in the target computer take care of the execution.

Whether you write code in C# or VB.NET, you are calling methods from the same .NET class libraries. The same .NET framework executes the C# and VB.NET applications. So, there won't be any performance difference based on the language you write code.

Page 11: Introduction OF “INTRODUCTION”.NET is a major technology change for Microsoft and in the software world. Just like the computer world moved from DOS

•This is how Microsoft describes it: “.NET is the Microsoft Web services strategy to connect information, people, systems, and devices through software. Integrated across the Microsoft platform, .NET technology provides the ability to quickly build, deploy, manage, and use connected, security-enhanced solutions with Web services. .NET-connected solutions enable businesses to integrate their systems more rapidly and in a more agile manner and help them realize the promise of information anytime, anywhere, on any device.”

Definition: The .NET framework can be defined as a controlled environment for developing and running web/windows applications.

Page 12: Introduction OF “INTRODUCTION”.NET is a major technology change for Microsoft and in the software world. Just like the computer world moved from DOS

.NET architecture?Microsoft .NET Basically consists of

four major components:

• Common Language Specification (CLS) – Green in the diagram.

• Framework Class Library (FCL) – Red • Common Language Runtime (CLR) –

Yellow • .NET Tools – Cream (extreme right)

Page 13: Introduction OF “INTRODUCTION”.NET is a major technology change for Microsoft and in the software world. Just like the computer world moved from DOS

At the base of the diagram in gray is the operating system, which technically can be any window’s platform but typically is Microsoft Windows 2000 or greater.

Page 14: Introduction OF “INTRODUCTION”.NET is a major technology change for Microsoft and in the software world. Just like the computer world moved from DOS

LanguagesCurrently .NET supports the following Languages:

1). VB.NET 2). C++ 3). C# 4). J# The above languages are from Microsoft.

.NET also support many third parties languages

(Microsoft latest news dot.Net support around 40

languages).

VB.NET:

While Differencing between VB and

VB.NET. There is not much in common between

VB and VB.NET other than the name. VB.NET is

a totally new programming language. It just

retains the syntax of old VB. So, if you are a VB

programmer, probably you may like VB.NET than

C# just because of the syntax.

Page 15: Introduction OF “INTRODUCTION”.NET is a major technology change for Microsoft and in the software world. Just like the computer world moved from DOS

C#: (c Sharp)

There has already been C, and C++; but

Microsoft recently introduced yet another language

in the same naming tradition: C# (pronounced "C

sharp").

C# is a language designed to be fully

compatible with Microsoft's .NET and by taking

advantage of C and C++ (as well as Java).

C# is designed to be a platform-independent

language in the tradition of Java. It's syntax is

similar to C and C++ syntax, and C# is designed to

be an object-oriented language. There are, for the

most part, minor variations in syntax between C++

and C#.

Page 16: Introduction OF “INTRODUCTION”.NET is a major technology change for Microsoft and in the software world. Just like the computer world moved from DOS

C#, as part of the .NET framework, is

compiled to Microsoft Intermediate Language

(MSIL), which is a language similar to Java's Byte

code. Furthermore, because the other languages

that used the .NET platform (including VB and

C++) compile to MSIL, it is possible for classes to

be inherited across Languages and communicate

with one another.

Whether you write code in VB.NET or C# or in

any other dot .Net supported language, when you

compile, your code will get converted to MSIL

(Microsoft Intermediate language). The MSIL is then

executed by the same .NET framework, whether

you wrote it originally in C# or VB.NET. The MSIL

generated by C# and VB.NET is about 99% same

and performance is exactly that is 100 % same!

Page 17: Introduction OF “INTRODUCTION”.NET is a major technology change for Microsoft and in the software world. Just like the computer world moved from DOS

Framework or Base Class Library: (FCL/BCL)

• The FCL is a collection of over 7000 classes and data types that enable .NET applications to read and write files, access databases, process XML, display a graphical user interface, draw graphics, use Web services etc.

• The FCL wraps many classes and data types that can be used by C# and other .NET programming languages.

• The framework's class library and the CLR together constitute the .NET Framework.

Page 18: Introduction OF “INTRODUCTION”.NET is a major technology change for Microsoft and in the software world. Just like the computer world moved from DOS

ASP .NET

ASP.NET is a server side scripting technology that allows you to use a full featured programming language such as C# or VB.NET etc to build web applications easily.

ADO .NET

ADO.NET is an object-oriented set of libraries classes that allows you to interact with data sources.  Commonly, the data source is a database (Microsoft SQL Server, Microsoft Access, Oracle etc), but it could also be a text file, an Excel spreadsheet, or an XML file.

Page 19: Introduction OF “INTRODUCTION”.NET is a major technology change for Microsoft and in the software world. Just like the computer world moved from DOS

.NET Tools There are many .NET Framework (Visual

Studio, SharpDevelop, Visual Web Developer) tools designed to help developers create, configure, deploy, manage and secure .NET applications and components.

Visual Studio .NET is Microsoft’s tool for developing Windows software. Visual Studio provides an integrated development environment (IDE) for developers to create standalone Windows applications, interactive Web sites, Web applications, and Web services running on any platform that supports .NET.

Ms Visual Studio can be used to develop console and graphical user interface applications along with Windows Forms applications, web sites, web applications, and web services.

Page 20: Introduction OF “INTRODUCTION”.NET is a major technology change for Microsoft and in the software world. Just like the computer world moved from DOS

Common Language Runtime (CLR)

Programs written for the .NET Framework execute in a software environment that manages the program's runtime requirements. This runtime environment is known as the Common Language Runtime (CLR).

The CLR also provides other important services such as security, memory management, and exception handling.

Page 21: Introduction OF “INTRODUCTION”.NET is a major technology change for Microsoft and in the software world. Just like the computer world moved from DOS

Common Language Runtime (CLR) forms

the heart of the .NET framework. All Languages

have runtime and its the responsibility of the

runtime to take care of the code execution of the

program. For example Java has Java Virtual

Machine Similarly .NET has CLR.

Following are the responsibilities of CLR.√ Garbage Collection (GC) :- CLR automatically

manages memory thus eliminating memory leaks. When objects are no longer in use, GC automatically releases those memory thus providing efficient memory management. [GI]

Page 22: Introduction OF “INTRODUCTION”.NET is a major technology change for Microsoft and in the software world. Just like the computer world moved from DOS

√ Code Access Security :- Code Access Security grants rights to program depending on the security configuration. Example, the program has rights to edit or create a new file but the security configuration of machine does not allow the program to delete a file.

√ Code Verification :- This ensures proper code execution and type safety while the code runs. It prevents the source code to perform illegal operation such as accessing invalid memory locations etc.

√ IL( Intermediate language ) CLR uses Just-In-Time JIT and compiles the IL code to machine code and then executes. [GI]

Page 23: Introduction OF “INTRODUCTION”.NET is a major technology change for Microsoft and in the software world. Just like the computer world moved from DOS

I

Page 24: Introduction OF “INTRODUCTION”.NET is a major technology change for Microsoft and in the software world. Just like the computer world moved from DOS

CLR, CTS and CLS :

.CLS

Common Language Runtime

Common Type System

Common ( )Language Specification

Page 25: Introduction OF “INTRODUCTION”.NET is a major technology change for Microsoft and in the software world. Just like the computer world moved from DOS

Common Type System: (CTS)In order that two language

communicate

smoothly CLR has CTS (Common Type

System). Example in VB you have “Integer” and

in C++ you have “Int” these data types are not

compatible so the interfacing between them is

very complicated. In order that two different

languages can communicate. Microsoft

introduced Common Type System. So “Integer”

data type in VB and “Int” data type in C++ will

convert it to System.int32 which is data type of

CTS. The CTS defines/specify all possible

datatypes supported by the CLR that how they

may or may not interact with each other.

Page 26: Introduction OF “INTRODUCTION”.NET is a major technology change for Microsoft and in the software world. Just like the computer world moved from DOS

Common Language Specification: (CLS)

This is a subset of the CTS which all

.NET languages are expected to support. It was

always a dream of Microsoft to unite all different

languages in to one umbrella and CLS is one

step towards that. “Microsoft has defined CLS

which are nothing but guidelines that

language to follow so that it can communicate

with other .NET languages in a seamless

manner”.

Page 27: Introduction OF “INTRODUCTION”.NET is a major technology change for Microsoft and in the software world. Just like the computer world moved from DOS

• Common Type System (CTS) describes how types are declared, used and managed in the runtime and facilitates cross-language integration, type safety, and high performance code execution.

• Common Language Specification (CLS) is an agreement among language designers and class library designers to use a common subset of basic language features that all languages have to follow.

Page 28: Introduction OF “INTRODUCTION”.NET is a major technology change for Microsoft and in the software world. Just like the computer world moved from DOS

Benefits of .NET

What are the benefits of .NET?

• .NET provides the best platform available today for delivering Windows software. NET helps make software better, faster, cheaper, and more secure.

•For developers, .NET provides an integrated set of tools for building Web software and services and Windows desktop applications. .NET also supports multiple programming languages.

Page 29: Introduction OF “INTRODUCTION”.NET is a major technology change for Microsoft and in the software world. Just like the computer world moved from DOS

•For companies, .NET provides a stable, scalable and secure environment for software development. .NET can lower costs by speeding development and connecting systems, increase sales by giving employees access to the tools and information they need, and connect your business to customers, suppliers and partners.

•For end-users, .NET results in software that’s more reliable, attractive and secure and works on multiple devices including laptops, Smartphone's and Pocket PCs.

Page 30: Introduction OF “INTRODUCTION”.NET is a major technology change for Microsoft and in the software world. Just like the computer world moved from DOS

General InformationGarbage Collection: (GC) Garbage collection (GC) is a form of automatic memory management. The garbage collector or collector attempt to collect garbage Such as free/unused memory occupied by those objects which are no longer in use by the program.

Console Applications:Console Applications are light weight

programs run inside the command prompt (DOS) window. They are commonly used for test applications.

Page 31: Introduction OF “INTRODUCTION”.NET is a major technology change for Microsoft and in the software world. Just like the computer world moved from DOS

•Windows/Desktop Applications are form based standard Windows desktop applications for common day to day tasks. Microsoft word is an example of a Windows application.

•Web Applications are programs that used to run inside some web server (e.g., IIS) to fulfill the user requests over the http. A typical example of web application is Hotmail and Google.

•Web Services are web applications that provide services to other web applications over the internet. Google search engine’s web service, e.g., allows other applications to delegate the task of searching over the internet to Google web service and use the result produced by it in their own applications.

Page 32: Introduction OF “INTRODUCTION”.NET is a major technology change for Microsoft and in the software world. Just like the computer world moved from DOS

Thank You!