CSLA .Net and MVVM Video Series Notes
MvvmIntro - Intro
00:00 Intro
00:35 CSLA .Net and MVVM
00:57 MVVM Pattern (high level)
01:49 Anemic Model
04:12 Rich Model
07:51 Why MVVM?
08:00 Testing of UI Code
11:19 UI code structure/discipline
12:53 Separation of concerns
15:21 N-Layer Architecture
15:58 Layered Flexilibity
16:29 Implementing the Layers
16:57 The View
17:15 Binding is important
20:52 RAD designers are important
23:09 "No code behind"
26:50 The ViewModel
28:40 Adds commands/verbs to the model
28:58 Extends the model with extra properties
30:26 Enhances the model with binding support
31:00 The Model
31:20 MVVM is primarily a UI pattern
31:27 Types of Model
32:20 Connecting the Parts
34:00 Resource Generated in View
34:35 Code-behind????
36:04 Making MVVM Work
42:49 Summary
Mvvm01 - Using Bxf and CSLA 4
00:00 Intro
00:36 SlDemo Sample Application
01:30 Solution structure
02:48 SlDemo project
03:00 MainPage.xaml and MainPagePresenter.cs
03:28 ViewModels
03:47 No human code behind
04:25 App.xaml.cs Csla.DataPortal.ProxyTypeName = "Local"
05:00 MainPage.xaml
05:15 One overall window frame
Silverlight UserControl or WPF Window
06:56 Demo of SlDemo MainPage
08:00 ContentControl
09:00 Content property databound to MainContent
09:15 DataContext is databound to MainPagePresenter
09:40 Status and Busy animation
10:59 MainPagePresenter binding in xaml
11:56 MainMenuViewModel binding in xaml
12:26 MainPagePresenter class
12:52 Exposes set of depenency properties (MainContent, StatusText, IsBusy)
13:50 Constructor
13:52 Bxf abstractly understands how to show: views, status information and error information
15:10 set up presenter (Bxf.IPresenter)Bxf.Shell.Instance
15:35 OnShowView event
16:38 OnShowStatus event
16:56 OnShowError event
17:55 Shell.Instance.ShowStatus
18:04 SlDemo.Test project
18:30 test equivelent to MainPage (ErrorMessage, ErrorTitle, Status, View, Region)
18:56 Initialize
19:00 set up presenter, OnShowView, OnShowStatus and OnShowError
19:35 Bxf.Shell.Instance.ViewFactory = new MockViewFactory();
20:25 MockViewFactory
20:30 GetView method
21:16 MenuCreateEmployee test method
22:06 Demo
22:40 MainPage.xaml
23:02 TriggerAction
25:00 Menu Region bound to MainMenuViewModel
25:38 MainMenuViewModel
25:52 Exposes command implementations for menu buttons
28:46 Summary
Mvvm02 - A Basic Data Edit Scenario
00:00 Intro
00:30 SlDemo Sample Application
00:36 Library project
00:41 EmployeeEdit class (BusinessBase)
00:57 Properties and attributes
02:46 Simple Factory/Data Model
05:05 SlDemo project ViewModels folder
05:20 Employee ViewModel (EmployeeViewModel.cs)
05:27 ViewModel<T>
05:41 ViewModelBase<T>
07:38 Constructor
09:31 OnError method
10:03 OnRefreshed method
10:37 Constructor overload
11:43 Save method
12:40 OnSaved method
13:10 Create custom ViewModel<T> base class for application
15:20 Employee View (EditEmployee.xaml)
16:00 Controls including PropertyStatus and TriggerAction
17:40 ManageObjectLifetime = false
18:35 Bound to CollectionViewSource
20:20 Bindings (Textbox, PropertyStatus, Buttons)
21:12 TriggerAction "CurrentItem" in Silverlight or "/" in WPF
22:48 Demo of creation of EditEmployee.xaml page
23:30 Add DataSource (ViewModel)
24:47 EmployeeViewModel properties
27:14 Model Details View
27:17 Specify type of controls for each property
27:33 Drag Model to grid
28:00 Drag toolbox CSLA controls PropertyStatus control to grid
Reduce control size to fit grid cell then Reset Layout All
29:08 Apply DataBinding for PropertyStatus Property to Model property
Select Path: Model: then appropriate property in helper
30:15 Add StackPanel with Save and Cancel Buttons and TriggerActions
31:30 TriggerAction Bindings and DataContext
34:20 Save Button binding to CanSave
35:45 Review of xaml
37:44 Demo of EditEmployee form
41:25 Summary
Mvvm03 - Editing a list in a datagrid
00:00 Intro
00:54 SlDemo Sample Application with mock database construct (MockDb.cs)
01:55 MockDb static class
03:25 Constructor
03:40 MarkovNameGenerator
04:13 EmployeeEdit class DataPortal methods now use MockDb
DataPortal_Fetch uses BackgroundWorker thread to simulate async database call
06:02 EmployeeList class (inherits from BusinessListBase)
06:34 Async factory
06:37 DataPortal_Fetch
08:30 EmployeeListViewModel class (inherits from ViewModel<T>)
09:30 Constructor
09:57 OnError
10:08 OnRefreshed
10:45 Save
11:13 OnSaved
12:00 Demo
16:15 EditEmployeeList.xaml UserControl
16:30 Uses EmployeeListViewModel as DataSource
17:48 Selected DataGrid Control for Model
18:16 Drag Model on to form
19:17 Review of xaml created by the designer
20:30 Designer created 2 CollectionViewSources for ViewModel and Model
22:00 Save button and TriggerAction
23:47 MainMenuViewModel.cs
24:10 EmployeeListEdit method
25:30 Demo
27:18 Business rules are fully operational
27:50 Silverlight DataGrid demo of invalid object and broken rules
29:36 Summary
Mvvm04 - Collections: Deeper dive
00:00 Intro
00:45 EditEmployeeList.xaml
00:55 Added Remove button, Add item button and associated TriggerActions
02:00 Remove TriggerAction bindings
04:11 Demo
05:39 AddItem TriggerAction bindings
06:15 AddNew method on collection
07:47 EmployeeEdit child type has a default implementation of Child_Create
08:41 Demo
10:08 Single Object
11:00 Collection Object
11:44 Child ViewModels
14:52 EmployeeItemListViewModel class is parent ViewModel
15:19 EmployeeItemViewModel class is child ViewModel
15:34 Demo
17:58 EmployeeItemListViewModel class (inherits from ViewModel<T>)
18:28 Constructor
18:41 Property ObservableCollection<EmployeeItemViewModel> EmployeeList
20:10 EmployeeItemViewModel class (inherits from DependencyObject)
21:00 Model Property
21:24 EditItem verb
22:27 EmployeeViewModel Constructor overload
24:24 Remove verb
24:50 Model.Parent.RemoveChild(Model)
25:34 EmployeeItemListViewModel Model_CollectionChanged
27:45 Demo
28:38 EmployeeList.xaml UserControl
28:50 Uses EmployeeItemListViewModel as DataSource
29:00 EmployeeList Property in DataSource
29:57 Change control type to ListBox
30:10 Drag EmployeeList Property on to form
30:30 Manually create ItemTemplate for ListBox
31:15 EmployeeItem DataTemplate
32:50 Hyperlink buttons and TriggerActions
33:50 Summary of Remove hyperlink behaviour
36:38 Summary
Mvvm05 - CSLA 3.8 and Visual Studio 2008
00:00 Intro
00:20 Environment (CSLA 3.8.4, VS2008, .Net 3.5 SP1, Silverlight 4)
01:32 SlDemo
01:47 Solution structure
02:43 EditEmployee.xaml
02:55 How to disable Windows Presentation Foundation Designer
03:40 UserControl.Resources area
04:18 ModelManager
07:00 CSLA 3.8 PropertyStatus control doesn't understand CollectionViewSource objects
07:34 High level grid DataContext
07:50 Control bindings
08:50 Save and Cancel buttons and TriggerActions
09:30 EmployeeViewModel class (inherits from ViewModel<T>)
11:19 Demo of EmployeeEdit
12:00 Demo of EmployeeList
13:14 EmployeeList.xaml
13:30 CollectionviewSources (because there are no PorpertyStatus controls)
13:40 EmployeeItem DataTemplate
14:30 EmployeeItemListViewModel class (inherits from ViewModel<T>) (code unchanged from 2010)
15:02 EmployeeItemViewModel class (inherits from DependencyObject) (code unchanged from 2010)
15:40 Parent property on all editable objects is protected in CSLA 3.8
16:00 Elevate Parent property to public on EmployeeEdit class
16:57 Factory and Data code unchanged from 2010
17:29 Summary