caliburn micro
TRANSCRIPT
![Page 1: Caliburn micro](https://reader033.vdocuments.us/reader033/viewer/2022060116/5583e0e1d8b42a4c3f8b4cb1/html5/thumbnails/1.jpg)
Caliburn.MicroOpinionated MVVM Framework
![Page 2: Caliburn micro](https://reader033.vdocuments.us/reader033/viewer/2022060116/5583e0e1d8b42a4c3f8b4cb1/html5/thumbnails/2.jpg)
Brief History of Caliburn.Micro
Created by Rob EisenbergBased on mature Caliburn projectOpens sourceAround 2,700 lines of codeSingle dependency - System.Windows.InteractivityEnterprise team is having fun learning it right now
![Page 3: Caliburn micro](https://reader033.vdocuments.us/reader033/viewer/2022060116/5583e0e1d8b42a4c3f8b4cb1/html5/thumbnails/3.jpg)
Caliburn.Micro Elevator Pitch
A better version of what nearly every WPF veteran has attempted to home-growReduces the drudgery of property binding and commands Simplifies building a deeply composed UIHelps unify the programming models of WPF, Silverlight and Windows Phone 7Asynchronous programming supportSmall footprint & highly customizable
![Page 4: Caliburn micro](https://reader033.vdocuments.us/reader033/viewer/2022060116/5583e0e1d8b42a4c3f8b4cb1/html5/thumbnails/4.jpg)
Core Concepts
MVVM (Model-View-ViewModel)
Convention over Configuration
Actions
Event Aggregator (pub-sub)
Bootstrapper
Conductors and Screens
Coroutines
![Page 5: Caliburn micro](https://reader033.vdocuments.us/reader033/viewer/2022060116/5583e0e1d8b42a4c3f8b4cb1/html5/thumbnails/5.jpg)
Demo
WE WANT THE DEMO!
WE WANT THE DEMO!
WE WANT THE … CUP!
![Page 6: Caliburn micro](https://reader033.vdocuments.us/reader033/viewer/2022060116/5583e0e1d8b42a4c3f8b4cb1/html5/thumbnails/6.jpg)
Lifecycle
• Application start up• Bootstrapper code is executed• ViewLocator.LocateForModel()• ViewModelBinder.Bind()• The rest of stuff happens
![Page 7: Caliburn micro](https://reader033.vdocuments.us/reader033/viewer/2022060116/5583e0e1d8b42a4c3f8b4cb1/html5/thumbnails/7.jpg)
Conventions = Magic
![Page 8: Caliburn micro](https://reader033.vdocuments.us/reader033/viewer/2022060116/5583e0e1d8b42a4c3f8b4cb1/html5/thumbnails/8.jpg)
Convention Over Configuration
Convention = Do More With Less Code
View Location & CompositionProperty Binding
Content controlsItems controls
Action BindingConfigurable Conventions (Convention Manager)
![Page 9: Caliburn micro](https://reader033.vdocuments.us/reader033/viewer/2022060116/5583e0e1d8b42a4c3f8b4cb1/html5/thumbnails/9.jpg)
Troubleshooting Magic
Common Issues With Conventions:MisspellingsData Templates
Troubleshooting Techniques:LoggingRefactoring with R#
![Page 10: Caliburn micro](https://reader033.vdocuments.us/reader033/viewer/2022060116/5583e0e1d8b42a4c3f8b4cb1/html5/thumbnails/10.jpg)
Data Binding
PropertyChangedBaseNo strings when notifying about property change!Lambda-based notificationsNotifyOfPropertyChange(() => PropertyName);
BindableCollection
ObservableCollection extensionRaises events on the UI thread
![Page 11: Caliburn micro](https://reader033.vdocuments.us/reader033/viewer/2022060116/5583e0e1d8b42a4c3f8b4cb1/html5/thumbnails/11.jpg)
Actions
Allows to bind UI triggers to ViewModel methodsAllows for passing parametersParameters are type converted to method’s signatureCanExecute guard is supportedFull design-time support in BlendSupport Coroutines
![Page 12: Caliburn micro](https://reader033.vdocuments.us/reader033/viewer/2022060116/5583e0e1d8b42a4c3f8b4cb1/html5/thumbnails/12.jpg)
Event Aggregator
Pub/SubCommunication between ViewModelsHighly decoupled
![Page 13: Caliburn micro](https://reader033.vdocuments.us/reader033/viewer/2022060116/5583e0e1d8b42a4c3f8b4cb1/html5/thumbnails/13.jpg)
Screens & Conductors
State machine for UI compositionScreen has a lifecycle associated with it
ActivationDeactivation
Screen ConductorOrchestrates screensEnforces screen lifecycleGraceful shutdown
![Page 14: Caliburn micro](https://reader033.vdocuments.us/reader033/viewer/2022060116/5583e0e1d8b42a4c3f8b4cb1/html5/thumbnails/14.jpg)
Coroutines
Asynchronous programming supportUtilizes iterators to yield results
![Page 15: Caliburn micro](https://reader033.vdocuments.us/reader033/viewer/2022060116/5583e0e1d8b42a4c3f8b4cb1/html5/thumbnails/15.jpg)
FIN