lap around the .net framework 4
Post on 07-Apr-2018
215 Views
Preview:
TRANSCRIPT
-
8/6/2019 Lap Around the .NET Framework 4
1/35
Visual Studio 2010 andVisual Studio 2010 and
.NET Framework 4.NET Framework 4
NameNameTitleTitle
Microsoft CorporationMicrosoft Corporation
-
8/6/2019 Lap Around the .NET Framework 4
2/35
A Look BackA Look Back
.NET 1.0 .NET 1.1 .NET 2.0
3.0
3.5
.NET 4
2002 2003 2008 CTP2005-08
CLR 1.0 CLR 1.1 CLR 2.0 CLR 4
SP1
-
8/6/2019 Lap Around the .NET Framework 4
3/35
The .NET FrameworkThe .NET Framework
BaseClassLibraries
The CLRJIT &
NGENGarbage
CollectorSecurity
ModelException
HandlingLoader &
Binder
WPFWin
FormsDLR
ASP.NET
WCFAnd
more!LINQ
-
8/6/2019 Lap Around the .NET Framework 4
4/35
Client ApplicationsClient Applications
WPF 4
MEF
Web ApplicationsWeb Applications
Web Forms 4
AJAX 4
Client/ServerClient/Server
WCF 4
-
8/6/2019 Lap Around the .NET Framework 4
5/35
The Building BlocksThe Building Blocks
Parallel ComputingParallel Computing
Task ParallelLibrary
ParallelLINQ
Data AccessData Access
Entity Framework 4
Data Services 1.5
RuntimeRuntime
DLR Integration
Type Equivalence
In-Process SxS
-
8/6/2019 Lap Around the .NET Framework 4
6/35
Web Forms 4 - ClientIDWeb Forms 4 - ClientID
1) UserControl (No ID)
2) UserControl (HeaderForm)
ControlHierarchy
3) DropDownList(States)
Resulting Client IDs:1) ctl00
2) ctl00_HeaderForm
3) ctl00_HeaderForm_States
-
8/6/2019 Lap Around the .NET Framework 4
7/35
Web Forms 4 - RoutingWeb Forms 4 - Routing
Request:Products/Bikes
ASP.NET Routing
Route:Product/{name} -> Product.aspx
WebForms Page
File Name:
Product.aspx
Route Values:Name = Bikes
Response
-
8/6/2019 Lap Around the .NET Framework 4
8/35
ASP.NET Web Forms 4ClientId / Routing
ASP.NET Web Forms 4ClientId / Routing
-
8/6/2019 Lap Around the .NET Framework 4
9/35
WPFWPF
Data Grid
Ribbon
Multi-Touch
Windows 7 Enhancements
-
8/6/2019 Lap Around the .NET Framework 4
10/35
Managed ExtensibilityFramework?
Managed ExtensibilityFramework?
TheManaged Extensibility Framework (MEF) isa
new library inthe .NET Frameworkthatenablesgreaterreuseofapplicationsandcomponents. UsingMEF, .NET applicationscanmaketheshiftfrombeingstaticallycompiledtodynamicallycomposed
-
8/6/2019 Lap Around the .NET Framework 4
11/35
Open/Closed PrincipleOpen/Closed Principle
Softwareentitiesshouldbe
openforextension,butclosedfor modification.
-
8/6/2019 Lap Around the .NET Framework 4
12/35
Known vs.Unknown
-
8/6/2019 Lap Around the .NET Framework 4
13/35
Client ApplicationsWPF 4 DataGrid / MEFClient ApplicationsWPF 4 DataGrid / MEF
-
8/6/2019 Lap Around the .NET Framework 4
14/35
Entit Fr ew rEntit Fr ew r
Model-First
POCO
LazyLoading
ForeignKeys
-
8/6/2019 Lap Around the .NET Framework 4
15/35
A lot of new for WF/WCF 4A lot of new for WF/WCF 4
XAML-onlyworkflowsarethenewdefault
Unified model between WF, WCF, and WPF
ExtendedbaseactivitylibrarySimplifiedWF programmingmodel
Supportforarguments, variables, expressions
MajorimprovementstoWCF integration
Runtimeanddesignerimprovements
ServicediscoveryforWCF
Hosting & managementvia "Dublin
-
8/6/2019 Lap Around the .NET Framework 4
16/35
ADO. ETData ervi e 1.5ADO. ETData ervi e 1.5
Server EnhancementsRow count
Server-side paging
Friendly feedsBLOB streams
ClientEnhancements
Row CountWPF/SL data binding
-
8/6/2019 Lap Around the .NET Framework 4
17/35
ADO.NET Data Ser icesRo Count andSer er-Side
Paging
ADO.NET Data Ser icesRo Count andSer er-Side
Paging
-
8/6/2019 Lap Around the .NET Framework 4
18/35
The Parallel Computing Initiati eThe Parallel Computing Initiati e
Lettingthebrightest developers solvebusiness problems, notconcurrency
problems.
Concurrency forthemasses
-
8/6/2019 Lap Around the .NET Framework 4
19/35
Parallel Computing with .NET 4Parallel Computing with .NET 4
1. Task ParallelLibrary (TPL)
2. ParallelLINQ (PLINQ)
3. CoordinationData Structures (CDS)
4. System.Threading Improvements
-
8/6/2019 Lap Around the .NET Framework 4
20/35
Parallel LINQParallel LINQ
ParallelLINQ (PLINQ) enablesdeveloperstoeasilyleveragemanycore withaminimal impact toexistingLINQ programmingmodel
var q = from p in people
where p.Name == queryInfo.Name &&
p.State == queryInfo.State &&
p.Year >= yearStart &&p.Year
-
8/6/2019 Lap Around the .NET Framework 4
21/35
Parallel ComputingParallel LINQ (PLINQ)
Parallel ComputingParallel LINQ (PLINQ)
-
8/6/2019 Lap Around the .NET Framework 4
22/35
CommonLanguageRuntime
Statically-Typed
C#VB
RubyPython
Dynamically-Typed
Why the DLR?Why the DLR?
-
8/6/2019 Lap Around the .NET Framework 4
23/35
CommonLanguageRuntime
Statically-Typed
C#VB
RubyPython
Dynamically-Typed
DynamicLanguageRuntime
Why the DLR?Why the DLR?
-
8/6/2019 Lap Around the .NET Framework 4
24/35
PythonBinder
RubyBinder
COMBinder
JScri tBinder
ObjectBinder
.NET Dynamic Programming.NET Dynamic Programming
DynamicLanguageRuntime
Expression TreesExpression Trees DynamicDispatchDynamicDispatch CallSiteCachingCallSiteCaching
IronPython IronRuby C# VB.NET Others
-
8/6/2019 Lap Around the .NET Framework 4
25/35
Dynamically Typed ObjectsDynamically Typed Objects
Calculator calc = GetCalculator();
int sum = calc.Add(10, 20);
object calc = GetCalculator();
Type calcType = calc.GetType();
object res = calcType.InvokeMember("Add",
BindingFlags.InvokeMethod, null,
new object[] { 10, 20 });
int sum = Convert.ToInt32(res); ScriptObject calc = GetCalculator();
object res = calc.Invoke("Add", 10, 20);
int sum = Convert.ToInt32(res);
dynamic calc = GetCalculator();int sum = calc.Add(10, 20);
Staticallytypedtobedynam
ic
Dynamicmethodinvocation
Dynamicconversion
-
8/6/2019 Lap Around the .NET Framework 4
26/35
DLR IntegrationDLR Integration
-
8/6/2019 Lap Around the .NET Framework 4
27/35
Type EquivalenceType Equivalence
Interop Assembliestranslatebetweenmanaged codeandCOM
Foreachinterface,struct,enum,
delegate,andmember, containsa
managedequivalentwithmarshallingdata
-
8/6/2019 Lap Around the .NET Framework 4
28/35
However!However!
Primary Interop Assembliescausemany pain points
-
8/6/2019 Lap Around the .NET Framework 4
29/35
Go Away, PIA!Go Away, PIA!
1. Compilersembed theportionsoftheinterop assembliesthattheadd-ins
actually use
2. Runtimeensures theembedded
definitionsofthesetypesareconsidered equivalent
-
8/6/2019 Lap Around the .NET Framework 4
30/35
CLR 4Type Equivalence
CLR 4Type Equivalence
-
8/6/2019 Lap Around the .NET Framework 4
31/35
. ETFramew r mpatibilit. ETFramew r mpatibilit
.NET 4.0 isahighlycompatiblerelease
.NET 4.0 doesnotautorollforwardYou must add a configuration file with a specific switch to get 3.5
apps to run on 4.0
-
8/6/2019 Lap Around the .NET Framework 4
32/35
. ETFramew r mpatibilit. ETFramew r mpatibilit
Hang on if 4.0 is compatible,why not run 3.5 apps
automatically on 4.0?
The BEST thing is always to prefer
running on the version of the
framework you built against
-
8/6/2019 Lap Around the .NET Framework 4
33/35
CLR 2 - Existing Side-By-SideCLR 2 - Existing Side-By-Side
HostProcess (i.e. Outlook)
.NET 2.0
2.0add-in
3.03.5
3.0add-in
3.5add-in
1.1add-in
.NET 1.1
-
8/6/2019 Lap Around the .NET Framework 4
34/35
CLR 4 - In-Process Side-By-SideCLR 4 - In-Process Side-By-Side
.NET 2.0.NET 4.0
2.0add-in
3.03.5
HostProcess (i.e. Outlook)
3.0add-in
3.5add-in
4.0add-in
-
8/6/2019 Lap Around the .NET Framework 4
35/35
Vi al t i 010 Training KitVi al t i 010 Training Kit
Downloadathttp://tinyurl.com/vs2010trainingkit
top related