SlideShare a Scribd company logo
1 of 33
Download to read offline
Composite Smart Clients with WPF
       Composite Application Guidance for WPF – “PRISM”




                                            Max Knor
                                     Developer Evangelist
                                        Microsoft Austria
                                 http://www.knor.net/
Agenda
    A solution for…
     Complex WPF Applications
     Developing in Modules
     Composite Smart Clients


    No introduction to WPF




2
Your WPF Application ?!




3
Your WPF Application ?!




4
Composite Smart Clients



                          Configurable




                        Extensible
                         Unified
                           Loosely Coupled
                     Experience
                            Communication
                          Shared
                    Central Services
                      User Interface
                   (Equilizer, Dolby...)
5
WPF Composite Application Guidance
    Solution Package by Patterns & Practices Team
     Available in Source


    http://www.codeplex.com/CompositeWPF/
     Reference Implementation (Stock Trader RI)
     Composite Application Library (Framework)
     Guidance (Documentation)


    http://www.codeplex.com/CompositeWPFContrib/
     Community Add-Ons
         OutlookBar, Infragistics Support, …




6
Architecture of Composite Smart Clients

        Main Application                                                             Module-Loader Svc.




                                          Service / Dependency Injection Container
         Shell                                                                        ModuleEnumerator

                                Shell                                                   ModuleLoader
       Region
        Region                Presenter
         Region
                                                                                       Core-Services
                                                                                        RegionManger
             Module                                                                        Logging

      View         Presenter                                                           EventAggregator




                                                                                     Custom Module
                      Model                                                             Services



7
Starting the Application

        Application



    Bootstrapper                             Unity Container

          Initialize                           Region Manager
         Container                                 SomeClass
                        Shell
        Display Shell
                          Region

         Initialize
         Modules                                                            View
                                  Module
                                                            Module 1
                                Enumerator
                                                             Module 2
                                                               Module 3
                                               Initialize
                           Module Loader                         Module 4




8
Dependency Injection mit Unity
1.) Register types with UnityContainer:
this.Container.RegisterType<IMyView, MyView>();
this.Container.RegisterType<IShell, ShellWindow>();


2.) Instantiate a new object (resolve instead of new)
IMyView view = this.Container.Resolve<IMyView>();

Constructor is called, dependencies are filled automatically
public class MyView : UserControl, IMyView
{
   public MyView(IUnityContainer container, IShell shell)
   {
       // container & shell wurden automatisch befüllt
   }
}
9
The Shell
The Shell
            Toolbars, ….




                 Regions




11
Starting the Application

         Application



     Bootstrapper                   Unity Container

           Initialize                 Region Manager
          Container                       SomeClass
                         Shell
         Display Shell
                           Region




12
demo
         Shell & Regions
Bootstrapper & Container
Modules
Modules
     Grouped by UseCases, Functionality, …
      No reference to the Shell


     Shared Components
      Services, Interfaces, … in Shared Libraries


     Modules are dynamically loaded
      At runtime



15
Starting the Application

         Application



     Bootstrapper                             Unity Container

           Initialize                           Region Manager
          Container                                 SomeClass
                         Shell
         Display Shell
                           Region

          Initialize
          Modules
                                   Module
                                                             Module 1
                                 Enumerator
                                                              Module 2
                                                                Module 3
                                                Initialize
                            Module Loader                         Module 4




16
demo
      Modules
Module Loading
Dynamic Module Loading
public class MyBootstrapper : UnityPrismBootstrapper
{ public class MyBootstrapper : UnityPrismBootstrapper
  ...
  {
      ...
  protected override IModuleEnumerator GetModuleEnumerator()
      protected override IModuleEnumerator GetModuleEnumerator()
  { {
    return new StaticModuleEnumerator()
        return new DirectoryLookupModuleEnumerator(@quot;.Modulesquot;);
      .AddModule(typeof(SomeModule))
      }
  }
      .AddModule(typeof(AnotherModule), new[] {quot;SomeModulequot;)
         .AddModule(typeof(YetAnotherModule), new[] {quot;AnotherModulequot;
         })
     }
}             Searching for modules
                   in directory


18
Views &
Controllers
Implementing the Views
     Seperation of UI, logic and data

                          Presentation
            View                                  Model
                             Model


     Presentation Model
      Responsible for data loading (from model)
      Instantiates the view


     View
      Binding to PM‘s commands and data
20
Starting the Application

         Application



     Bootstrapper                             Unity Container

           Initialize                           Region Manager
          Container                                 SomeClass
                         Shell
         Display Shell
                           Region

          Initialize
          Modules                                                            View (…)
                                   Module
                                                             Module 1
                                 Enumerator
                                                              Module 2
                                                                Module 3
                                                Initialize
                            Module Loader                         Module 4




21
Displaying views
                                                 Region manager is
                                                      needed
     public class MyModule : IModule
     {
       public void Initialize (IRegionManager manager)
       {
         RegisterViewsAndServices();
                                                   Region is retrieved
             IRegion orderRegion =
               manager.GetRegion(quot;OrderRegionquot;);
             var myOrderView = new OrderView(myOrder);
             orderRegion.Add(myOrderView);
         }
     }
                                                        View is created


                                 View is shown
22
demo
            View &
PresentationModell
Communikations
Loosely coupled communication
Requirements: No direct dependencies


     Shared Services


     Event Aggregator
      Weak Multicast Events


     Commands



25
Commands
public interface ICommand
{
      event EventHandler CanExecuteChanged;
      bool CanExecute(object parameter);
      void Execute(object parameter);
}



            MyCommand


                                   <Button Command=quot;...quot; />
     Execute()      CanExecute()




26
demo
     Commands
EventAggregator
Shell Extensibility
     Modules can extend the shell with custom
     toolbars

     ShellWindow implements Interface
      IExtendableShell


     Access via UnityContainer

     Modules are only aware of IExtendableShell
      Breaking the dependency to shell implementation

28
Shell Extensibility
IExtendableShell.cs:
 public interface IExtendableShell
 {
    void AddToolBarItem(object identifier, string text,
              ICommand command);
    void RemoveToolBarItems(object identifier);
    void ShowStatusBarText(string text);
 }
ShellWindow.cs:
 public ShellWindow : Window, IExtendableShell { .. }
MyBootstrapper.cs:
 this.Container.RegisterType<IExtendableShell, ShellWindow();

Im Modul:
 var shell = this.Container.Resolve<IExtendableShell>();
 shell.ShowStatusBarText(quot;blaquot;); //nur IExtendableShell sichtbar
 29
Composition Commands
                                        Composite
                          Submit All
                                        Command




     OrderDetail
     OrderDetails       OrderDetails          OrderDetails
     s




            Submit             Submit                Submit




                     Delegate Commands
30
Summary
     Composite Smart Clients
       Extensible Architecture
       Build in a modular way


     Independent modules enable
       Parallel Development of modules
       Flexible deployment


     Composite Application Guidance
       Library providing Infrastruktur


     Tips
       Interfaces reduce dependencies (z.B.: UI Testing)
       Event Aggregator can get evil  (event loops)

31
Contact




Max Knor
Developer Evangelist
Microsoft Austria



http://www.knor.net/



32
Composite WPF

More Related Content

What's hot (10)

MVC/DCI in NetBeans by Jaroslav Tulach
MVC/DCI in NetBeans by  Jaroslav TulachMVC/DCI in NetBeans by  Jaroslav Tulach
MVC/DCI in NetBeans by Jaroslav Tulach
 
Javabeans
JavabeansJavabeans
Javabeans
 
introduction of Java beans
introduction of Java beansintroduction of Java beans
introduction of Java beans
 
Java beans
Java beansJava beans
Java beans
 
Javabean1
Javabean1Javabean1
Javabean1
 
Java beans
Java beansJava beans
Java beans
 
Java session17
Java session17Java session17
Java session17
 
Java beans
Java beansJava beans
Java beans
 
Warum OSGi?
Warum OSGi?Warum OSGi?
Warum OSGi?
 
Beans presentation
Beans presentationBeans presentation
Beans presentation
 

Viewers also liked

Marta, Sònia, Xavi G, Isaac, David, Raül, Marc
Marta, Sònia, Xavi  G, Isaac, David, Raül, MarcMarta, Sònia, Xavi  G, Isaac, David, Raül, Marc
Marta, Sònia, Xavi G, Isaac, David, Raül, Marcmarblocs
 
New Economy, New Democracy, New Ecology?
New Economy, New Democracy, New Ecology?New Economy, New Democracy, New Ecology?
New Economy, New Democracy, New Ecology?jexxon
 
01 Paolo Lessio, Processo civile telematico
01 Paolo Lessio, Processo civile telematico01 Paolo Lessio, Processo civile telematico
01 Paolo Lessio, Processo civile telematicoAndrea Rossetti
 
Corrida de Toros: Cultural Landscape and Language
Corrida de Toros: Cultural Landscape and LanguageCorrida de Toros: Cultural Landscape and Language
Corrida de Toros: Cultural Landscape and LanguageAlan Doherty
 
European project Sun.Com Social Networks for Educators
European project Sun.Com Social Networks for EducatorsEuropean project Sun.Com Social Networks for Educators
European project Sun.Com Social Networks for EducatorsJoel Josephson
 
In beeldspraak
In beeldspraakIn beeldspraak
In beeldspraakJan Lelie
 
製造業のサービス化について サービス・マーケティング最終回発表
製造業のサービス化について サービス・マーケティング最終回発表製造業のサービス化について サービス・マーケティング最終回発表
製造業のサービス化について サービス・マーケティング最終回発表Hikaru GOTO
 
Namibia Desert Landscapes
Namibia  Desert LandscapesNamibia  Desert Landscapes
Namibia Desert LandscapesAlan Doherty
 
Multiplatform & Multiscreen Ecosystem
Multiplatform & Multiscreen EcosystemMultiplatform & Multiscreen Ecosystem
Multiplatform & Multiscreen EcosystemBertram Gugel
 
MMMedins: Multimedia Laboratories for Intangible Cultural Heritage
MMMedins: Multimedia Laboratories for Intangible Cultural HeritageMMMedins: Multimedia Laboratories for Intangible Cultural Heritage
MMMedins: Multimedia Laboratories for Intangible Cultural Heritagejexxon
 
SocialTV – Now. Status Quo & Outlook
SocialTV – Now. Status Quo & OutlookSocialTV – Now. Status Quo & Outlook
SocialTV – Now. Status Quo & OutlookBertram Gugel
 
Francesca Bosco, Cybercrime e cybersecurity. Profili internazionali
Francesca Bosco, Cybercrime e cybersecurity. Profili internazionaliFrancesca Bosco, Cybercrime e cybersecurity. Profili internazionali
Francesca Bosco, Cybercrime e cybersecurity. Profili internazionaliAndrea Rossetti
 
Cesare Del Moro, Strumenti informatici e telematici nella giustizia civile
Cesare Del Moro, Strumenti informatici e telematici nella giustizia civileCesare Del Moro, Strumenti informatici e telematici nella giustizia civile
Cesare Del Moro, Strumenti informatici e telematici nella giustizia civileAndrea Rossetti
 
(ISM315) How to Quantify TCO & Increase Business Value Gains Using AWS
(ISM315) How to Quantify TCO & Increase Business Value Gains Using AWS(ISM315) How to Quantify TCO & Increase Business Value Gains Using AWS
(ISM315) How to Quantify TCO & Increase Business Value Gains Using AWSAmazon Web Services
 

Viewers also liked (20)

Marta, Sònia, Xavi G, Isaac, David, Raül, Marc
Marta, Sònia, Xavi  G, Isaac, David, Raül, MarcMarta, Sònia, Xavi  G, Isaac, David, Raül, Marc
Marta, Sònia, Xavi G, Isaac, David, Raül, Marc
 
New Economy, New Democracy, New Ecology?
New Economy, New Democracy, New Ecology?New Economy, New Democracy, New Ecology?
New Economy, New Democracy, New Ecology?
 
01 Paolo Lessio, Processo civile telematico
01 Paolo Lessio, Processo civile telematico01 Paolo Lessio, Processo civile telematico
01 Paolo Lessio, Processo civile telematico
 
Corrida de Toros: Cultural Landscape and Language
Corrida de Toros: Cultural Landscape and LanguageCorrida de Toros: Cultural Landscape and Language
Corrida de Toros: Cultural Landscape and Language
 
Password
PasswordPassword
Password
 
Frattali
FrattaliFrattali
Frattali
 
European project Sun.Com Social Networks for Educators
European project Sun.Com Social Networks for EducatorsEuropean project Sun.Com Social Networks for Educators
European project Sun.Com Social Networks for Educators
 
Geovisualisation
GeovisualisationGeovisualisation
Geovisualisation
 
In beeldspraak
In beeldspraakIn beeldspraak
In beeldspraak
 
111
111111
111
 
製造業のサービス化について サービス・マーケティング最終回発表
製造業のサービス化について サービス・マーケティング最終回発表製造業のサービス化について サービス・マーケティング最終回発表
製造業のサービス化について サービス・マーケティング最終回発表
 
Namibia Desert Landscapes
Namibia  Desert LandscapesNamibia  Desert Landscapes
Namibia Desert Landscapes
 
Multiplatform & Multiscreen Ecosystem
Multiplatform & Multiscreen EcosystemMultiplatform & Multiscreen Ecosystem
Multiplatform & Multiscreen Ecosystem
 
MMMedins: Multimedia Laboratories for Intangible Cultural Heritage
MMMedins: Multimedia Laboratories for Intangible Cultural HeritageMMMedins: Multimedia Laboratories for Intangible Cultural Heritage
MMMedins: Multimedia Laboratories for Intangible Cultural Heritage
 
SocialTV – Now. Status Quo & Outlook
SocialTV – Now. Status Quo & OutlookSocialTV – Now. Status Quo & Outlook
SocialTV – Now. Status Quo & Outlook
 
Francesca Bosco, Cybercrime e cybersecurity. Profili internazionali
Francesca Bosco, Cybercrime e cybersecurity. Profili internazionaliFrancesca Bosco, Cybercrime e cybersecurity. Profili internazionali
Francesca Bosco, Cybercrime e cybersecurity. Profili internazionali
 
Vergani, RGW 2011 1
Vergani, RGW 2011 1Vergani, RGW 2011 1
Vergani, RGW 2011 1
 
Cesare Del Moro, Strumenti informatici e telematici nella giustizia civile
Cesare Del Moro, Strumenti informatici e telematici nella giustizia civileCesare Del Moro, Strumenti informatici e telematici nella giustizia civile
Cesare Del Moro, Strumenti informatici e telematici nella giustizia civile
 
Jardin des Verbes
Jardin des VerbesJardin des Verbes
Jardin des Verbes
 
(ISM315) How to Quantify TCO & Increase Business Value Gains Using AWS
(ISM315) How to Quantify TCO & Increase Business Value Gains Using AWS(ISM315) How to Quantify TCO & Increase Business Value Gains Using AWS
(ISM315) How to Quantify TCO & Increase Business Value Gains Using AWS
 

Similar to Composite WPF

"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
 
Spring Architecture | Advanced Java
Spring Architecture | Advanced JavaSpring Architecture | Advanced Java
Spring Architecture | Advanced JavaVISHAL DONGA
 
A generic log analyzer for auto recovery of container orchestration system
A generic log analyzer for auto recovery of container orchestration systemA generic log analyzer for auto recovery of container orchestration system
A generic log analyzer for auto recovery of container orchestration systemConference Papers
 
How to Build Composite Applications with PRISM
How to Build Composite Applications with PRISMHow to Build Composite Applications with PRISM
How to Build Composite Applications with PRISMDataLeader.io
 
WPF and Prism 4.1 Workshop at BASTA Austria
WPF and Prism 4.1 Workshop at BASTA AustriaWPF and Prism 4.1 Workshop at BASTA Austria
WPF and Prism 4.1 Workshop at BASTA AustriaRainer Stropek
 
Large-Scale JavaScript Development
Large-Scale JavaScript DevelopmentLarge-Scale JavaScript Development
Large-Scale JavaScript DevelopmentAddy Osmani
 
Caliburn.micro
Caliburn.microCaliburn.micro
Caliburn.microbwullems
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to KubernetesSamuel Dratwa
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring FrameworkASG
 
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDEUse Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDEBenjamin Cabé
 
Eclipse plug in development
Eclipse plug in developmentEclipse plug in development
Eclipse plug in developmentMartin Toshev
 
Front end development with Angular JS
Front end development with Angular JSFront end development with Angular JS
Front end development with Angular JSBipin
 
Building scalable applications with angular js
Building scalable applications with angular jsBuilding scalable applications with angular js
Building scalable applications with angular jsAndrew Alpert
 
Sumo Logic Cert Jam - Advanced Metrics with Kubernetes
Sumo Logic Cert Jam - Advanced Metrics with KubernetesSumo Logic Cert Jam - Advanced Metrics with Kubernetes
Sumo Logic Cert Jam - Advanced Metrics with KubernetesSumo Logic
 
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 GuidanceOur Community Exchange LLC
 

Similar to Composite WPF (20)

"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...
 
Spring Architecture | Advanced Java
Spring Architecture | Advanced JavaSpring Architecture | Advanced Java
Spring Architecture | Advanced Java
 
Soft serve prism
Soft serve prismSoft serve prism
Soft serve prism
 
A generic log analyzer for auto recovery of container orchestration system
A generic log analyzer for auto recovery of container orchestration systemA generic log analyzer for auto recovery of container orchestration system
A generic log analyzer for auto recovery of container orchestration system
 
How to Build Composite Applications with PRISM
How to Build Composite Applications with PRISMHow to Build Composite Applications with PRISM
How to Build Composite Applications with PRISM
 
WPF and Prism 4.1 Workshop at BASTA Austria
WPF and Prism 4.1 Workshop at BASTA AustriaWPF and Prism 4.1 Workshop at BASTA Austria
WPF and Prism 4.1 Workshop at BASTA Austria
 
JavaScript Module Loaders
JavaScript Module LoadersJavaScript Module Loaders
JavaScript Module Loaders
 
Composite Application Library, Prism v2
Composite Application Library, Prism v2Composite Application Library, Prism v2
Composite Application Library, Prism v2
 
Large-Scale JavaScript Development
Large-Scale JavaScript DevelopmentLarge-Scale JavaScript Development
Large-Scale JavaScript Development
 
Caliburn.micro
Caliburn.microCaliburn.micro
Caliburn.micro
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 
Beyond OSGi Software Architecture
Beyond OSGi Software ArchitectureBeyond OSGi Software Architecture
Beyond OSGi Software Architecture
 
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDEUse Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
 
Building richwebapplicationsusingasp
Building richwebapplicationsusingaspBuilding richwebapplicationsusingasp
Building richwebapplicationsusingasp
 
Eclipse plug in development
Eclipse plug in developmentEclipse plug in development
Eclipse plug in development
 
Front end development with Angular JS
Front end development with Angular JSFront end development with Angular JS
Front end development with Angular JS
 
Building scalable applications with angular js
Building scalable applications with angular jsBuilding scalable applications with angular js
Building scalable applications with angular js
 
Sumo Logic Cert Jam - Advanced Metrics with Kubernetes
Sumo Logic Cert Jam - Advanced Metrics with KubernetesSumo Logic Cert Jam - Advanced Metrics with Kubernetes
Sumo Logic Cert Jam - Advanced Metrics with Kubernetes
 
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
 

More from Martha Rotter

EdTech 2012 Keynote: Digital Literacy - Your Message is Your Medium
EdTech 2012 Keynote: Digital Literacy - Your Message is Your MediumEdTech 2012 Keynote: Digital Literacy - Your Message is Your Medium
EdTech 2012 Keynote: Digital Literacy - Your Message is Your MediumMartha Rotter
 
Curing Your Skin With Food
Curing Your Skin With FoodCuring Your Skin With Food
Curing Your Skin With FoodMartha Rotter
 
Designing Narrative Content Workshop
Designing Narrative Content WorkshopDesigning Narrative Content Workshop
Designing Narrative Content WorkshopMartha Rotter
 
Introducing the Windows Phone Application Platform
Introducing the Windows Phone Application PlatformIntroducing the Windows Phone Application Platform
Introducing the Windows Phone Application PlatformMartha Rotter
 
OMG TMI!!!!!!!!111111111111111
OMG TMI!!!!!!!!111111111111111OMG TMI!!!!!!!!111111111111111
OMG TMI!!!!!!!!111111111111111Martha Rotter
 
Building Multi-Touch Experiences
Building Multi-Touch ExperiencesBuilding Multi-Touch Experiences
Building Multi-Touch ExperiencesMartha Rotter
 
Sketch Flow Overview
Sketch Flow OverviewSketch Flow Overview
Sketch Flow OverviewMartha Rotter
 
Creating Video Games From Scratch Sky Con
Creating Video Games From Scratch Sky ConCreating Video Games From Scratch Sky Con
Creating Video Games From Scratch Sky ConMartha Rotter
 
Client Continuum Dec Fy09
Client Continuum Dec Fy09Client Continuum Dec Fy09
Client Continuum Dec Fy09Martha Rotter
 
Silverlight Ux Talk External
Silverlight Ux Talk ExternalSilverlight Ux Talk External
Silverlight Ux Talk ExternalMartha Rotter
 
Podcasting Inside the Evil Empire
Podcasting Inside the Evil EmpirePodcasting Inside the Evil Empire
Podcasting Inside the Evil EmpireMartha Rotter
 
Silverlight For Students
Silverlight For StudentsSilverlight For Students
Silverlight For StudentsMartha Rotter
 
Silverlight2 Deepdive Mix08 External
Silverlight2 Deepdive Mix08 ExternalSilverlight2 Deepdive Mix08 External
Silverlight2 Deepdive Mix08 ExternalMartha Rotter
 
Ruby & Python with Silverlight O RLY? YA RLY!
Ruby & Python with Silverlight O RLY? YA RLY!Ruby & Python with Silverlight O RLY? YA RLY!
Ruby & Python with Silverlight O RLY? YA RLY!Martha Rotter
 

More from Martha Rotter (16)

EdTech 2012 Keynote: Digital Literacy - Your Message is Your Medium
EdTech 2012 Keynote: Digital Literacy - Your Message is Your MediumEdTech 2012 Keynote: Digital Literacy - Your Message is Your Medium
EdTech 2012 Keynote: Digital Literacy - Your Message is Your Medium
 
Beware the Shiny!
Beware the Shiny!Beware the Shiny!
Beware the Shiny!
 
Curing Your Skin With Food
Curing Your Skin With FoodCuring Your Skin With Food
Curing Your Skin With Food
 
Designing Narrative Content Workshop
Designing Narrative Content WorkshopDesigning Narrative Content Workshop
Designing Narrative Content Workshop
 
Introducing the Windows Phone Application Platform
Introducing the Windows Phone Application PlatformIntroducing the Windows Phone Application Platform
Introducing the Windows Phone Application Platform
 
OMG TMI!!!!!!!!111111111111111
OMG TMI!!!!!!!!111111111111111OMG TMI!!!!!!!!111111111111111
OMG TMI!!!!!!!!111111111111111
 
Building Multi-Touch Experiences
Building Multi-Touch ExperiencesBuilding Multi-Touch Experiences
Building Multi-Touch Experiences
 
Sketch Flow Overview
Sketch Flow OverviewSketch Flow Overview
Sketch Flow Overview
 
Creating Video Games From Scratch Sky Con
Creating Video Games From Scratch Sky ConCreating Video Games From Scratch Sky Con
Creating Video Games From Scratch Sky Con
 
Wpf Introduction
Wpf IntroductionWpf Introduction
Wpf Introduction
 
Client Continuum Dec Fy09
Client Continuum Dec Fy09Client Continuum Dec Fy09
Client Continuum Dec Fy09
 
Silverlight Ux Talk External
Silverlight Ux Talk ExternalSilverlight Ux Talk External
Silverlight Ux Talk External
 
Podcasting Inside the Evil Empire
Podcasting Inside the Evil EmpirePodcasting Inside the Evil Empire
Podcasting Inside the Evil Empire
 
Silverlight For Students
Silverlight For StudentsSilverlight For Students
Silverlight For Students
 
Silverlight2 Deepdive Mix08 External
Silverlight2 Deepdive Mix08 ExternalSilverlight2 Deepdive Mix08 External
Silverlight2 Deepdive Mix08 External
 
Ruby & Python with Silverlight O RLY? YA RLY!
Ruby & Python with Silverlight O RLY? YA RLY!Ruby & Python with Silverlight O RLY? YA RLY!
Ruby & Python with Silverlight O RLY? YA RLY!
 

Recently uploaded

Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 

Recently uploaded (20)

Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 

Composite WPF

  • 1. Composite Smart Clients with WPF Composite Application Guidance for WPF – “PRISM” Max Knor Developer Evangelist Microsoft Austria http://www.knor.net/
  • 2. Agenda A solution for… Complex WPF Applications Developing in Modules Composite Smart Clients No introduction to WPF 2
  • 5. Composite Smart Clients Configurable Extensible Unified Loosely Coupled Experience Communication Shared Central Services User Interface (Equilizer, Dolby...) 5
  • 6. WPF Composite Application Guidance Solution Package by Patterns & Practices Team Available in Source http://www.codeplex.com/CompositeWPF/ Reference Implementation (Stock Trader RI) Composite Application Library (Framework) Guidance (Documentation) http://www.codeplex.com/CompositeWPFContrib/ Community Add-Ons OutlookBar, Infragistics Support, … 6
  • 7. Architecture of Composite Smart Clients Main Application Module-Loader Svc. Service / Dependency Injection Container Shell ModuleEnumerator Shell ModuleLoader Region Region Presenter Region Core-Services RegionManger Module Logging View Presenter EventAggregator Custom Module Model Services 7
  • 8. Starting the Application Application Bootstrapper Unity Container Initialize Region Manager Container SomeClass Shell Display Shell Region Initialize Modules View Module Module 1 Enumerator Module 2 Module 3 Initialize Module Loader Module 4 8
  • 9. Dependency Injection mit Unity 1.) Register types with UnityContainer: this.Container.RegisterType<IMyView, MyView>(); this.Container.RegisterType<IShell, ShellWindow>(); 2.) Instantiate a new object (resolve instead of new) IMyView view = this.Container.Resolve<IMyView>(); Constructor is called, dependencies are filled automatically public class MyView : UserControl, IMyView { public MyView(IUnityContainer container, IShell shell) { // container & shell wurden automatisch befüllt } } 9
  • 11. The Shell Toolbars, …. Regions 11
  • 12. Starting the Application Application Bootstrapper Unity Container Initialize Region Manager Container SomeClass Shell Display Shell Region 12
  • 13. demo Shell & Regions Bootstrapper & Container
  • 15. Modules Grouped by UseCases, Functionality, … No reference to the Shell Shared Components Services, Interfaces, … in Shared Libraries Modules are dynamically loaded At runtime 15
  • 16. Starting the Application Application Bootstrapper Unity Container Initialize Region Manager Container SomeClass Shell Display Shell Region Initialize Modules Module Module 1 Enumerator Module 2 Module 3 Initialize Module Loader Module 4 16
  • 17. demo Modules Module Loading
  • 18. Dynamic Module Loading public class MyBootstrapper : UnityPrismBootstrapper { public class MyBootstrapper : UnityPrismBootstrapper ... { ... protected override IModuleEnumerator GetModuleEnumerator() protected override IModuleEnumerator GetModuleEnumerator() { { return new StaticModuleEnumerator() return new DirectoryLookupModuleEnumerator(@quot;.Modulesquot;); .AddModule(typeof(SomeModule)) } } .AddModule(typeof(AnotherModule), new[] {quot;SomeModulequot;) .AddModule(typeof(YetAnotherModule), new[] {quot;AnotherModulequot; }) } } Searching for modules in directory 18
  • 20. Implementing the Views Seperation of UI, logic and data Presentation View Model Model Presentation Model Responsible for data loading (from model) Instantiates the view View Binding to PM‘s commands and data 20
  • 21. Starting the Application Application Bootstrapper Unity Container Initialize Region Manager Container SomeClass Shell Display Shell Region Initialize Modules View (…) Module Module 1 Enumerator Module 2 Module 3 Initialize Module Loader Module 4 21
  • 22. Displaying views Region manager is needed public class MyModule : IModule { public void Initialize (IRegionManager manager) { RegisterViewsAndServices(); Region is retrieved IRegion orderRegion = manager.GetRegion(quot;OrderRegionquot;); var myOrderView = new OrderView(myOrder); orderRegion.Add(myOrderView); } } View is created View is shown 22
  • 23. demo View & PresentationModell
  • 25. Loosely coupled communication Requirements: No direct dependencies Shared Services Event Aggregator Weak Multicast Events Commands 25
  • 26. Commands public interface ICommand { event EventHandler CanExecuteChanged; bool CanExecute(object parameter); void Execute(object parameter); } MyCommand <Button Command=quot;...quot; /> Execute() CanExecute() 26
  • 27. demo Commands EventAggregator
  • 28. Shell Extensibility Modules can extend the shell with custom toolbars ShellWindow implements Interface IExtendableShell Access via UnityContainer Modules are only aware of IExtendableShell Breaking the dependency to shell implementation 28
  • 29. Shell Extensibility IExtendableShell.cs: public interface IExtendableShell { void AddToolBarItem(object identifier, string text, ICommand command); void RemoveToolBarItems(object identifier); void ShowStatusBarText(string text); } ShellWindow.cs: public ShellWindow : Window, IExtendableShell { .. } MyBootstrapper.cs: this.Container.RegisterType<IExtendableShell, ShellWindow(); Im Modul: var shell = this.Container.Resolve<IExtendableShell>(); shell.ShowStatusBarText(quot;blaquot;); //nur IExtendableShell sichtbar 29
  • 30. Composition Commands Composite Submit All Command OrderDetail OrderDetails OrderDetails OrderDetails s Submit Submit Submit Delegate Commands 30
  • 31. Summary Composite Smart Clients Extensible Architecture Build in a modular way Independent modules enable Parallel Development of modules Flexible deployment Composite Application Guidance Library providing Infrastruktur Tips Interfaces reduce dependencies (z.B.: UI Testing) Event Aggregator can get evil  (event loops) 31
  • 32. Contact Max Knor Developer Evangelist Microsoft Austria http://www.knor.net/ 32