/
John Daintree John Daintree

John Daintree - PowerPoint Presentation

jane-oiler
jane-oiler . @jane-oiler
Follow
372 views
Uploaded On 2017-01-18

John Daintree - PPT Presentation

Data Binding Reloaded Data Binding 2013 Data Binding Reloaded 2014 Data Binding Revolutions 2015 The Databinding Trilogy Slide 2 CENSORED Slide 3 COPYRIGHTED Slide 4 Turns out I cant even do a Matrix gag at an APL User Meeting ID: 511292

win binding data mysource binding win mysource data filter listbox dyalognames setbinding binding

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "John Daintree" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

John Daintree

Data Binding ReloadedSlide2

Data Binding (2013)Data Binding Reloaded (2014)Data Binding Revolutions (2015)

The Databinding TrilogySlide3

Slide 2

CENSOREDSlide4

Slide 3

COPYRIGHTEDSlide5

Slide 4

Turns out I can't even do a "Matrix" gag at an APL User Meeting.No, hold on, sorry, Conference.Ah, no. As you were, I was right the first time. User Meeting. Yeah, that's it.Slide6

What is Data Binding?

A software design pattern that allows the separation of Business Logic from User Interface"Separate the Data from the UI"Used throughout Windows Presentation Foundation (WPF)Slide7

USING←,⊂'System.Windows.Controls,WPF/PresentationFramework.dll'⎕USING,←⊂'System.Windows,WPF/PresentationFramework.dll'f←⎕NEW Window ⋄ f.SizeToContent←f.SizeToContent.WidthAndHeightsp←⎕NEW StackPanelwp←⎕NEW

WrapPanel

filter

←⎕NEW

TextBox

filter.Margin

←⎕NEW Thickness 5

all

←⎕NEW

ListBox

all.Margin

←⎕NEW Thickness 5

filtered

←⎕NEW

ListBox

filtered.Margin←⎕NEW Thickness 5filter.Width←280 ⋄ all.Width←135 ⋄ filtered.Width←135(all filtered).Height←340{}wp.Children.Add¨all filtered{}sp.Children.Add¨filter wpf.Content←sp ⋄ f.Show

WPF in codeSlide8

XAML

Extensible Application Markup LanguageSlide9

<

Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x

=

"

http://schemas.microsoft.com/

winfx

/2006/

xaml

"

SizeToContent

=

"

WidthAndHeight

"

>

<

StackPanel

>

<TextBox Name="filter" Margin=

"5

"

/>

<WrapPanel> <ListBox Name="all" Width="135" Height="340" Margin="5"/> <ListBox Name="filtered" Width="135" Height="340" Margin="5"/> </WrapPanel> </StackPanel></Window>

WPF in XAML

{

XamlReader.Load

⎕NEW

XmlTextReader

(⎕NEW

StringReader

(

⊂⍵)}Slide10

<

Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x

=

"

http://schemas.microsoft.com/

winfx

/2006/

xaml

"

SizeToContent

=

"

WidthAndHeight

"

>

<

StackPanel

>

<TextBox Name="filter" Margin=

"5

"

/>

<WrapPanel> <ListBox Name="all" Width="135" Height="340" Margin="5"/> <ListBox Name="filtered" Width="135" Height="340" Margin="5"/> </WrapPanel> </StackPanel></Window>

WPF in XAML

<

StackPanel

>

<

WrapPanel

>Slide11

<

Torso x:Name="myBody"> <Lung Alignment="Left"/> <Lung

Alignment

="Right"/>

<

Heart

Blood

="{

Binding

myBlood

,

Mode

=

TwoWay

}"/>

<

Stomach

Full="True"/> <Abs SixPack="False"/> </Torso

>

More WPF / XAMLSlide12

<

Torso x:Name="myBody"> <Lung Alignment="Left"/> <Lung

Alignment

="Right"/>

<

Heart

Blood

="{

Binding

myBlood

,

Mode

=

TwoWay

}"/>

<

Stomach

Full="True"/> <Abs SixPack="True"/></Torso

>

More WPF / XAMLSlide13

Anatomy of a bind

"Text" Property

A workspace

char array

nested array

"ItemsSource" Property

Source

Source

Binding

namespace

Source

Binding

Binding

Binding

"ItemsSource" PropertySlide14

Anatomy of a bind

"Text" Property

A workspace

char array

nested array

"ItemsSource" Property

Source

Source

Binding

namespace

Source

Binding

Binding

Binding

"ItemsSource" PropertySlide15

"Text" Property

A workspace

char array

nested array

"ItemsSource" Property

Source

Source

Binding

namespace

Source

Binding

Binding

Binding

"ItemsSource" Property

2015⌶

(or APL, or XAML)

APL (or XAML)Slide16

"Text" Property

char array

nested array

"ItemsSource" Property

namespace

"ItemsSource" Property

A workspaceSlide17

"Text" Property

"ItemsSource" Property

namespace

"ItemsSource" Property

A workspaceSlide18

Slide 17

DyalogNames←'John Daintree' 'Morten Kromberg' 'et al' win←⎕NEW Window ⋄ win.Topmost←1 win.(Top Left Width)←50 500 500 win.lb←⎕NEW ListBox win.Content←win.lb win.lb.ItemsSource←2015⌶'DyalogNames' win.ShowSlide19

Slide 18

DyalogNames←'John Daintree' 'Morten Kromberg' 'et al' win←⎕NEW Window ⋄ win.Topmost←1 win.(Top Left Width)←50 500 500 win.lb←⎕NEW ListBox win.Content←win.lb win.lb.ItemsSource←2015⌶'DyalogNames' win.ShowSlide20

Slide 19

MySource←⎕NS'' MySource.Filter←'' MySource.FilteredList←0⍴⊂'' MySource.DyalogNames←DyalogNames win.DataContext←src ← 2015⌶'MySource' binding←⎕NEW Data.Binding(⊂'FilteredList') win.filtered.SetBinding ListBox.ItemsSourceProperty binding

binding←⎕

NEW

Data.Binding

(⊂'

DyalogNames

')

win.all.SetBinding

ListBox.ItemsSourceProperty

binding

binding←⎕NEW

Data.Binding

(⊂'Filter')

binding.Mode←Data.BindingMode.TwoWay

binding.UpdateSourceTrigger←Data.UpdateSourceTrigger.PropertyChanged win.filter.SetBinding TextBox.TextProperty binding src.onElementChanged←'element_changed'Slide21

Slide 20

MySource←⎕NS'' MySource.Filter←'' MySource.FilteredList←0⍴⊂'' MySource.DyalogNames←DyalogNames win.DataContext←src ← 2015⌶'MySource' binding←⎕NEW Data.Binding(⊂'FilteredList

')

win.filtered.SetBinding

ListBox.ItemsSourceProperty

binding

binding←⎕

NEW

Data.Binding

(⊂'

DyalogNames

')

win.all.SetBinding

ListBox.ItemsSourceProperty

binding binding←⎕NEW Data.Binding(⊂'Filter') binding.Mode←Data.BindingMode.TwoWay binding.UpdateSourceTrigger←Data.UpdateSourceTrigger.PropertyChanged win.filter.SetBinding TextBox.TextProperty binding src.onElementChanged←'element_changed'Slide22

Slide 21

MySource←⎕NS'' MySource.Filter←'' MySource.FilteredList←0⍴⊂'' MySource.DyalogNames←DyalogNames win.DataContext←src ← 2015⌶'MySource' binding←

⎕NEW

Data.Binding

(⊂'

FilteredList

')

win.filtered.SetBinding

ListBox.ItemsSourceProperty

binding

binding←⎕

NEW

Data.Binding

(⊂'

DyalogNames

')

win.all.SetBinding ListBox.ItemsSourceProperty binding binding←⎕NEW Data.Binding(⊂'Filter') binding.Mode←Data.BindingMode.TwoWay binding.UpdateSourceTrigger←Data.UpdateSourceTrigger.PropertyChanged win.filter.SetBinding TextBox.TextProperty binding src.onElementChanged←'element_changed'Slide23

Slide 22

MySource←⎕NS'' MySource.Filter←'' MySource.FilteredList←0⍴⊂'' MySource.DyalogNames←DyalogNames win.DataContext←src ← 2015⌶'MySource'

binding←

⎕NEW

Data.Binding

(⊂'

FilteredList

')

win.filtered.SetBinding

ListBox.ItemsSourceProperty

binding

binding←⎕

NEW

Data.Binding

(⊂'

DyalogNames') win.all.SetBinding ListBox.ItemsSourceProperty binding binding←⎕NEW Data.Binding(⊂'Filter') binding.Mode←Data.BindingMode.TwoWay binding.UpdateSourceTrigger←Data.UpdateSourceTrigger.PropertyChanged win.filter.SetBinding TextBox.TextProperty binding src.onElementChanged←'element_changed'Slide24

Slide 23

MySource←⎕NS'' MySource.Filter←'' MySource.FilteredList←0⍴⊂'' MySource.DyalogNames←DyalogNames win.DataContext←src ← 2015⌶'MySource'

binding←

⎕NEW

Data.Binding

(⊂'

FilteredList

')

win.filtered.SetBinding

ListBox.ItemsSourceProperty

binding

binding←⎕

NEW

Data.Binding

(⊂'DyalogNames') win.all.SetBinding ListBox.ItemsSourceProperty binding binding←⎕NEW Data.Binding(⊂'Filter') binding.Mode←Data.BindingMode.TwoWay binding.UpdateSourceTrigger←Data.UpdateSourceTrigger.PropertyChanged win.filter.SetBinding TextBox.TextProperty binding src.onElementChanged←'element_changed'Slide25

Slide 24

MySource←⎕NS'' MySource.Filter←'' MySource.FilteredList←0⍴⊂'' MySource.DyalogNames←DyalogNames win.DataContext←src ← 2015⌶'MySource'

binding←

⎕NEW

Data.Binding

(⊂'

FilteredList

')

win.filtered.SetBinding

ListBox.ItemsSourceProperty

binding

binding←⎕

NEW

Data.Binding

(⊂'

DyalogNames') win.all.SetBinding ListBox.ItemsSourceProperty binding binding←⎕NEW Data.Binding(⊂'Filter') binding.Mode←Data.BindingMode.TwoWay binding.UpdateSourceTrigger←Data.UpdateSourceTrigger.PropertyChanged win.filter.SetBinding TextBox.TextProperty binding src.onElementChanged←'element_changed'Slide26

Slide 25

MySource←⎕NS'' MySource.Filter←'' MySource.FilteredList←0⍴⊂'' MySource.DyalogNames←DyalogNames win.DataContext←src ← 2015⌶'MySource'

binding←

⎕NEW

Data.Binding

(⊂'

FilteredList

')

win.filtered.SetBinding

ListBox.ItemsSourceProperty

binding

binding←⎕

NEW

Data.Binding

(⊂'

DyalogNames') win.all.SetBinding ListBox.ItemsSourceProperty binding binding←⎕NEW Data.Binding(⊂'Filter') binding.Mode←Data.BindingMode.TwoWay binding.UpdateSourceTrigger←Data.UpdateSourceTrigger.PropertyChanged win.filter.SetBinding TextBox.TextProperty binding src.onElementChanged←'element_changed'Slide27

Slide 26

MySource←⎕NS'' MySource.Filter←'' MySource.FilteredList←0⍴⊂'' MySource.DyalogNames←DyalogNames win.DataContext←src ← 2015⌶'MySource'

binding←

⎕NEW

Data.Binding

(⊂'

FilteredList

')

win.filtered.SetBinding

ListBox.ItemsSourceProperty

binding

binding←⎕

NEW

Data.Binding

(⊂'

DyalogNames') win.all.SetBinding ListBox.ItemsSourceProperty binding binding←⎕NEW Data.Binding(⊂'Filter') binding.Mode←Data.BindingMode.TwoWay binding.UpdateSourceTrigger←Data.UpdateSourceTrigger.PropertyChanged win.filter.SetBinding TextBox.TextProperty binding src.onElementChanged←'element_changed'Slide28

Slide 27

MySource←⎕NS'' MySource.Filter←'' MySource.FilteredList←0⍴⊂'' MySource.DyalogNames←DyalogNames src←2015⌶'MySource' src.onElementChanged←'element_changed' win←ReadXaml InputWithBindingXaml win.Show win.DataContext←srcSlide29

Slide 28

MySource←⎕NS'' MySource.Filter←'' MySource.FilteredList←0⍴⊂'' MySource.DyalogNames←DyalogNames src←2015⌶'MySource' src.onElementChanged←'element_changed' win←ReadXaml InputWithBindingXaml win.Show

win.DataContext

srcSlide30

Slide 29

MySource←⎕NS'' MySource.Filter←'' MySource.FilteredList←0⍴⊂'' MySource.DyalogNames←DyalogNames src←2015⌶'MySource' src.onElementChanged←'element_changed' win←ReadXaml InputWithBindingXaml win.Show

win.DataContext

srcSlide31

Slide 30

<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" SizeToContent="WidthAndHeight" Topmost="true"> <StackPanel> <TextBox Name="filter" Margin="5" Text="{Binding Filter,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>

<

WrapPanel

>

<

ListBox

Name="all" Width="135" Height="440" Margin="5"

ItemsSource

="{Binding

DyalogNames

}"/>

<

ListBox

Name="filtered" Width="135" Height="440" Margin="5"

ItemsSource

="{Binding

FilteredList

}"/>

</WrapPanel> <TextBlock Text="Dyalog WPF Demo" Margin="5"/> </StackPanel> </Window>Slide32

Slide 31

<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" SizeToContent="WidthAndHeight" Topmost="true"> <StackPanel> <TextBox Name="filter" Margin="5" Text="{Binding Filter

,Mode

=

TwoWay,UpdateSourceTrigger

=

PropertyChanged

}"/>

<

WrapPanel

>

<

ListBox

Name=

"all"

Width="135" Height="440" Margin="5"

ItemsSource

="{Binding

DyalogNames

}"/> <ListBox Name="filtered" Width="135" Height="440" Margin="5" ItemsSource="{Binding FilteredList}"/> </WrapPanel> <TextBlock Text="Dyalog WPF Demo" Margin="5"/> </StackPanel> </Window>Slide33

Slide 32

<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" SizeToContent="WidthAndHeight" Topmost="true"> <StackPanel> <TextBox Name="filter" Margin="5" Text="{Binding Filter,

Mode

=

TwoWay

,UpdateSourceTrigger

=

PropertyChanged

}"/>

<

WrapPanel

>

<

ListBox

Name="all" Width="135" Height="440" Margin="5"

ItemsSource

="{Binding

DyalogNames

}"/>

<ListBox Name="filtered" Width="135" Height="440" Margin="5" ItemsSource="{Binding FilteredList}"/> </WrapPanel> <TextBlock Text="Dyalog WPF Demo" Margin="5"/> </StackPanel> </Window>Slide34

Slide 33

DemoSlide35

Data Binding Revolutions (2015)"Everything

That Has a Beginning Has an End"Coming to a conference centre near you in 2015The Databinding Trilogy©warnerbros.