Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to .NET Framework

Similar presentations


Presentation on theme: "Introduction to .NET Framework"— Presentation transcript:

1 Introduction to .NET Framework

2 Lecture Outline Visual Programming Environment. Introduction to .NET
Introduction to visual studio Introduction to visual studio .NET .NET Framework. Major Components of .NET Framework: Namespaces Framework class library (FCL) Common Language Runtime (CLR) Common Language Specification (CLS)

3 Visual Programming Environment
Environment which allows the use of visual expressions (such as graphics, drawings, animation or icons) in the process of programming.

4 Visual Programming Environment
The technique of Visual Programming allows programmers to create GUI without writing any code. Microsoft Visual Studio .NET is a visual programming environment.

5 First: what is Visual Studio ??
Second: what is .NET ??

6 Visual Studio Is the main Integrated Development Environment (IDE) from Microsoft. It can be used to develop console and GUI applications.

7 Integrated Development Environment (IDE)
In computing, an integrated development environment (IDE) is a software application that provides comprehensive facilities to computer programmers for software development. An IDE normally consists of a source code editor, a compiler and/or interpreter, build automation tools, and (usually) a debugger.

8 Visual Studio Environment

9 Visual Studio Features
Visual Studio includes a code editor supporting some features like IntelliSense. code editor IntelliSense

10 Visual Studio Features
IntelliSense: shows the available classes and the methods and properties available on those classes. Designers: Visual Studio includes visual WYSIWYG* designers for GUI and other applications. Debugging: is the ability to step through your application line by line as it is executing. Organization: it provides intuitive methods for organizing your various code files into projects and your various projects into solutions. (*) WYSIWYG : What You See Is What You Get (more info.) WYSIWYG: What you see is what You get

11 Development of Visual Studio
Version Main changes or features Visual Studio 97 Visual Studio (1998) Visual Studio .NET (2002) New programming language that targets .NET Visual Studio .NET (2003) First release to support for developing programs for mobile devices. Visual Studio 2005 Removes .NET only from name. Visual Studio 2008 Focuses on Windows Vista Visual Studio 2010 Better supports multiple document windows and floating tool windows. Visual Studio 2012, 2013 loaded with new capabilities for Windows 8, the web, SharePoint, and mobile devices. Visual Studio 6.0: 1- was the last version to include the COM-based version of Visual Basic; subsequent versions would include the version of the language based on .NET. 2- It was also the last version to include Visual J++. 2002: 1- The biggest change was the introduction of a managed code 2- development environment using the .NET Framework. 3- Microsoft introduced C# (C-sharp), a new programming language, that targets .NET 2005: Microsoft removed the ".NET" moniker from Visual Studio 2005 (as well as every other product with .NET in its name), but it still primarily targets the .NET Framework, which was upgraded to version 2.0. 2008: Studio 2008 is focused on development of Windows Vista, 2007 Office system, and Web applications. 2010: offering better multi-monitor support. Visual Studio 2010 offers several tools to make parallel programming simpler. Visual studio 2012 :- After the release of Windows 8:- new templates, designers, and testing and debugging tools—everything you need to build addictive applications in as little time as possible. Now you have fast access to virtually unlimited servers in the cloud with the ability to add more storage and computing power on the fly. Visual Studio gives you great tools for taking your apps to Windows Azure, including new templates and publishing options, support for distributed caching, and a lower install footprint.

12 Now, what is .NET ?

13 Introduction to .NET When you hear the name .NET, it gives a feeling that it is something to do only with internet or networked applications. Even though it is true that .NET provides solid foundation for developing such applications it is possible to create many other types of applications.

14 Introduction to .NET The .NET is one over which Web-Based applications can be distributed to variety of devices ( such as cell phones ) and desktop computers. Offers a new programming model that allows programs , created in disparate programming languages , to communicate with each other. Additional information available at Microsoft Web site

15 You can develop such varied types of applications.
Introduction to .NET You can develop such varied types of applications. That’s fine. But how?

16 Introduction to .NET As with most of the programming languages, .NET has a complete Software Development Kit (SDK)- more commonly referred to as .NET Framework SDK It provides classes, interfaces and language compilers necessary to program for .NET. Additionally it contains excellent documentation and Quick Start tutorials that help you learn .NET technologies with ease. A software development kit (SDK or "devkit") is typically a set of development tools that allows for the creation of applications for a certain software package, software framework, hardware platform, computer system, video game console, operating system, or similar platform.

17 Introduction to .NET .NET Development Tools
If you are developing applications that require : speedy delivery to your customers, and features like integration with some version control software (VCS) then you need some Integrated Development Environment (IDE). The new Visual Studio.NET (VS.NET) is a very powerful and flexible IDE that makes developing .NET applications an easy job.

18 Soâ€Ĥ. VS + .NET = VS.NET VS .NET is: A Visual programming environment;
It represents the best development environment for the .NET platform.

19 Introduction to VS .NET VS .NET comes with: the .NET Framework,
several programming languages including Visual Basic, Visual C++, and Visual C#.

20 Overview of the VS.NET IDE
Integrated Development Environment (IDE) Visual Basic.NET Many language enhancements Inheritance, Overloading, Free Threading Visual C++ Integration with .NET Framework with managed extensions (classes) C# New development language Based on C/C++ with Garbage Collection/Memory Management JUMP (Java User Migration Path) to .NET

21 Operating System Services
Major Components of .NET Framework  VB C++ C# JScript â€Ĥ Visual Studio.NET CLS ASP.NET: Web Services and Web Forms Windows Forms Windows Forms ADO.NET: Data and XML FCL CLR Operating System Services

22 Major Components of .NET Framework
Framework Class Library (FCL) Common Language Specification (CLS) Common Language Runtime (CLR)

23 Framework Class Library (FCL)
Major Components of .NET Framework  Framework Class Library (FCL) OO, Pre-packaged classes ready for reuse. Used by any .NET language. It contains around 3400 classes classified logically into namespaces. Each class contains numerous methods and properties which you will use for your programming tasks.

24 Major Components of .NET Framework Common Language Runtime (CLR)
Central part of framework: is the virtual machine component of the .NET framework. All .NET programs execute under the supervision of the CLR. Compilation process: Two compilations take place: Programs compiled to Microsoft Intermediate Language (MSIL) , also known as (IL) Defines instructions for CLR MSIL code translated into machine code Machine code for a particular platform CLR is core or heart of framework. ملفĜ§ĜŞ Ĝ§Ù„Ĝ§Ù†ĜŞĜħنĜŞ

25 Operating System Services Common Language Runtime
CLR: Execution Model VB Source code Compiler C++ C# MSIL Code (IL) Operating System Services Common Language Runtime Machine Code Managed code How many compilation are there? Two. I have to discuss two compilation step.

26 Major Components of .NET Framework
Why two compilations? Platform independence - Portability  .NET Framework can be installed on different platforms Execute .NET programs without any modifications to code Language independence – Inter-operability .NET programs not tied to particular language Programs may consist of several .NET-compliant languages Programs written in different languages are all compiled into MSIL—the different parts can be combined to create a single, unified program. The ability of a program to run (without modification) across multiple platforms is known as platform independence. The .NET Framework also provides a high level of language interoperability. Programs written in different languages are all compiled into MSIL—the different parts can be combined to create a single, unified program. Language interoperability offers many benefits to software companies. Visual Basic .NET, C# and Visual C++ .NET developers can work side-by-side on the same project without having to learn another programming language—all their code compiles into MSIL and links together to form one program.

27 Common Language Specification (CLS)
Major Components of .NET Framework  Common Language Specification (CLS) The CLR allows objects created in one language be treated as equal citizens by code written in a completely different language. To make this possible, Microsoft has defined the CLS that details for compiler vendors the minimum set of features that their compilers must support if they are to target the runtime. Any language that conforms to the CLS can run on the CLR.

28 Operating System Services
Major Components of .NET Framework  VB C++ C# JScript â€Ĥ Visual Studio.NET CLS ASP.NET: Web Services and Web Forms Windows Forms Windows Forms ADO.NET: Data and XML FCL CLR Operating System Services

29 Namespaces As said earlier, FCL contains classes classified logically into namespaces. The .NET Framework is a whole lot of Classes (called Namespaces) and the technology to get those Classes to work.

30 Namespaces Most of the built in classes are part of either System.* or Microsoft.* namespaces. It encapsulates a large number of common functions, such as file reading and writing, graphic rendering, and database interaction, among others. The .NET class libraries are available to all .NET languages. All classes in C# are found in two main namespace: 1- system 2- Microsoft file reading and writing-> System.IO graphic rendering-> System.Drawing and database interaction->System.Data All these classes are seen in all .Net languages.

31 Namespaces A Namespace is a group of Classes which are grouped together. Namespaces are organized hierarchically. Namespaces developed by .NET team begin with System. Namespaces are organized hierarchically -> means that inherence. And we can find namespace inside another namespace. Person class: Teachers- Student – Manager Machine class: Mobile – TV – Radio – and so on

32 Namespaces If we can explore the System namespace little bit, we can see it has lot of namespace. For example: The System.IO Namespace groups together Classes that you use to read and write to a file. System.Windows.Forms Includes classes for creating Windows based forms. 1- System.IO.Ports 2- System.Windows.Forms.Lable System.Windows.Forms.Buttons Images Main Menu

33 Namespaces A single form is a Class available to Forms:
System.Windows.Forms.Form A Button is also part of the Forms Class: System.Windows.Forms.Button Moreover; Textbox ;label and other controls : System.Windows.Forms.TextBox System.Windows.Forms.Label Form means Ĝ§Ù„Ù†Ĝ§ÙĜ°Ĝİ Ĝ§Ù„لي نĜ´ÙˆÙÙ‡Ĝ§ في Ĝ£ÙŠ Ĝ¨ĜħنĜ§Ù…ĜĴ مĜĞل نĜ§ÙĜ°Ĝİ Ĝ§Ù„Ĝ§ÙˆÙÙŠĜ³ للوĜħĜŻ و Ĝ§Ù„Ĝ§ÙƒĜ³Ù„ و هكĜ°Ĝ§ What we are see in this form? 1- Menu 2- Buttons 3- Textbox All these are built in in .Net IDE

34 Namespaces Use dot syntax to connect namespaces together:
A period separates each namespace name System.Drawing System.Windows.Forms System.Data

35 Namespaces Some Namespaces and their use:
System: Includes essential classes and base classes for commonly used data types, events, exceptions and so on System.Data: Includes classes which lets us handle data from data sources System.Drawing: Provides access to drawing methods System.Net: Provides interface to protocols used on the internet System.Web: Includes classes and interfaces that support browser-server communication 1- System.Data. Sql System.Data.ODBC System.Data.DataRow 2- System.Drawing.Rectangle color Brush 3- System.Net.Cookie System.Net.IPAddress System.Net.IWebProxy

36 Windows.Forms namespace System.Drawing.Printing
The Organization of Namespaces System namespace System Drawing namespace System.Drawing Windows.Forms namespace System.Windows.Forms Data namespace System.Data System.Drawing.brush .color .Graphics Printing namespace System.Drawing.Printing

37 This chapter introduced you to .NET Framwework.
Summary This chapter introduced you to .NET Framwework. For more information see videos at : Microsoft .NET Tutorial Channel

38 SELF-REVIEW EXERCISES
Fill in the blank: Programs that translate high-level language programs into machine language are called _______________ 2. True or False: Visual Basic .NET is the only language available for programming .NET applications. Computers can directly understand high-level languages. 1- Common Language Runtime 2- F 3- F

39 SELF-REVIEW EXERCISES
3. What is the meaning of the following terminologies: MSIL ADO .NET ASP .NET Portability Inter-operability 4. How many levels of compilation happen in .NET Framework? 4- two level.


Download ppt "Introduction to .NET Framework"

Similar presentations


Ads by Google