280 likes | 450 Views
.NET 4.0 - Š ta je novo ?. Level 200 - 300. Ivan Pavlović, Hive Studios paki@hive-studios.com www.hive-studios.com MVP For Visual C#, Certified ScrumMaster MCSD, MCAD, MCDBA, MCT. Šta je posebno u v4?. CLR 4.0 prvi potpuno novi Framework nakon 2.0
E N D
.NET 4.0 - Šta je novo? Level200 - 300 Ivan Pavlović, Hive Studios paki@hive-studios.com www.hive-studios.com MVP For Visual C#, Certified ScrumMaster MCSD, MCAD, MCDBA, MCT
Šta je posebno u v4? • CLR 4.0 prvi potpuno novi Framework nakon 2.0 • 3.0 je dodao WPF, WCF, WFi CardSpace • 3.5 je dodao LINQi jezičke novine .NET 3.5 (2007) .NET 3.0 (2006) .NET 4.0 (Sada!) .NET 2.0 (2005) .NET 1.1 (2003) .NET 1.0 (2002)
Potsetnik: CLR je… ASP .net WPF WCF Win Forms DLR LINQ … Base Class Libraries Profiling & Debugging APIs CLR JIT & NGEN GC Security Model Exception Handling Loader & Binder
Agenda • CLR / Base Class Library • ThreadPool -> Parallel • Side By Side Execution • Dynamic Languages Support • Type Equivalence • WCF / WF / WPF / EF / MEF • A to nije sve
Type System • System.Numerics.BigIntiger • System.Numerics.ComplexNumber • System.Device.Location – lng/lat coords • IObservable<T> i IObserver<T> • Stream.CopyTo • INotifyCollectionChanged i ObservableCollection<T> su prebačeni u Base Class Library
Parallel Computing with .NET 4 • System.Threadingpoboljšanja • Krađa posla • Planinarski algoritmi - optimal no of threads 2. Coordination Data Structures (CDS) System.Collections.Concurrent 3. Task Parallel Library (TPL) 4. Parallel LINQ (PLINQ)
Parallel LINQ Parallel LINQ (PLINQ) minimal impactto existing LINQ code var q = from p in people where p.Name == queryInfo.Name && p.State == queryInfo.State && p.Year >= yearStart && p.Year <= yearEnd orderbyp.Year ascending select p; .AsParallel()
Zašto DLR? Dynamically-Typed Ruby Python Statically-Typed Dynamic Language Runtime VB C# Common Language Runtime
.NET Dynamic Programming IronPython IronRuby C# VB.NET Others… Dynamic Language Runtime Expression Trees Dynamic Dispatch Call Site Caching PythonBinder RubyBinder ObjectBinder JScriptBinder COMBinder
Kompatibilnost sa 2.0, 1.1 i 1.0 • .NET 4.0 gotovo 100% kompatibilan sa 2.0 • .NET 4.0 ne preuzima stare app automatski • Dodajte u config fajl direktivu za prelazak na 4.0 • Najbolje je da app koristi verziju .NET-a za koju je kompajlirana
CLR 2 - Existing Side-By-Side 2.0 add-in 3.0 add-in 1.1 add-in 3.5 add-in 3.5 .NET 1.1 3.0 .NET 2.0 Host Process (i.e. Outlook)
CLR 4 - In-Process Side-By-Side 2.0 add-in 3.0 add-in 3.5 add-in 4.0 add-in 3.5 .NET 4.0 3.0 .NET 2.0 Host Process (i.e. Outlook)
Type Equivalence Interop Assemblies translate between managed code and COM For each interface, struct, enum, delegate, and member, contains a managed equivalent with marshalling data
Platform Interop Assemblies • Kompajleriupakuju delove Interop biblioteke koju aplikacija zaista i koristi • CLR Runtimeobezbeđuje da se upakovane definicije tipova smatraju ekvivalentnim
Entity Framework 4.0 • POCO objekti • Praćenje promena • Spoljni ključevi • Lenjo učitavanje • ...
WCF • Simplified configuration • REST caching and help page • WS-Discovery (ad hoc, managed) • Routing • Simple byte stream encoding • Windows Workflow services • Hosting, Correlation
Windows Workflow • Designers (deo .NET-a) • Data Flow • Argumenti i varijable • Flowchart dijagram • Novi programski model • WorkflowElement • WCF integracija
WPF • Data Binding Support for DLR • Visual State Manager (VSM) • Ponovo je napisan Text Rendering • Manji setup paketi - .NET 4.0 Client Profile • Windows 7 • Multitouch, shell integration
WPF 4 Controls • Većina je prebačena iz • Ribbon • DataGrid • Calendar • DatePicker
Managed Extensibility Framework? The Managed Extensibility Framework (MEF) is a new library in the .NET Framework that enables greater reuse of applications and components. Using MEF, .NET applications can make the shift from being statically compiled to dynamically composed
Ostala predavanja 18.11.2009 Srđan Božović – C# 4.0, #B ,12:00 Stanko Nikolić - Parallel Computing, #26H ,17:30 19.11.2009 Dragoslav Ogar - Entity Framework 4.0 I i II, #31B, 09:00 Nenad Jovičić - WCF services with WF in .Net 4, #33C, 12:30
Molimo vas dapopuniteankete!Please fill out the evaluations! Vaše mišljenje čini osnovu sledeće Sinergije i omogućava nam da oblikujemo sadržaj u skladu sa Vašim željama. Svi posetioci koji popune ankete ulaze u nagradnu igru Your opinion forms the next Sinergija conference, and it provides us with the means to shape its content to best suit you. All attendees that fill out the evaluations are taking part in drawing of special prizes
Hvala Ivan Pavlović Hive Studios