SlideShare a Scribd company logo
Caliburn.Micro Solving real word problems implementing MVVM bart.wullems@ordina.be http://bartwullems.blogspot.com
Agenda MVVM Frameworks Caliburn(.Micro) What is it? Patterns Features
MVVM Frameworks
MVVM Frameworks Explorer Source: http://www.japf.fr/silverlight/mvvm/index.html/
What is Caliburn?
6
What is Caliburn? “Caliburn is a set of libraries designed to aid in the development of WPF, Silverlight and WP7 applications” http://caliburnmicro.codeplex.com
Fact Implementing a User Interface is easy
Fact Implementing a maintainable User Interface is hard
Goals of Caliburn Build WPF/SL/WP7 Applications in a TDD friendly way Simplify usage of various UI design patterns in WPF/SL/WP7 Simplify common UI tasks Provide solutions to common    UI architecture problems Remove the boilerplate code     when building MVVM app’s
It’s all about patterns...
Presentation Model Presentation Model coordinates changes in the Model Presentation Model View calls operations View Model Operations Data Model alerts the Presentation Model View synchronizes  with PresentationModel
Model – View – ViewModel Change notification Presenter coordinates changes in the Model ViewModel View Model Commands Data View binds  to commands  and data Model alerts the Controller
Command ICommand Invoker + Execute() + CanExecute() Command Receiver
Application Controller “A centralized point for handling screen navigation and the flow of an application.” – Martin Fowler
Service Locator Service A Class A Locator Service B
Dependency Injection Container Dependency Injection Container Component
Event Aggregator Results Model Criteria Model hub Publish Handle Publish Handle Advert Model Recent Searches Model
The application
The Application
The Application No Code Behind No Event Wireups No Commands No Data Binding No Data Templates No Async Programming No Custom Controls No 3rd Party Libraries
Features
Features Overview Basic configuration and bootstrapping Actions Screens, Conductors and Composition All about conventions The Window Manager The Event Aggregator Coroutines
Basic Configuration Convention over Configuration Limited amount of configuration needed Simple naming convention to locate Views for ViewModels.  e.g. MyApp.ViewModels.MyViewModelMyApp.Views.MyView.  Bootstrapper Should run at startup Specifies the root view model(=Application Shell) View Model First but can be changed IoC Has it’s own small IoC container Can be replaced by the IoC of your choice(MEF, Unity,…)
Demo- Basic Configuration
Actions - Basics Command implementation for Caliburn.Micro Extend databinding to bind not only data but also methods Leverages System.Windows.Interactivity for it’s trigger mechanism.  Use anything that inherits from TriggerBaseto trigger the sending of an action message(events, …) No need to add a command class and/or property on VM Allows: Execution of methods Passing data from the UI into methods Synchronous/Asynchronous calls
Action - Guards Guard property  Handler: “SayHello” message Guard property: “CanSayHello” CM will observe changes in that property and re-evaluate the guard accordingly. Based on INotifyPropertyChanged to refresh trigger availability Can change the state of the bound control E.g. change a button to disabled, hide a menu item,…
Demo- Actions
UI Lifecycle Management Often using MVVM involves tricky UI lifecycle issues for various UI components Activation Deactivation Shutdown Caliburn.Micro handles this lifecycle with Screens, Conductors and Screen Collections 29
UI Lifecycle Management Screen A statefulunit of work existing within the presentation tier of an application.  Has a lifecycle associated with it. Screen Conductor Enforces the Screen Activation Lifecycle  Activates screens.  Deactivates screens. Allows graceful shutdown.  Screen Collection Maintains the list of currently opened screens or documents
UI Lifecycle Management Conductor Screen 1 Screen 2 Active Active Activate() Screen 2 Deactive() Screen 1 CanClose() Returns True Activate() Screen 2
Demo- Simple Navigation
Demo- Simple MDI
Conventions Removes the need to write boiler plate code Fully customizable Can be turned off if you hate them On by default Conventions for View/ViewModel resolution Data binding Action binding
Demo- Conventions
Window Manager Provides a View-Model-centric way of displaying Windows (ChildWindow in SL and Window in WPF).  Available methods ShowDialog ShowWindow ShowPopup Uses a Conductor under the hood
Demo – Window Manager
Event Aggregator Communicate between objects in a loosely coupled way Follows a bus-style pub/sub model.  Uses weak references Publishes on the UI thread.
Demo – Event Aggregator
Coroutines Wikipedia: “In computer science, coroutines are program components that generalize subroutines to allow multiple entry points for suspending and resuming execution at certain locations. Coroutines are well-suited for implementing more familiar program components such as cooperative tasks, iterators, infinite lists and pipes.”
Coroutines Introduces asynchronous programming in a simple way. Build on top of iterators. 2 required actions Implement the IResult interface on some class, representing the task you wish to execute Yield instances of IResult from an Action
Coroutines Allows you to execute a method, pause it’s execution, do something else, come back and resume execution where you left off.  Extremely powerful in task-based programming
Coroutines Silverlight example:  Dynamically download and show screens not part of the main package.
Coroutines Show “Loading” indicator Load Screen() yieldreturn yieldreturn yieldreturn yieldreturn Asynchronously download the external package Hide“Loading” indicator Navigate to a particular screen inside the dynamic module
Demo - Coroutines
TODAY’s TALK Remember!  Still a lot to discover... CALIBURN
Conclusions Caliburn.Micro is clean and simple Allows you to create very rich applications with a strong focus on maintainability and reuse A LOT of UI principles are applied in Caliburn.Micro Also check it’s big brother Caliburn “If you don’t like the code, use it as a learning tool” 47

More Related Content

What's hot

Mule testing
Mule testingMule testing
Mule testing
Shanky Gupta
 
Mvvm basics
Mvvm basicsMvvm basics
Mvvm basics
anusha kadimi
 
Deploy mule application
Deploy mule applicationDeploy mule application
Deploy mule application
Son Nguyen
 
Anypoint lessons
Anypoint lessonsAnypoint lessons
Anypoint lessons
Dwight Cavalcanti
 
Buzzword, How'd They Build That?
Buzzword, How'd They Build That?Buzzword, How'd They Build That?
Buzzword, How'd They Build That?
dcoletta
 
Integration with CMIS using Mule ESB
Integration with CMIS using Mule ESBIntegration with CMIS using Mule ESB
Integration with CMIS using Mule ESB
Sanjeet Pandey
 
Mule integration-application
Mule integration-applicationMule integration-application
Mule integration-application
Naresh Naidu
 
Selenium Training in Chennai Demo Part-2
Selenium Training in Chennai Demo Part-2 Selenium Training in Chennai Demo Part-2
Selenium Training in Chennai Demo Part-2
Thecreating Experts
 
Mobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelinesMobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelines
Qamar Abbas
 
Logging best practice in mule using logger component
Logging best practice in mule using logger componentLogging best practice in mule using logger component
Logging best practice in mule using logger component
Govind Mulinti
 
Automatic documentation with mule
Automatic documentation with muleAutomatic documentation with mule
Automatic documentation with mule
F K
 
Models used in iOS programming, with a focus on MVVM
Models used in iOS programming, with a focus on MVVMModels used in iOS programming, with a focus on MVVM
Models used in iOS programming, with a focus on MVVM
Andrei Popa
 
Acrhitecture deisign pattern_MVC_MVP_MVVM
Acrhitecture deisign pattern_MVC_MVP_MVVMAcrhitecture deisign pattern_MVC_MVP_MVVM
Acrhitecture deisign pattern_MVC_MVP_MVVM
Dong-Ho Lee
 
Single Page Applications: Your Browser is the OS!
Single Page Applications: Your Browser is the OS!Single Page Applications: Your Browser is the OS!
Single Page Applications: Your Browser is the OS!
Jeremy Likness
 
ReactiveCocoa - Functional Reactive Programming concepts in iOS
ReactiveCocoa - Functional Reactive Programming concepts in iOSReactiveCocoa - Functional Reactive Programming concepts in iOS
ReactiveCocoa - Functional Reactive Programming concepts in iOS
Andrei Popa
 
No brainer
No brainerNo brainer
No brainer
Tanzim Saqib
 
Cbr
CbrCbr
Deploying and Running in Mule
Deploying and Running in MuleDeploying and Running in Mule
Deploying and Running in Mule
Khasim Saheb
 
Mule
MuleMule
Mule
irfan1008
 
Windows Store Apps: Tips & Tricks
Windows Store Apps: Tips & TricksWindows Store Apps: Tips & Tricks
Windows Store Apps: Tips & Tricks
Robert MacLean
 

What's hot (20)

Mule testing
Mule testingMule testing
Mule testing
 
Mvvm basics
Mvvm basicsMvvm basics
Mvvm basics
 
Deploy mule application
Deploy mule applicationDeploy mule application
Deploy mule application
 
Anypoint lessons
Anypoint lessonsAnypoint lessons
Anypoint lessons
 
Buzzword, How'd They Build That?
Buzzword, How'd They Build That?Buzzword, How'd They Build That?
Buzzword, How'd They Build That?
 
Integration with CMIS using Mule ESB
Integration with CMIS using Mule ESBIntegration with CMIS using Mule ESB
Integration with CMIS using Mule ESB
 
Mule integration-application
Mule integration-applicationMule integration-application
Mule integration-application
 
Selenium Training in Chennai Demo Part-2
Selenium Training in Chennai Demo Part-2 Selenium Training in Chennai Demo Part-2
Selenium Training in Chennai Demo Part-2
 
Mobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelinesMobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelines
 
Logging best practice in mule using logger component
Logging best practice in mule using logger componentLogging best practice in mule using logger component
Logging best practice in mule using logger component
 
Automatic documentation with mule
Automatic documentation with muleAutomatic documentation with mule
Automatic documentation with mule
 
Models used in iOS programming, with a focus on MVVM
Models used in iOS programming, with a focus on MVVMModels used in iOS programming, with a focus on MVVM
Models used in iOS programming, with a focus on MVVM
 
Acrhitecture deisign pattern_MVC_MVP_MVVM
Acrhitecture deisign pattern_MVC_MVP_MVVMAcrhitecture deisign pattern_MVC_MVP_MVVM
Acrhitecture deisign pattern_MVC_MVP_MVVM
 
Single Page Applications: Your Browser is the OS!
Single Page Applications: Your Browser is the OS!Single Page Applications: Your Browser is the OS!
Single Page Applications: Your Browser is the OS!
 
ReactiveCocoa - Functional Reactive Programming concepts in iOS
ReactiveCocoa - Functional Reactive Programming concepts in iOSReactiveCocoa - Functional Reactive Programming concepts in iOS
ReactiveCocoa - Functional Reactive Programming concepts in iOS
 
No brainer
No brainerNo brainer
No brainer
 
Cbr
CbrCbr
Cbr
 
Deploying and Running in Mule
Deploying and Running in MuleDeploying and Running in Mule
Deploying and Running in Mule
 
Mule
MuleMule
Mule
 
Windows Store Apps: Tips & Tricks
Windows Store Apps: Tips & TricksWindows Store Apps: Tips & Tricks
Windows Store Apps: Tips & Tricks
 

Similar to Caliburn.micro

Building an enterprise app in silverlight 4 and NHibernate
Building an enterprise app in silverlight 4 and NHibernateBuilding an enterprise app in silverlight 4 and NHibernate
Building an enterprise app in silverlight 4 and NHibernate
bwullems
 
Developing maintainable Cordova applications
Developing maintainable Cordova applicationsDeveloping maintainable Cordova applications
Developing maintainable Cordova applications
Ivano Malavolta
 
MVVM+MEF in Silvelight - W 2010ebday
MVVM+MEF in Silvelight - W 2010ebdayMVVM+MEF in Silvelight - W 2010ebday
MVVM+MEF in Silvelight - W 2010ebday
Ricardo Fiel
 
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...
Svetlin Nakov
 
MVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCMVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVC
Anton Krasnoshchok
 
Next generation of frontend architectures - Luca Mezzalira - Codemotion Milan...
Next generation of frontend architectures - Luca Mezzalira - Codemotion Milan...Next generation of frontend architectures - Luca Mezzalira - Codemotion Milan...
Next generation of frontend architectures - Luca Mezzalira - Codemotion Milan...
Codemotion
 
Common ASP.NET Design Patterns - Telerik India DevCon 2013
Common ASP.NET Design Patterns - Telerik India DevCon 2013Common ASP.NET Design Patterns - Telerik India DevCon 2013
Common ASP.NET Design Patterns - Telerik India DevCon 2013
Steven Smith
 
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai..."Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
Fwdays
 
HCI 3e - Ch 8: Implementation support
HCI 3e - Ch 8:  Implementation supportHCI 3e - Ch 8:  Implementation support
HCI 3e - Ch 8: Implementation support
Alan Dix
 
Part 2 improving your software development v1.0
Part 2   improving your software development v1.0Part 2   improving your software development v1.0
Part 2 improving your software development v1.0
Jasmine Conseil
 
ActionScript Design Patterns
ActionScript Design Patterns ActionScript Design Patterns
ActionScript Design Patterns
Yoss Cohen
 
Porting the Legacy Application to Composite Application Guidance
Porting the Legacy Application to Composite Application GuidancePorting the Legacy Application to Composite Application Guidance
Porting the Legacy Application to Composite Application Guidance
Our Community Exchange LLC
 
Ppt of Basic MVC Structure
Ppt of Basic MVC StructurePpt of Basic MVC Structure
Ppt of Basic MVC Structure
Dipika Wadhvani
 
Introduction To MVVM
Introduction To MVVMIntroduction To MVVM
Introduction To MVVM
Boulos Dib
 
Soft serve prism
Soft serve prismSoft serve prism
Soft serve prism
dotNETUserGroupDnipro
 
Monorail Introduction
Monorail IntroductionMonorail Introduction
Monorail Introduction
Andrea Magnorsky
 
A report on mvc using the information
A report on mvc using the informationA report on mvc using the information
A report on mvc using the information
Toushik Paul
 
Design Patterns in ZK: Java MVVM as Model-View-Binder
Design Patterns in ZK: Java MVVM as Model-View-BinderDesign Patterns in ZK: Java MVVM as Model-View-Binder
Design Patterns in ZK: Java MVVM as Model-View-Binder
Simon Massey
 
Presentation 1 open source tools in continuous integration environment v1.0
Presentation 1   open source tools in continuous integration environment v1.0Presentation 1   open source tools in continuous integration environment v1.0
Presentation 1 open source tools in continuous integration environment v1.0
Jasmine Conseil
 
Best practices for creating modular Web applications
Best practices for creating modular Web applicationsBest practices for creating modular Web applications
Best practices for creating modular Web applications
peychevi
 

Similar to Caliburn.micro (20)

Building an enterprise app in silverlight 4 and NHibernate
Building an enterprise app in silverlight 4 and NHibernateBuilding an enterprise app in silverlight 4 and NHibernate
Building an enterprise app in silverlight 4 and NHibernate
 
Developing maintainable Cordova applications
Developing maintainable Cordova applicationsDeveloping maintainable Cordova applications
Developing maintainable Cordova applications
 
MVVM+MEF in Silvelight - W 2010ebday
MVVM+MEF in Silvelight - W 2010ebdayMVVM+MEF in Silvelight - W 2010ebday
MVVM+MEF in Silvelight - W 2010ebday
 
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...
 
MVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCMVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVC
 
Next generation of frontend architectures - Luca Mezzalira - Codemotion Milan...
Next generation of frontend architectures - Luca Mezzalira - Codemotion Milan...Next generation of frontend architectures - Luca Mezzalira - Codemotion Milan...
Next generation of frontend architectures - Luca Mezzalira - Codemotion Milan...
 
Common ASP.NET Design Patterns - Telerik India DevCon 2013
Common ASP.NET Design Patterns - Telerik India DevCon 2013Common ASP.NET Design Patterns - Telerik India DevCon 2013
Common ASP.NET Design Patterns - Telerik India DevCon 2013
 
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai..."Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
 
HCI 3e - Ch 8: Implementation support
HCI 3e - Ch 8:  Implementation supportHCI 3e - Ch 8:  Implementation support
HCI 3e - Ch 8: Implementation support
 
Part 2 improving your software development v1.0
Part 2   improving your software development v1.0Part 2   improving your software development v1.0
Part 2 improving your software development v1.0
 
ActionScript Design Patterns
ActionScript Design Patterns ActionScript Design Patterns
ActionScript Design Patterns
 
Porting the Legacy Application to Composite Application Guidance
Porting the Legacy Application to Composite Application GuidancePorting the Legacy Application to Composite Application Guidance
Porting the Legacy Application to Composite Application Guidance
 
Ppt of Basic MVC Structure
Ppt of Basic MVC StructurePpt of Basic MVC Structure
Ppt of Basic MVC Structure
 
Introduction To MVVM
Introduction To MVVMIntroduction To MVVM
Introduction To MVVM
 
Soft serve prism
Soft serve prismSoft serve prism
Soft serve prism
 
Monorail Introduction
Monorail IntroductionMonorail Introduction
Monorail Introduction
 
A report on mvc using the information
A report on mvc using the informationA report on mvc using the information
A report on mvc using the information
 
Design Patterns in ZK: Java MVVM as Model-View-Binder
Design Patterns in ZK: Java MVVM as Model-View-BinderDesign Patterns in ZK: Java MVVM as Model-View-Binder
Design Patterns in ZK: Java MVVM as Model-View-Binder
 
Presentation 1 open source tools in continuous integration environment v1.0
Presentation 1   open source tools in continuous integration environment v1.0Presentation 1   open source tools in continuous integration environment v1.0
Presentation 1 open source tools in continuous integration environment v1.0
 
Best practices for creating modular Web applications
Best practices for creating modular Web applicationsBest practices for creating modular Web applications
Best practices for creating modular Web applications
 

More from bwullems

GraphQL - A love story
GraphQL -  A love storyGraphQL -  A love story
GraphQL - A love story
bwullems
 
ElasticSearch - Search done right
ElasticSearch - Search done rightElasticSearch - Search done right
ElasticSearch - Search done right
bwullems
 
Techorama - Evolvable Application Development with MongoDB
Techorama  - Evolvable Application Development with MongoDBTechorama  - Evolvable Application Development with MongoDB
Techorama - Evolvable Application Development with MongoDB
bwullems
 
Git(hub) for windows developers
Git(hub) for windows developersGit(hub) for windows developers
Git(hub) for windows developers
bwullems
 
Javascript omg!
Javascript omg!Javascript omg!
Javascript omg!
bwullems
 
Tfs Monitor Windows Phone 7 App
Tfs Monitor Windows Phone 7 AppTfs Monitor Windows Phone 7 App
Tfs Monitor Windows Phone 7 App
bwullems
 
Convention over configuration in .Net 4.0
Convention over configuration in .Net 4.0Convention over configuration in .Net 4.0
Convention over configuration in .Net 4.0
bwullems
 
Visual Studio 2010 and .NET 4.0 Overview
Visual Studio 2010 and .NET 4.0 OverviewVisual Studio 2010 and .NET 4.0 Overview
Visual Studio 2010 and .NET 4.0 Overview
bwullems
 

More from bwullems (8)

GraphQL - A love story
GraphQL -  A love storyGraphQL -  A love story
GraphQL - A love story
 
ElasticSearch - Search done right
ElasticSearch - Search done rightElasticSearch - Search done right
ElasticSearch - Search done right
 
Techorama - Evolvable Application Development with MongoDB
Techorama  - Evolvable Application Development with MongoDBTechorama  - Evolvable Application Development with MongoDB
Techorama - Evolvable Application Development with MongoDB
 
Git(hub) for windows developers
Git(hub) for windows developersGit(hub) for windows developers
Git(hub) for windows developers
 
Javascript omg!
Javascript omg!Javascript omg!
Javascript omg!
 
Tfs Monitor Windows Phone 7 App
Tfs Monitor Windows Phone 7 AppTfs Monitor Windows Phone 7 App
Tfs Monitor Windows Phone 7 App
 
Convention over configuration in .Net 4.0
Convention over configuration in .Net 4.0Convention over configuration in .Net 4.0
Convention over configuration in .Net 4.0
 
Visual Studio 2010 and .NET 4.0 Overview
Visual Studio 2010 and .NET 4.0 OverviewVisual Studio 2010 and .NET 4.0 Overview
Visual Studio 2010 and .NET 4.0 Overview
 

Recently uploaded

Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
TIPNGVN2
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
Pixlogix Infotech
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Zilliz
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Zilliz
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 

Recently uploaded (20)

Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 

Caliburn.micro

  • 1. Caliburn.Micro Solving real word problems implementing MVVM bart.wullems@ordina.be http://bartwullems.blogspot.com
  • 2. Agenda MVVM Frameworks Caliburn(.Micro) What is it? Patterns Features
  • 4. MVVM Frameworks Explorer Source: http://www.japf.fr/silverlight/mvvm/index.html/
  • 6. 6
  • 7. What is Caliburn? “Caliburn is a set of libraries designed to aid in the development of WPF, Silverlight and WP7 applications” http://caliburnmicro.codeplex.com
  • 8. Fact Implementing a User Interface is easy
  • 9. Fact Implementing a maintainable User Interface is hard
  • 10. Goals of Caliburn Build WPF/SL/WP7 Applications in a TDD friendly way Simplify usage of various UI design patterns in WPF/SL/WP7 Simplify common UI tasks Provide solutions to common UI architecture problems Remove the boilerplate code when building MVVM app’s
  • 11. It’s all about patterns...
  • 12. Presentation Model Presentation Model coordinates changes in the Model Presentation Model View calls operations View Model Operations Data Model alerts the Presentation Model View synchronizes with PresentationModel
  • 13. Model – View – ViewModel Change notification Presenter coordinates changes in the Model ViewModel View Model Commands Data View binds to commands and data Model alerts the Controller
  • 14. Command ICommand Invoker + Execute() + CanExecute() Command Receiver
  • 15. Application Controller “A centralized point for handling screen navigation and the flow of an application.” – Martin Fowler
  • 16. Service Locator Service A Class A Locator Service B
  • 17. Dependency Injection Container Dependency Injection Container Component
  • 18. Event Aggregator Results Model Criteria Model hub Publish Handle Publish Handle Advert Model Recent Searches Model
  • 21. The Application No Code Behind No Event Wireups No Commands No Data Binding No Data Templates No Async Programming No Custom Controls No 3rd Party Libraries
  • 23. Features Overview Basic configuration and bootstrapping Actions Screens, Conductors and Composition All about conventions The Window Manager The Event Aggregator Coroutines
  • 24. Basic Configuration Convention over Configuration Limited amount of configuration needed Simple naming convention to locate Views for ViewModels. e.g. MyApp.ViewModels.MyViewModelMyApp.Views.MyView. Bootstrapper Should run at startup Specifies the root view model(=Application Shell) View Model First but can be changed IoC Has it’s own small IoC container Can be replaced by the IoC of your choice(MEF, Unity,…)
  • 26. Actions - Basics Command implementation for Caliburn.Micro Extend databinding to bind not only data but also methods Leverages System.Windows.Interactivity for it’s trigger mechanism. Use anything that inherits from TriggerBaseto trigger the sending of an action message(events, …) No need to add a command class and/or property on VM Allows: Execution of methods Passing data from the UI into methods Synchronous/Asynchronous calls
  • 27. Action - Guards Guard property Handler: “SayHello” message Guard property: “CanSayHello” CM will observe changes in that property and re-evaluate the guard accordingly. Based on INotifyPropertyChanged to refresh trigger availability Can change the state of the bound control E.g. change a button to disabled, hide a menu item,…
  • 29. UI Lifecycle Management Often using MVVM involves tricky UI lifecycle issues for various UI components Activation Deactivation Shutdown Caliburn.Micro handles this lifecycle with Screens, Conductors and Screen Collections 29
  • 30. UI Lifecycle Management Screen A statefulunit of work existing within the presentation tier of an application. Has a lifecycle associated with it. Screen Conductor Enforces the Screen Activation Lifecycle Activates screens. Deactivates screens. Allows graceful shutdown. Screen Collection Maintains the list of currently opened screens or documents
  • 31. UI Lifecycle Management Conductor Screen 1 Screen 2 Active Active Activate() Screen 2 Deactive() Screen 1 CanClose() Returns True Activate() Screen 2
  • 34. Conventions Removes the need to write boiler plate code Fully customizable Can be turned off if you hate them On by default Conventions for View/ViewModel resolution Data binding Action binding
  • 36. Window Manager Provides a View-Model-centric way of displaying Windows (ChildWindow in SL and Window in WPF). Available methods ShowDialog ShowWindow ShowPopup Uses a Conductor under the hood
  • 37. Demo – Window Manager
  • 38. Event Aggregator Communicate between objects in a loosely coupled way Follows a bus-style pub/sub model. Uses weak references Publishes on the UI thread.
  • 39. Demo – Event Aggregator
  • 40. Coroutines Wikipedia: “In computer science, coroutines are program components that generalize subroutines to allow multiple entry points for suspending and resuming execution at certain locations. Coroutines are well-suited for implementing more familiar program components such as cooperative tasks, iterators, infinite lists and pipes.”
  • 41. Coroutines Introduces asynchronous programming in a simple way. Build on top of iterators. 2 required actions Implement the IResult interface on some class, representing the task you wish to execute Yield instances of IResult from an Action
  • 42. Coroutines Allows you to execute a method, pause it’s execution, do something else, come back and resume execution where you left off. Extremely powerful in task-based programming
  • 43. Coroutines Silverlight example: Dynamically download and show screens not part of the main package.
  • 44. Coroutines Show “Loading” indicator Load Screen() yieldreturn yieldreturn yieldreturn yieldreturn Asynchronously download the external package Hide“Loading” indicator Navigate to a particular screen inside the dynamic module
  • 46. TODAY’s TALK Remember! Still a lot to discover... CALIBURN
  • 47. Conclusions Caliburn.Micro is clean and simple Allows you to create very rich applications with a strong focus on maintainability and reuse A LOT of UI principles are applied in Caliburn.Micro Also check it’s big brother Caliburn “If you don’t like the code, use it as a learning tool” 47

Editor's Notes

  1. The Sword in the Stone about the magician Merlin and King Arthur
  2. View has references to PresentationModelPresentationModel also coordinates control state changes (eg: enabled/disabled controls)Contains plumbing code for synchronization.NET Data binding was not yet ready for this
  3. View  ViewModel : Binding to commands and dataViewModel: Abstraction of the View, Has no reference to the View (unlike MVP)ViewModel  View : Change notifcation: EventsViewModel  Model : Normal interaction