Overview of.NET Framework Sanjay Vyas. Whats New In Base Class Library Declaration & consumption of extensibility points Monitoring for new runtime extension.

Slides:



Advertisements
Similar presentations
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Advertisements

© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Identity Management - Login © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
Parallel Performance Tools in Visual Studio 2010.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Feature: Reprint Outstanding Transactions Report © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
 Niklas Gustafsson Software Architect Microsoft Corporation TL22.
Feature: Purchase Requisitions - Requester © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
MIX 09 4/15/ :14 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Feature: Payroll and HR Enhancements © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
Parametric Sweeps Cluster SOA MPI LINQ to HPC Excel Cluster Deployment Monitoring Diagnostics Reporting Job submission API and portal.
Interactivity Navigating a data model Working with large quantities of data Entry Editing and adding data User feedback and validation Presentation.
Daniel Moth  Parallel Computing Platform Microsoft Corporation TL26.
Windows 7 Training Microsoft Confidential. Windows ® 7 Compatibility Version Checking.
 Tim Wagner Visual Studio Platform Dev Manager Microsoft Corporation TL32.
Gurinder CTO. Lisa Feigenbaum Microsoft Program Manager Visual Studio Languages
Feature: Purchase Order Prepayments II © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
Louis de Klerk Consultant Inobits Consulting DTL308.
Feature: OLE Notes Migration Utility
Feature: Web Client Keyboard Shortcuts © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
Feature: SmartList Usability Enhancements © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
Session 1.
Built by Developers for Developers…. © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
Introduction to .Net Framework
Feature: Assign an Item to Multiple Sites © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
Feature: Print Remaining Documents © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
NEXT: Overview – Sharing skills & code.
demo Receive Inventory Export Parse and Normalize.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Document Attachment –Replace OLE Notes © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
About Me Microsoft MVP Intel Blogger TechEd Israel, TechEd Europe Expert C++ Book
Feature: Customer Combiner and Modifier © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
Feature: Employee Self Service Timecard Entry © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
demo Instance AInstance B Read “7” Write “8”

customer.
Building State of the art presentation tiers Nauzad Kapadia
demo © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
Parallel Pattern Library Resource Manager Task Scheduler Task Parallel Library Task Parallel Library Parallel LINQ Managed Native Key: Threads Operating.
demo QueryForeign KeyInstance /sm:body()/x:Order/x:Delivery/y:TrackingId1Z
Feature: Suggested Item Enhancements – Analysis and Assignment © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and.
Windows Azure SQL Data Sync Name Title Microsoft Corporation.
projekt202 © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
The CLR CoreCLRCoreCLR © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks.
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
Language Integrated Query Mike Taulty Developer & Platform Group Microsoft Ltd

Joy Rathnayake Senior Architect – Virtusa Pvt. Ltd.
/* LIFE RUNS ON CODE*/ Konstantinos Pantos Microsoft MVP ASP.NET
Upgrading Your C# Programming Skills to Be a More Effective Developer
Title of Presentation 11/22/2018 3:34 PM
Office Mac /30/2018 © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Title of Presentation 12/2/2018 3:48 PM
F# for Parallel and Asynchronous Programming
ASP.NET 4 Core Runtime for Web Developers
Microsoft SharePoint Conference 2009 Jon Flanders
Visual Studio 2010 SharePoint Development Tools Overview
8/04/2019 9:13 PM © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Виктор Хаджийски Катедра “Металургия на желязото и металолеене”
Feature: Multi-user Editing Allowed in RMA Entry
How and When to Use MEF: Too Much Is Never Enough
Title of Presentation 5/12/ :53 PM
Шитманов Дархан Қаражанұлы Тарих пәнінің
Title of Presentation 5/24/2019 1:26 PM
Title of Presentation 7/24/2019 8:53 PM
Presentation transcript:

Overview of.NET Framework Sanjay Vyas

Whats New In Base Class Library Declaration & consumption of extensibility points Monitoring for new runtime extension Managed Extensibility Framework BigInteger ComplexNumber Tuple SortedSet New Data Types Memory Mapped Files Unified Cancelling Model I/O Improvements

Managed Extensibility Framework Create reusable components Don’t we already have reusable components? –No need to create infrastructure from scratch –MEF is dynamically composed What’s so dynamic about it –Current plugin model tied to specific apps –Same component cannot be used across apps –Discoverable at runtime –Tagging for rich queries and filtering

MEF Architecture

MEF Catalog –Discovers and maintain extensions CompositionContainer –Coordinate creations and satisfy dependencies ComposablePart –Offer one or more exports –May depend on imports for extension it uses

Managed Extensibiity Framework

New Language Features C# 4.0 Named Parameters Optional Parameters Dynamic Scoping Generic Variance Extension Property VB.NET 10 Statement Lambdas Multiline Lambdas Auto implemented Properties Collection Initializer Generic Variance Extension Property

Optional and Named Parameter Some methods have excessive parameters Too many overloads of methods Most aren’t used in everyday scenario Developers still have to supply default values Heavy use of Type.Missing Comma counting is a pain Difficult to remember parameter by position

Overload Of Overloads class Book { // Multiple constructors Book() : this(“”, “”, “”, ) { } Book(string isbn) : this(isbn, “”, “”, 0) { } Book(string isbn, string title) : this(isbn, title, “”, 0) { } Book(string isbn, string title, string author) : this(isbn, title, author, 0) { } // Master Constructor which gets called by others Book(string isbn, string title, string author, int pages) { // Do the actual work here }

Optional Parameters class Book { // Use optional parameters Book(string isbn=“”, string title=“”, string author=“”, int pages=0) { // Do the actual work here } : Book book = new Book(“ ”); Book book = new Book(“ ”, “How not to code”); Book book = new Book(“ ”, “How not to code”, “Copy Paster”); Book book = new Book(“ ”, 240); // Cannot skip parameters

Named Parameter class Book { // Use optional parameters Book(string isbn=“”, string title=“”, string author=“”, int pages=0) { // Do the actual work here } : Book book = new Book(isbn:“ ”); Book book = new Book(isbn:“ ”, title:“How not to code”); Book book = new Book(isbn:“ ”, title:“How not to code”, author:“Copy Paster”); Book book = new Book(isbn:“ ”, pages:240);

Dynamic scoping C# is static type languages –Types are explicitly defined –Methods are bound at runtime Dynamic dispatch exists –Reflection API –Method.Invoke() is tedious COM Automation is based on IDispatch –May not have.TLB –Lookup can be purely runtime Certain Application Types require Dynamism –E.g. SOAP/REST proxies

Dynamic in.NET 4.0 CLR is mostly static type –Compile time type checking (e.g. IUnknown) DLR added dynamism to.NET –Run time type checking (e.g. IDispatch) DLR is now part of.NET 4.0 API –Full support of IronRuby, IronPython –Dynamic dispatch now built into.NET/C#

Dynamic Dispatch Introduction of type – dynamic –Compiler merely packages information –Compiler defers binding to runtime Built-in support for COM Calls –Uses IDispatch interface –PIA not required Runtime binding for framework objects Build your own – IDynamicObject –IronPython, IronRuby use this –E.g. RestProxy

Dynamic Data Type Isnt Object type dynamic already?.NET already has var, why add dynamic? Object – Static type, base class var – is ALSO static type, compiler inferred dynamic – Evaluation deferred

Dynamic implementation dynamic d = GetFlyingObject(“Superman”); d.Fly(); // Up, up and away dynamic d = GetFlyingObject(“AirPlane”); d.Fly(); // Take off dynamic d = GetFlyingObject(“Cat”); d.Fly(); // OOPS… but at runtime

Dynamic Dispatch

Variance Covariance –Similar to base reference to derived class –Covariance is applied to arrays, delegates.. Contravariance –Similar to derived instance passed to base

Changes to Variance Variance can now be applied to Interfaces –Variant types supports interfaces and delegates –Variance applies to reference conversion only –Value types are not supported Covariance –Requires the use of “out” keyword Contravariant –Requires the use of “in” keyword It could be automatically inferred but that could lead to code-breaking when interface definition changes

Variance

Code Contracts Foundation –Design by contract –Based on MSR’s SPEC# What does it bring? –Improved testability –Static verification –API Documentation How does it help? –Guarantee obligations on entry (parameter validations) –Guarantee property at exit (return value range) –Maintain property during execution (object invariance)

Code Contracts New namespace in.NET –System.Diagnostics.Contracts Parameter validation –Contract.Requires() Return value guarantee –Contract.Ensures() Object state guarantee –Contract.Invariant()

Code Contracts Compile generates the IL code Contracts are conditionally compiled Define CONTRACTS_FULL to enable

Code Contracts

Parallelism in.NET 4.0 Don’t we have multithreading and ThreadPool? –Requires too much work –Requires understanding of nitty-gritties –Bifurcated thinking for single CPU vs. multi What does parallelism bring in? –Make multicore programming simple –Automatcially handle single vs. multicore –Focus on “what” rather than “how”

Visual Studio 2010 Tools / Programming Models / Runtimes Parallel Pattern Library Resource Manager Task Scheduler Task Parallel Library Task Parallel Library PLINQ Managed Library Native Library Key: Threads Operating System Concurrency Runtime Programming Models Agents Library Agents Library ThreadPool Task Scheduler Resource Manager Data Structures Integrated Tooling Tools Parallel Debugger Toolwindows Parallel Debugger Toolwindows Profiler Concurrency Analysis Profiler Concurrency Analysis Programming Models Concurrency Runtime

Parallels in.NET Task Parallel Library (TPL) –Task and Data Parallelism LINQ to Parallel (PLINQ) –Use LINQ to implement parallelism on queries Coordinated Data Structures –High performance collection classes which are lock free and thread safe Parallel Diagnostic Tools –Parallels Debugger and VSTS Profiler concurrency view

Program Thread CLR Thread Pool User Mode Scheduler Global Queue Global Queue Worker Thread 1 Worker Thread p

CLR Thread Pool: Work-Stealing Worker Thread 1 Worker Thread p Program Thread User Mode Scheduler For Tasks Global Queue Global Queue Local Queue Local Queue Local Queue Local Queue Task 1 Task 2 Task 3 Task 5 Task 4 Task 6

Task Parallel Library Write code which automatically uses multicore Expose potential parallelism in sequential code No language extension (aka Syntactic sugar) yet Parallelism types –The Task Class – Task Parallelism –The Parallel Class – Data Parallelism Task Management –TaskManager class –Use default or create your own

Task Parallel Library

Resources Software Application Developers Infrastructure Professionals

© 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.