+ All Categories
Home > Documents > Louis de Klerk Consultant Inobits Consulting DTL308.

Louis de Klerk Consultant Inobits Consulting DTL308.

Date post: 24-Dec-2015
Category:
Upload: magnus-reynolds
View: 215 times
Download: 0 times
Share this document with a friend
Popular Tags:
26
Transcript
Page 1: Louis de Klerk Consultant Inobits Consulting DTL308.
Page 2: Louis de Klerk Consultant Inobits Consulting DTL308.

Future Directions for Visual Basic

Louis de KlerkConsultantInobits ConsultingDTL308

Page 3: Louis de Klerk Consultant Inobits Consulting DTL308.

The Evolution of Visual Basic

Visual Basic 1.0-3.0

Visual Basic 4.0-6.0

Visual Basic 7.0-9.0

Visual Basic 10.0

Visual Basic 11.0+

Page 4: Louis de Klerk Consultant Inobits Consulting DTL308.

VB's Fraternal Twin: C#Co-Evolution

Page 5: Louis de Klerk Consultant Inobits Consulting DTL308.

Trends

Declarative

ConcurrentDynamic

Page 6: Louis de Klerk Consultant Inobits Consulting DTL308.

Declarative Programming

What

How

Imperative Declarative

Page 7: Louis de Klerk Consultant Inobits Consulting DTL308.

Dynamic vs. Static

DynamicLanguages

Simple and succinct

Implicitly typed

Meta-programming

No compilation

StaticLanguages

Robust

Performant

Intelligent tools

Better scaling

Page 8: Louis de Klerk Consultant Inobits Consulting DTL308.

Concurrency

Page 9: Louis de Klerk Consultant Inobits Consulting DTL308.

VB10 Language Featuresdemo

Page 10: Louis de Klerk Consultant Inobits Consulting DTL308.

Auto-implemented Properties

Property FirstName As StringProperty LastName As String

Initializers:Property ID As Integer = -1Property Suppliers As New List(Of Supplier)

Page 11: Louis de Klerk Consultant Inobits Consulting DTL308.

Collection Initializers

Dim x As New List(Of Integer) From {1, 2, 3}

Dim list As New Dictionary(Of Integer, String) From{{1, “Bart”}, {2, “Lisa”}, {3, “Homer”}}

Array Literals:Dim a = {1, 2, 3} 'infers Integer()Dim b = {1, 2, 3.5} 'infers Double()

Page 12: Louis de Klerk Consultant Inobits Consulting DTL308.

Statement Lambdas

Dim items = {1, 2, 3, 4, 5}

Array.ForEach(items, Sub(n) Console.WriteLine(n))

Array.ForEach(items, Sub(n) If n Mod 2 = 0 Then Console.WriteLine(n) End Sub)

'Count the number of even items in the arrayDim total = items.Count(Function(n) Return (n Mod 2 = 0) End Function)

Page 13: Louis de Klerk Consultant Inobits Consulting DTL308.

Implicit Line Continuation

<Attribute()> Function Go( ByVal x As Integer, ByVal y As Integer )

Dim query = From n In { 123, 456, } Order By n Select n + x

Page 14: Louis de Klerk Consultant Inobits Consulting DTL308.

PythonBinder

RubyBinder

COMBinder

JavaScriptBinder

ObjectBinder

.NET Dynamic Programming

Dynamic Language Runtime

Expression Trees Dynamic Dispatch Call Site Caching

IronPython IronRuby C# VB.NET Others…

Page 15: Louis de Klerk Consultant Inobits Consulting DTL308.

Calling Python from VB.NETdemo

Page 16: Louis de Klerk Consultant Inobits Consulting DTL308.

Interop with Dynamic Languages

'Load a file from Python into memoryDim random As Object = python.UseFile("random.py")

Dim items = {1, 2, 3, 4, 5, 6, 7} 'Dynamic (late-bound) call to Python functionrandom.shuffle(items)

'Print out the shuffled arrayArray.ForEach(items, Sub(n) Console.WriteLine(n))

Page 17: Louis de Klerk Consultant Inobits Consulting DTL308.

Generic Variance

Dim apples As IEnumerable(Of Apple) = New List(Of Apple)

'Covariance (Apple inherits from Fruit)Dim fruits As IEnumerable(Of Fruit) = apples

'Contravariance - Func(Of In T, Out R)Dim predicate As Func(Of Fruit, Boolean) = Function(f) f.Color = "Red" apples.Where(predicate)

Page 18: Louis de Klerk Consultant Inobits Consulting DTL308.

Compiling without PIAs

• Use PIAs at design-time, not runtime

• No need to deploy PIA to user’s machine

• Compiler embeds the specific members of the specific types used into your assembly. (Prevents assembly from becoming bloated)

Page 19: Louis de Klerk Consultant Inobits Consulting DTL308.

Compiler as a Service

CompilerCompilerSource codeSource code

SourceFile

Source codeSource code

.NET Assembly

Class

Field

public Foo

private

string

X

Meta-programming Read-Eval-Print Loop

LanguageObject Model

DSL Embedding

Page 20: Louis de Klerk Consultant Inobits Consulting DTL308.

Track Resources

VB Team Blog – http://blogs.msdn.com/vbteam

Beth Massi's Blog – http://blogs.msdn.com/bethmassi

MSDN VBasic Site – http://msdn.com/vbasic

Page 21: Louis de Klerk Consultant Inobits Consulting DTL308.

Related Sessions ( .NET 4)When What Area Code

Mon 8:00 Future Directions for Visual Basic Languages DTL308

Mon 17:15 The State of Dynamic Languages on the Microsoft .NET Framework

Languages DTL304

Tues 9:15 Introduction to F# Languages DTL:319

Tues 16:15 The Future of C# Languages DTL310

Mon 9:15 The Manycore Shift: Making Parallel Computing Mainstream

CLR/BCL DTL206

Tues 17:30 Managed Extensibility Framework CLR/BCL DTL315

Tues 14:30 A First Look at WCF and WF in the Microsoft .NET Framework 4.0

Middle SOA201

Mon 17:15 The ADO.NET Entity Framework 4 Data DTL402

Tues 17:30 An Introduction to the ADO.NET Data Services Framework v1.5

Data DTL208

Page 22: Louis de Klerk Consultant Inobits Consulting DTL308.

Related Sessions ( .NET 4)TIme Topic Area Code

Mon 15:45 Building Scalable and Available Web Applications with the Microsoft Code Name "Velocity"

Web WUX301

Tues 10:50 A Lap around Microsoft ASP.NET 4.0 and Microsoft Visual Studio 2010

Web WUX203

Wed 9:00 Taking AJAX to the Next Level** Web WUX306

Mon 8:00 Building Rich Business Clients in WPF: New Tools and Controls for Windows Presentation Foundation

Client WUX303

Tues 13:15 Microsoft Visual Studio 2010 Overview for the Business Application Developer

General DTL309

Page 23: Louis de Klerk Consultant Inobits Consulting DTL308.

www.microsoft.com/teched

International Content & Community

http://microsoft.com/technet

Resources for IT Professionals

http://microsoft.com/msdn

Resources for Developers

www.microsoft.com/learning

Microsoft Certification & Training Resources

Resources Tech·Ed Africa 2009 sessions will be made available for download the week after the event from: www.tech-ed.co.za

Page 24: Louis de Klerk Consultant Inobits Consulting DTL308.

Complete a session evaluation and enter to win!

10 pairs of MP3 sunglasses to be won

Page 25: Louis de Klerk Consultant Inobits Consulting DTL308.

question & answer

Page 26: Louis de Klerk Consultant Inobits Consulting DTL308.

© 2009 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.


Recommended