Microsoft .NET 3. Language Innovations Pan Wuming 2017.

Slides:



Advertisements
Similar presentations
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 12 Introduction to ASP.NET.
Advertisements

pa 1 Porting BETA to ROTOR ROTOR Projects Presentation Day, June by Peter Andersen.
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.
Object-Oriented Programming
Object-Oriented Programming Python. OO Paradigm - Review Three Characteristics of OO Languages –Inheritance It isn’t necessary to build every class from.
The Type System1. 2.NET Type System The type system is the part of the CLR that defines all the types that programmers can use, and allows developers.
Inheritance and Class Hierarchies Chapter 3. Chapter 3: Inheritance and Class Hierarchies2 Chapter Objectives To understand inheritance and how it facilitates.
OOP in Java Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
C#.NET C# language. C# A modern, general-purpose object-oriented language Part of the.NET family of languages ECMA standard Based on C and C++
Advanced Object-Oriented Programming Features
OOP in Java Fawzi Emad Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Differences between C# and C++ Dr. Catherine Stringfellow Dr. Stewart Carpenter.
Programming in C# Language Overview
Programming Languages and Paradigms Object-Oriented Programming.
.NET Framework Introduction: Metadata
Introduction to Object Oriented Programming. Object Oriented Programming Technique used to develop programs revolving around the real world entities In.
Introduction .NET Framework
C# Programming Fundamentals of Object-Oriented Programming Fundamentals of Object-Oriented Programming Introducing Microsoft.NET Introducing Microsoft.NET.
C#C# Classes & Methods CS3260 Dennis A. Fairclough Version 1.1 Classes & Methods CS3260 Dennis A. Fairclough Version 1.1.
.NET Framework Danish Sami UG Lead.NetFoundry
Introduction to C# C# is - elegant, type-safe, object oriented language enabling to build applications that run on the.NET framework - types of applications.
Programming Languages and Paradigms Object-Oriented Programming.
Guided Notes Ch. 9 ADT and Modules Ch. 10 Object-Oriented Programming PHP support for OOP and Assignment 4 Term project proposal C++ and Java Designer.
Introduction to Object Oriented Programming CMSC 331.
Hoang Anh Viet Hà Nội University of Technology Chapter 1. Introduction to C# Programming.
Object Oriented Software Development
Bill Campbell, UMB Microsoft's.NET C# and The Common Language Runtime.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 6: Transition to Java Programming with Alice and Java First Edition.
PROGRAMMING IN C#. Collection Classes (C# Programming Guide) The.NET Framework provides specialized classes for data storage and retrieval. These classes.
Object Oriented Software Development 4. C# data types, objects and references.
Inheritance and Class Hierarchies Chapter 3. Chapter 3: Inheritance and Class Hierarchies2 Chapter Objectives To understand inheritance and how it facilitates.
Inheritance and Class Hierarchies Chapter 3. Chapter Objectives  To understand inheritance and how it facilitates code reuse  To understand how Java.
Classes, Interfaces and Packages
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.
Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks.
Presented by Ted Higgins, SQL Server DBA An Introduction to Object – Oriented Programming.
C# Fundamentals An Introduction. Before we begin How to get started writing C# – Quick tour of the dev. Environment – The current C# version is 5.0 –
.Net Reflection Taipan Tamsare. Overview Reflection core concepts Exploring metadata Detail information Attributes Building Types at runtime.
METADATA IN.NET Presented By Sukumar Manduva. INTRODUCTION  What is Metadata ? Metadata is a binary information which contains the complete description.
INTRODUCTION BEGINNING C#. C# AND THE.NET RUNTIME AND LIBRARIES The C# compiler compiles and convert C# programs. NET Common Language Runtime (CLR) executes.
Part 1: Overview of LINQ Intro to LINQ Presenter: PhuongNQK.
Konstantinos pantos Software solutions architect Techaholics
Object-Oriented Design
Objects as a programming concept
C# - OOP TTU IT College , Autumn SEMESTER Andres käver.
Microsoft .NET Framework 4.0. Fundamentals
Ch 10- Advanced Object-Oriented Programming Features
2.7 Inheritance Types of inheritance
Module 5: Common Type System
Upgrading Your C# Programming Skills to Be a More Effective Developer
Array Array is a variable which holds multiple values (elements) of similar data types. All the values are having their own index with an array. Index.
Programming Language Concepts (CIS 635)
CS360 Windows Programming
Introduction to C# AKEEL AHMED.
.NET and .NET Core 5.2 Type Operations Pan Wuming 2016.
Programming in C# CHAPTER 1
.NET and .NET Core 9. Towards Higher Order Pan Wuming 2017.
Chapter 10 Thinking in Objects
6 Delegate and Lambda Expressions
.NET and .NET Core Foot View of .NET Pan Wuming 2017.
.NET and .NET Core 10. Enabling Contracts Pan Wuming 2017.
1.2 Key Concepts and Walkthroughs
Object Oriented Practices
Inheritance Inheritance is a fundamental Object Oriented concept
Fundaments of Game Design
CIS 199 Final Review.
Quiz Points 1 Rules Raise your hand if you know the question
5. 3 Coding with Denotations
Jim Fawcett CSE687 – Object Oriented Design Spring 2014
Chengyu Sun California State University, Los Angeles
Presentation transcript:

Microsoft .NET 3. Language Innovations Pan Wuming 2017

Topics Three New Languages Evolving From OO Paradigm Towards Higher Order: Expressiveness Towards Higher Order: Contract Enabled Towards Higher Order: Enhanced Dynamics Towards Higher Order: Compiling As Services Three new languages: C#, IL and F# Evolving from OO Paradigm Everything is object Members for Abstraction Accessibility for Encapsulation Inheritance and Polymorphism Solving name confliction and multi-inheritance Towards higher order: Expressiveness Delegate Lambda Expression Generic Attribute LINQ Compiler API Effective coding References: Common Type System(MSDN) .NET Framework Class Library Overview (MSDN) Inheritance (C# Programming Guide) (MSDN) Polymorphism (C# Programming Guide) (MSDN)

1. Three New Languages C# IL F#

2. Evolving from OO Paradigm Solving OO Defects Multi-inheritance Name conflicts Everything is object Members For Abstraction Accessibility for Encapsulation Inheritance And Polymorphism

Everything is object Classes Structures Enumerations Interfaces Delegates An assembly is a collection of types Each type is derived from Object Type Five Categories of Types

Single Double Boolean Object String Primitive data types Integer Byte SByte Int16 Int32 Int64 UInt16 UInt32 UInt64 Floating point Single Double Value type = Structure type Or Enumeration type Implicitly inherit from System.ValueType all primitive data types are defined as structures Logical Boolean Other Char Decimal IntPtr UIntPtr Class objects Object String

Members for Abstraction Fields Properties Events Constructors Methods Nested types Members for Abstraction

Accessibility for Encapsulation Traditional OO Accessibility Private Protected Public .NET Accessibility Internal Protected Internal Being Internal, a type or a member is accessible within the boundary of the assembly which contains it.

Inheritance and Polymorphism reuse, extend, and modify the behavior of base classes. Polymorphism At run time, objects of a derived class may be treated as objects of a base. Base classes may define and implement virtual methods, and derived classes can override them.

Solving name conflicts and multi-inheritance A derived class can have only one direct base class. A class or struct can implement multiple interfaces. Explicit implementation is used to resolve name conflicts of two interfaces. However, multi-inheritance without name conflict is a useful means for providing meaningful structure of a program.

3. Towards higher order: Expressiveness Delegate Lambda Expression Generic LINQ Extension method Effective Coding

Lambda Expression

Effective coding: Examples Indexers Foreach loop Partial Class Nullable Type Automatic implementation of Property Array Initialization Implicitly Typed Named and Optional Arguments Int? i=5; Instances of the System.Nullable<T> struct public string FirstName { get; set; } = "Jane"; int[] Numbers = { 0, 1, 2, 3, 4 }; var i = 1; var hw = "Hello World!";

4. Towards Higher Order: Contract Enabled Attribute Interact with other program Interact with compiler Example: Serialization Example: Platform Invoke Interact with CLR Example: Caller Information

Common Uses for Attributes Marking methods using the WebMethod attribute in Web services. Describing how to marshal method parameters when interoperating with native code. Describing the COM properties for classes, methods, and interfaces. Calling unmanaged code using the DllImportAttribute class. Describing your assembly in terms of title, version, description, or trademark. Describing which members of a class to serialize for persistence. Describing how to map between class members and XML nodes for XML serialization. Describing the security requirements for methods. Specifying characteristics used to enforce security. Controlling optimizations by the just-in-time (JIT) compiler. Obtaining information about the caller to a method.

5. Towards Higher Order: Enhanced Dynamics Type Class and Reflection Dynamic Language Runtime Dynamic languages can identify the type of an object at run time The ability to use a rapid feedback loop (REPL, or read-evaluate-print loop). Support for both top-down development and more traditional bottom-up development Easier refactoring and code modifications Dynamic languages make excellent scripting languages

Towards Higher Order: Compiling As Services Compiler API Scripting

See you next class Layperson Professional