Published on

Published in: Technology
1 Comment
1 Like
No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide


  2. 2. Introduction to .NET  .NET technology was introduced by Microsoft.  .NET is not an operating system  .NET is not a programming language.  .NET is a framework.KGiSL iTech Page 2
  3. 3. Introduction to .NET(Contd…)  Dot Net Framework is a Programming model of the .NET environment for building, deploying, and running Web-based applications, smart client applications, and XML Web services .   A set of technologies for developing and using components to create:  Web Forms  Web Services  Windows Applications  The .NET Framework includes the common language runtime and class libraries.  .NET provides a common set of class libraries, which can be accessed from any .NET based programming language.KGiSL iTech Page 3
  4. 4. Introduction to .NET(Contd…)  It is a new, easy, and extensive programming platform.  It is not a programming language, but it supports several programming languages.  By default .NET comes with few programming languages including C# (CSharp), VB.NET, J# and managed C++.KGiSL iTech Page 4
  5. 5. Introduction to .NET(Contd…) Following are the core features of Dot Net Framework  Simplified Programming Model  Simplified Deployment  Programming Language Integration  Garbage Collection  Consistent Error HandlingKGiSL iTech Page 5
  6. 6.  Platform Independency  Language Independency  Language Interoperability Security  For Windows Applications - net framework supports “Code access security and “role Based security”  For web and mobile applications - Security can be achieved using Configuration files like machine.config and web.config.KGiSL iTech Page 6
  7. 7. Application Architecture 1. Single Tier Architecture 2. Two Tier Architecture 3. Three Tier Architecture Single Tier Architecture: The one-tier, or single-tier, architecture is a system in which the database, application, and presentation services (the user interface) all reside on one system. .KGiSL iTech Page 7
  8. 8. Application Architecture (Contd…) Two Tier Architecture: - A two tier system consists of a client and a server. - A two-tier application is one in which the presentation services and the database reside on different systems. - The presentation services (user interface) layer usually includes application logic.KGiSL iTech Page 8
  9. 9. Two Tier ArchitectureKGiSL iTech Page 9
  10. 10. Application Architecture (Contd…) Three Tier Architecture:  The third tier(Middle tier) is between the user interface(client) and the data management(server).  This middle tier provides process management where business logic and rules are executed.KGiSL iTech Page 10
  11. 11. Three Tier ArchitectureKGiSL iTech Page 11
  12. 12. Three Tier Architecture  Tier 1: the client contains the presentation logic, including simple control and user input validation. This application is also known as a thin client.  Tier 2: the middle tier is also known as the application server, which provides the business processes logic and the data access.  Tier 3: the data server provides the business data. These are some of the advantages of a three-tier architecture:  It is easier to modify or replace any tier without affecting the other tiers.  Separating the application and database functionality means better load balancing.KGiSL iTech Page 12
  13. 13. Application Architecture (Contd…) Basically,in three tier architecture 3 layers are used to create a projects. 1. UI Layer - UI which includes pages,user controls,CSS,Java Scripts. 1. Business Layer - All business rules performed here. 1. Data Access Layer - All data access code like connecting to database and getting the details are done here.KGiSL iTech Page 13
  14. 14. Three LayersKGiSL iTech Page 14
  15. 15. Versions of .NET .NET Framework Visual Studio .NET Framework 1.0 Visual Studio 2002 .NET Framework 1.1 Visual Studio 2003 .NET Framework 2.0 Visual Studio 2005 .NET Framework 3.5 Visual Studio 2008 .NET Framework 4.0 Visual Studio 2010KGiSL iTech Page 15
  16. 16. VS.NET(Visual Studio.NET)  VS.NET is just an editor, provided by Microsoft to help developers write .NET programs easily .  VS.NET editor automatically generates lot of code, allows developers to drag and drop controls to a form, provide short cuts to compile and build the application etc.  VS.NET has several child windows to assist you in the application development.  These windows are attached on the left, bottom and right sides of the main window.KGiSL iTech Page 16
  17. 17. VS.NET(Visual Studio.NET) (Contd…)  Some of the most commonly used child windows are explained below. Most of these windows will be enabled only when you have created a project and working on a WebForm/WinForm. Tool Box • Toolbox provides all the drag and drop controls for your application. • Depending on the kind of application you are working on, the toolbox will show appropriate controls.KGiSL iTech Page 17
  18. 18. Tool BoxKGiSL iTech Page 18
  19. 19. VS.NET(Visual Studio.NET) (Contd…) Source(HTML) & Design Mode • If you are developing a web application, you can switch between design mode and HTML mode for any web form. • When you are in HTML mode, it will show you the HTML tags and ASP.NET code and you can manually edit it. • You can switch to the Design mode by clicking the Design button on BOTTOM LEFT corner of VS.NET. • In design mode, you can see how your ASP.NET page is going to look like when some one view your web page. Also, you can drag and drop controls from the toolbox, which will automatically generate the HTML for it.KGiSL iTech Page 19
  20. 20. Source(HTML) & Design ModeKGiSL iTech Page 20
  21. 21. VS.NET(Visual Studio.NET) (Contd…)  Solution Explorer Window • Solution Explorer, located on TOP RIGHT corner of VS.NET, displays your solution, all projects included in each solution and the list of files in each project. They are listed in the form of a tree control.  Output Window • Output window, located on BOTTOM LEFT corner of VS.NET, displays the result of your project compilation. When you compile your project, all errors, warnings and compilation results will be displayed in this window.KGiSL iTech Page 21
  22. 22. Solution Explorer WindowKGiSL iTech Page 22
  23. 23. VS.NET(Visual Studio.NET) (Contd…)  Task List Window • It shows individual tasks. Typically, when you compile your project, all errors and warnings will be added to your task list. You can double click on any item in the task list to go directly to the code associated with the task.  Properties Window • It displays the different types of property for each and every control. The common property for all controls are Font, Color, Forecolor and so on.  Code behind window - Code-behind model, which places this code in a separate file or in a specially designated script tag. - Code-behind files typically have names like Firstpage.aspx.cs or Firstpage.aspx.vbKGiSL iTech Page 23
  24. 24. Properties WindowKGiSL iTech Page 24
  25. 25. Code Behind WindowKGiSL iTech Page 25
  26. 26. Shortcut Keys  Compilation and Execution – F5  Toolbox Window– Ctrl + Alt + X  Property Window – F4  Solution Explorer – Ctrl + Alt + L  Design View to Code View – F7(Code Behind Window)  Code View to Design View – Shift + F7(Source Window)KGiSL iTech Page 26
  27. 27. KGiSL iTech Page 27
  28. 28. .NET Framework Common Language Runtime - CLR manages code execution at runtime - Memory management, thread management, etc. Common Language Runtime Operating SystemKGiSL iTech Page 28
  29. 29. .NET Framework Base Class Library - Object-oriented collection of reusable types - Collections, I/O, Strings, … .NET Framework (Base Class Library) Common Language Runtime Operating SystemKGiSL iTech Page 29
  30. 30. .NET Framework Data Access Layer - Access relational databases - Disconnected data model - Work with XML ADO .NET and XML .NET Framework (Base Class Library) Common Language Runtime Operating SystemKGiSL iTech Page 30
  31. 31. .NET Framework ASP.NET & Windows Forms - Create application’s front-end – Web-based user interface, Windows GUI, Web services, … ASP .NET Windows Web Forms Web Services Forms Mobile Internet Toolkit ADO .NET and XML .NET Framework (Base Class Library) Common Language Runtime Operating SystemKGiSL iTech Page 31
  32. 32. .NET Framework Programming Languages - Use your favorite language C++ C# VB.NET Perl J# … ASP .NET Windows Web Forms Web Services Forms Mobile Internet Toolkit ADO .NET and XML .NET Framework (Base Class Library) Common Language Runtime Operating SystemKGiSL iTech Page 32
  33. 33. .NET Framework Common Language Specification C++ Common Language Specification… C# VB Perl J# ASP .NET Windows Web Forms Web Services Forms Mobile Internet Toolkit ADO .NET and XML .NET Framework (Base Class Library) Common Language Runtime Operating SystemKGiSL iTech Page 33
  34. 34. .NET Framework Visual Studio .NET C++ C# VB Perl J# … Common Language Specification Visual Studio .NET Visual Studio .NET ASP .NET Windows Web Forms Web Services Forms Mobile Internet Toolkit ADO .NET and XML .NET Framework (Base Class Library) Common Language Runtime Operating SystemKGiSL iTech Page 34
  35. 35. KGiSL iTech Page 35
  36. 36. .NET Architecture  NET Compliant Language - Language which supports .NET Programming like Vb.NET,C#,C++ and J# etc .  .NET Application - Application which is developed by using .NET Framework. - Like Windows Application, Web Application, Web Service and Mobile Application.  .NET Framework Class Library - It consist of thousands of Pre-developed classes that can be used to build application.KGiSL iTech Page 36
  37. 37. .NET Architecture  Common Type System(CTS) - A superset of the data types used by most modern programming languages. - CTS, common type system is the one which brings all .NET languages data types on a common platform.  Common Language Specification(CLS) - A subset of CTS that allows code written in different languages to interoperate What languages? - Microsoft: C++, Visual Basic, C#, JScript - Third-Party: Cobol, Eiffel, Smalltalk, Scheme, Oberon, Haskell, Java, Python, Perl, …KGiSL iTech Page 37
  38. 38. CLR  Common Language Runtime(CLR) - Its a virtual machine of Microsofts .NET, - During Compile time the Source code(C#, VB.Net..) is converted into Intermediate Language (MSIL),During Runtime this IL is converted to native code to Operating System by Just In Time (JIT) of CLRKGiSL iTech Page 38
  39. 39. KGiSL iTech Page 39
  40. 40. The CLR Compilation Assembly Source code Compiler C++, C#, J#, DLL or EXE Visual Basic or any .NET languageKGiSL iTech Page 40
  41. 41. KGiSL iTech Page 41
  42. 42. KGiSL iTech Page 42
  43. 43. Common Language Runtime Services  Code management  Conversion of MSIL to native code  Loading and execution of managed code  Creation and management of metadata  Verification of type safety  Insertion and execution of security checks  Memory management and isolation  Handling exceptions across languages  Interoperation between .NET Framework objects and COM objects and Win32 DLLs  Automation of object layout for late binding  Developer services (profiling, debugging, etc.)KGiSL iTech Page 43
  44. 44. Applications developed by .NET - Windows Application - Web Application - Web Services - Console Applications - Mobile ApplicationsKGiSL iTech Page 44
  45. 45. CLR - The execution model Source VB C# C++ code Unmanaged Compiler Compiler Compiler component Managed Assembly Assembly Assembly code IL code IL code IL code Common language runtime JIT compiler JIT compiler Native code Operating system services Page 45KGiSL iTech
  46. 46.  NET supports two kinds of coding  Managed Code  Unmanaged Code  Managed Code - The code, which is developed in .NET framework, is known as managed code. This code is directly executed by CLR with help of managed code execution.  Unmanaged Code - The code, which is developed outside .NET Framework is known as unmanaged code.KGiSL iTech Page 46
  47. 47. Assembly  The .NET framework introduces assemblies as the main building blocks of your application.  An Assembly is a  logical unit of code  An application can contains one or more assemblies.  An assembly can be formed in one or more files.  Assembly physically exist as DLLs or EXEs  When you compile your source code by default the exe/dll generated is actually an assemblyKGiSL iTech Page 47
  48. 48. Assembly Contd….  An assembly can consist of the following four elements: 1.Source code, compiled into MS intermediate language (MSIL). This code file can be either an EXE file or a DLL file. 2.The assembly manifest, - which is a collection of metadata that describes assembly name, - culture settings, - list of all files in the assembly, - security identity, version requirements, - and references to resources. - The assembly manifest can be stored with the intermediate code, or in a standalone file that contains only assembly manifest information. 1.Type metadata 2.ResourcesKGiSL iTech Page 48
  49. 49. Assembly Contd….  Assembly Version - An assembly can have two types of versions. 1. "Version Number" - consists of a four-part string with the following format: - <Major Version>.<Minor Version>.<Build Number>.<Revision Number> - For example a version number of indicates 3 as the major version, 5 as the minor version, 20 as the build number, and 1 as the revision number.KGiSL iTech Page 49
  50. 50. Assembly Contd…. 2. The second type of versions is called "Informational Version". -The informational version consists of a string that contains the version number besides additional information like packaging, marketing literature, or product name.KGiSL iTech Page 50
  51. 51. Private Assembly and Shared Assembly Private Assembly  The assembly which is used only by a single application is called as private assembly.  This DLL will be used by your client application only and not by any other application.  In order to run the application properly your DLL must reside in the same folder in which the client application is installed.  Thus the assembly is private to your application. Shared Assembly  Creating a general purpose DLL which provides functionality which will be used by variety of applications.  This type of DLL’s are placed in global assembly cache.  Such assemblies are called as shared assembliesKGiSL iTech Page 51
  52. 52. Global Assembly Cache  Global assembly cache is nothing but a special disk folder where all the shared assemblies will be kept.  It is located under <drive>:WinNTAssembly folder.KGiSL iTech Page 52