.NET Framework & C#.

Slides:



Advertisements
Similar presentations
What is.Net Gary Devendorf. .Net Framework.Net framework works like the Domino Objects only much lower level and very complete It is part of the OS (or.
Advertisements

Introduction to .NET Framework
.NET Framework Overview
Tahir Nawaz Introduction to.NET Framework. .NET – What Is It? Software platform Language neutral In other words:.NET is not a language (Runtime and a.
Using.NET Platform Note: Most of the material of these slides have been taken & extended from Nakov’s excellent overview for.NET framework, MSDN and wikipedia.
History of.Net Introduced by Microsoft Earlier technology was VC++ and VB VC++ comes with so many library and VB was so easy to use and not flexible to.
.NET Framework Overview Pingping Ma Nov 16 th, 2006.
Henrico Dolfing Business Segment Partners. Océ Document Technologies GmbH2 June, NET Framework Version 3.0.
Overview of the.NET Framework. What is the.NET Framework A new computing platform designed to simplify application development A consistent object-oriented.
Programming Our First Java Program Yingcai Xiao. What to Do Set up for Java Programming Write our first Java Program with IDE Write our first Java Program.
Introducing the Common Language Runtime for.NET. The Common Language Runtime The Common Language Runtime (CLR) The Common Language Runtime (CLR) –Execution.
Introducing the Common Language Runtime. The Common Language Runtime The Common Language Runtime (CLR) The Common Language Runtime (CLR) –Execution engine.
2. Developing in.NET and C#. 2 Microsoft Objectives “Microsoft.NET development is based on an underlying framework of tools and classes. These tools and.
Platforms and tools for Web Services and Mobile Applications Introduction to C# Bent Thomsen Aalborg University 3rd and 4th of June 2004.
Intro to dot Net Dr. John Abraham UTPA – Fall 09 CSCI 3327.
Rajeswari Indupuri Introduction to.NET Framework.
Chapter 12 Microsoft Assemblies. Process Phases Discussed in This Chapter Requirements Analysis Design Implementation ArchitectureFramework Detailed Design.
A Free sample background from © 2001 By Default!Slide 1.NET Overview BY: Pinkesh Desai.
Lecture Roger Sutton CO530 Automation Tools 5: Class Libraries and Assemblies 1.
1 Introduction to.NET Framework. 2.NETFramework Internet COM+ Orchestration Orchestration Windows.NET Enterprise ServersBuildingBlockServices Visual Studio.NET.
Introduction to .Net Framework
ASP.NET The.NET Framework. The.NET Framework is Microsoft’s distributed run-time environment for creating, deploying, and using applications over the.
© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill CampusDr. Paul Walcott COMP6325 Advanced Web Technologies Dr. Paul Walcott The University.
The Metadata System1. 2 Introduction Metadata is data that describes data. Traditionally, metadata has been found in language- specific files (e.g. C/C++
Session 1 - Introduction and Data Access Layer
CIS NET Applications1 Chapter 2 –.NET Component- Oriented Programming Essentials.
Introduction to.NET Framework. .NET – What Is It? Software platform Language neutral In other words:.NET is not a language (Runtime and a library for.
Appendix D: Microsoft.NET Framework Overview. Overview.NET Framework Architecture.NET Namespaces.
 Internet providing backbone for applications  Use of several web sites and devices to provide one complete solution  Software as services  Quick software.
Introduction to .NET Framework
Understanding Code Compilation and Deployment Lesson 4.
.NET Framework Overview
ASSEMBLY. A SSEMBLY Assemblies are the fundamental units of applications in the.net framework An assembly can contain classes, structures, interfaces.
Introduction .NET Framework
Lecture 1 Programming in C# Introducing C# Writing a C# Program.
CS795/895: Introduction. Topics Distributed Systems –Availability –Performance –Web Services Security –Authentication –Authorization –Confidentiality.
Component-Based Software Engineering Introduction to.NET Paul Krause.
.NET Framework Danish Sami UG Lead.NetFoundry
MSIL & CLI Kun-Yuan Shieh.
tom perkins1 XML Web Services -.NET FRAMEWORK – Part 1 CHAPTER 1.1 – 1.3.
PRIOR TO WEB SERVICES THE OTHER TECHNOLOGIES ARE:.
Chapters 2 & 3. .NET Software development model that allows applications created in disparate programming languages to communicate Universal data access.
.NET Ying Chen Junwei Chen. What is Microsoft.NET. NET is a development platform Incorporated into.NET COM+ component services ASP web development framework.
Microsoft .NET A platform that can be used for building and running windows and web applications such that the software is platform and device-independent.
Getting Started with.NET Getting Started with.NET/Lesson 1/Slide 1 of 31 Objectives In this lesson, you will learn to: *Identify the components of the.NET.
C# and.NET. .NET Architecture  Compiling and running code that targets.NET  Advantages of Microsoft Intermediate Language (MSIL)  Value and Reference.
Module 4: Deployment and Versioning. Overview Introduction to Application Deployment Application Deployment Scenarios Related Topics and Tools.
INTRODUCTION CHAPTER #1 Visual Basic.NET. VB.Net General features It is an object oriented language  In the past VB had objects but focus was not placed.
July 22, 2001Introduction to.NET1 Introduction to.NET Framework Gholamali Semsarzadeh July 2001.
The Execution System1. 2 Introduction Managed code and managed data qualify code or data that executes in cooperation with the execution engine The execution.
Text Introduction to.NET Framework. CONFIDENTIAL Agenda .NET Training – Purpose  What is.NET?  Why.NET?  Advantages  Architecture  Components: CLR,
METADATA IN.NET Presented By Sukumar Manduva. INTRODUCTION  What is Metadata ? Metadata is a binary information which contains the complete description.
OE-NIK HP Advanced Programming Using and creating DLL files.
Just-In-Time Compilation. Introduction Just-in-time compilation (JIT), also known as dynamic translation, is a method to improve the runtime performance.
Introduction to the Microsoft.NET Framework Chris Wastchak Student Ambassador to Microsoft.
Introduction to .NET framework
.NET Omid Darroudi.
C# and the .NET Framework
.NET and .NET Core 2. .NET Runtimes Pan Wuming 2017.
Module 1: Getting Started
Introduction to C# AKEEL AHMED.
Programming in C# CHAPTER 1
Keith Mulkey Senior Software Engineer SFA, Inc.
Introduction to .NET By : Mr. V. D. Panchal Content :
.Net Framework Details Imran Rashid CTO at ManiWeber Technologies.
Module 10: Implementing Managed Code in the Database
Keith Mulkey Senior Software Engineer SFA, Inc.
DOT NET ARCHITECTURE (OR) DOT NET FRAME WORK ARCHITECTURE
IS 135 Business Programming
Presentation transcript:

.NET Framework & C#

MS Intermediate Language .NET Framework Problem background Solution Common Language Runtime (CLR) MS Intermediate Language MSIL Structure MSIL and Java bytecode Introduction to C# language C# Structure C# Features

Problems Background Good code is hard to write All system features in any language COM problems Platform Interoperability Automatic memory management Object-Oriented features in and between all PLs Safety & Security Better Access to OS functions Interoperate with COM (both as client & server)

Requests for existing feature Solution (Common Language Runtime) Managed Code in Common Language Runtime Managed Code Common Language Runtime Requests for existing feature New CLR-Only Feature Win 32 OS

Solution (Microsoft Intermediate Language) Different Languages are Compiled into MSIL Just-In-Time compiler Development tools Source code : Any languages MS Intermediate Language Platform specific code

.Net platform features Automatic memory management Explicit Versioning OO features in any languages Accessing system functionality throw a hierarchical namespace Code security Interoperability with COM

Costs: OS got harder to write More memory and CPU time

CLR structure

Compare with traditional ways C# VB C++ J-script other Compiler C++ Intermediate Language Compiler JIT econoJIT PreJIT Executable Executables Existing OS .NET CLR Machine hardware

A simple example

TimeComponent.vb Imports Microsoft.VisualBasic ' Declare the namespace that clients will use to access ' the classes in this component Namespace TimeComponentNS Public Class TimeComponent Public Function GetTime(ByVal ShowSeconds As Boolean) As String If (ShowSeconds = True) Then Return Now.ToLongTimeString Else Return Now.ToShortTimeString End If End Function End Class End Namespace

// Import the namespaces that this program uses, thereby allowing // us to use the short names of the functions inside them. using System ; using TimeComponentNS ; class MainApp { // The static method "Main" is an application's entry point public static void Main() // Declare and create a new component of the class // provided by the VB server we wrote TimeComponent tc = new TimeComponent ( ) ; // Call the server's GetTime method. Write its // resulting string to a console window. Console.Write (tc.GetTime (true)) ; } Timeclient.cs using System ; using TimeComponentNS ; class MainApp { public static void Main() // Declare and create a new component of the class // provided by the VB server we wrote TimeComponent tc = new TimeComponent ( ) ; // Call the server's GetTime method. Write its // resulting string to a console window. Console.Write (tc.GetTime (true)) ; }

Assembly A logical collection of one or more exe and dll file containing an application’s code and resources It contains 1-Codes in MSIL 2-Manifest A metadata description of the code and resources

Metadata What classes and method it contains What external objects it requires What version of code it represents

Manifest example (TimeComponent.dll) .assembly extern mscorlib { .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. .ver 1:0:2411:0 } .assembly extern Microsoft.VisualBasic .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: .ver 7:0:0:0 .assembly TimeComponent .hash algorithm 0x00008004 .ver 0:0:0:0 .module TimeComponent.dll // MVID: {144ACC38-E825-45C4-83A6-C2A9E5A901DD} .imagebase 0x00400000 .subsystem 0x00000002 .file alignment 512 .corflags 0x00000001 // Image base: 0x032a0000

Private or Public Private In client directory Public (shared) In Global Assembly Cache (GAC) \\winnt\assembly

Namespaces A logical division within which a name need to be unique The best way to handle a large list of system objects and functions System namespace (implemented in several separated DLLs We can import a namespace Your code can have its own namespace

Versioning DLL Hell Replacing a DLL used by an existing client, with a newer version (or vice versa) .NET provides a standard way to specify version Each client assembly uses its own specified versions of related assemblies

Object oriented programming Whether to smarten up non-object oriented languages or dump down OO languages .NET provides all languages with inheritance and constructors features Virtual Object Model

All .NET classes inherit from the base class System.Object Equals GetHashCode GetType ToString

Cross-language inheritance Because of the standardized IL architecture you can inherit form a class in another language For example: System.Object

.NET memory management .NET CLR provides all languages with automatic memory management. Garbage collector automatically removes unreferenced objects You can force a garbage collection manually

Interoperability with COM objects .NET Supports interoperation with COM object as client or server via a runtime callable wrapper or a COM Callable Wrapper

Using COM objects from .NET objects

Using .NET objects from COM objects

Transaction in .NET Transaction ensure the integrity of databases during complex operations Native .NET objects can also participate in transactions with a simple attribute

Structured exception handling .NET provides structured exception handling as a fundamental feature available in and between all languages The exception handler can tell exactly where the exception originated by using a stack trace

Code access security Most software comes from web A user doesn’t know whether a Web code is safe or not .NET allows an administrator to specify privileges that each managed code has. You can specify these privileges in three level by modifying XML-based files Enterprise Machine User \\winnt\microsoft.net\framework\[c.v.]\config\