Answer the question
In order to leave comments, you need to log in
How to organize a fully modular application?
Good day! At the moment I'm in the process of learning all the charms of the C # programming language. Interested in whether it is possible to develop a fully modular application, namely, there is a core (an application with the main program window, as well as a module loading system) and the modules themselves (dll libraries). I have already developed an application that can load plugins dynamically, but the point is that there is no communication between the modules themselves. Here is an example of what is needed:
MyApp (program kernel) loads sql_engine.dll (application database management) and, for example, inter-audio.dll (internet player module) libraries. At the same time, communication occurs between sql_engine.dll and inter-audio.dll during operation (let's say that information about listened tracks is written to the program database using sql_engine.dll)
Answer the question
In order to leave comments, you need to log in
Dig towards the DI container. MEF, Unity, Windsor, Autofac, Ninject of your choice and effort.
I will be brief, there is no problem in the above, the only thing you need to organize correctly is the interface part, because the modules are different and their data is also different, the kernel must be able to understand them all and, accordingly, everything possible must be implemented in the interface, and then communication with the modules occurs through the interface and the kernel does not care what is implemented in the Dll itself, the main thing is that it communicates with the kernel through the same interface.
In general, there is no practical sense in absoluteness, modules are needed but not everywhere.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question