Giter VIP home page Giter VIP logo

dynamicmodules's Introduction

Dynamic Modules

Dynamic Modules is a sample prototype for a WPF modular application based on the Prism Library and the Modern UI for WPF (MUI) Toolkit. It is a proof of concept for creating metro-styled, modern UI WPF applications in a plugin architecture.

A little while ago, a colleague of mine told me about a problem he had to solve. A customer asked him to develop a desktop application that presents a different set of features in accordance to which of the enterprise offices is running the software. On the one hand, I remembered how to do that from a past project where I was involved. On the other hand, there is an open source project for creating WPF applications with a modern look & feel, which I am following since a couple of years because I think it's really great.

I wondered if there is a way to solve the problem by using Prism and the open source MUI library for creating a plugin architecture, and came up with a prototype solution which I am presenting here.

The central ideas for the proposed plugin architecture are:

  • Put into a directory the desired project modules (or put them all and run a filter on loading time).
  • Dynamically load the project modules from the modules folder.
  • Each module exposes an entry point for an option in the main menu.
  • Dynamically build the main menu from the loaded modules.
  • The first option in the main menu is fixed and common for every user.
  • A core module with shared services, repositories, DTOs, data model definitions, etc., is statically loaded. It can be referenced by any solution project.

Dynamic Modules are copied to a directory as part of a post-build step. These modules are not referenced in the startup project and are discovered by examining the assemblies in a directory. The module projects have the following post-build step in order to copy themselves into that directory:

xcopy "$(TargetDir)$(TargetFileName)" "$(TargetDir)modules" /y

Note that the solution is built into "..\bin" folder.

WARNING! Do not forget to build the solution (F6) before each running so the modules are copied into the modules folder.

Links of interest

You may find complementary information at:

*Currently there is no need to "implement" the IView interface in the view's code-behind.

Contributors

dynamicmodules's People

Contributors

hinojosachapel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.