My idea is to separate the application into three different files, in the file MinhaAppBackend.dll
, it will be, as the name suggests, all classes and other elements that are part of the application backend (Model, ViewModel, Daos etc ).
In the MinhaAppFrontend.dll
file everything will be related to the application's GUI (WPF) part (main window, dialogs, child windows, etc).
The MinhaApp.exe
file will only be the starting point of the application, it will only be responsible for calling the main window that is in the MinhaAppFrontend.dll
library. Contrary to what most do is to leave the front-end in the .exe
file with the main
method generated at compile time. In my case it will be "dumb", it will have the only function of being the start of the application.
For the front end, my idea is a WPF User Control Library
project, which compiles GUI elements (WPF) to dll
.
The project that will generate the .exe
file references the dll
containing the front-end and "calls" the main window. I have not yet implemented this "solution model", I just idealized it.
What do I want?
Know the opinion of the class about this idea of "solution design", that is, if this can bring me some problem or some extra difficulty or if it may be incompatible with the MVVM (analyzing without putting my hand in the mass I think who did not).
I also want to know what the main method would look like to load and display the main window that is in dll
.
I am posting the link for a demo project, in case anyone needs to see what I want in practice.
The solution has two projects one deletes is a Console Application
that generates one executable the other is a WPF User Control Library
that generates a window in a dll.