[WPF/Prism] When to create a new module?

I'm currently learning about using Prism in a WPF application and came across this answer on StackExchange that raised some questions. The first point they make is to not have too many modules. As of right now I'm a victim of what they described: I thought it would be best to create an individual module for each view. It sounds like this isn't the case, but I'm not 100% sure on what each module should contain then.

To provide some context, my application has five main regions: login, search, search results, data display, and data control (I won't get into specifics of what each does; they all have specific and outlined roles in the application). Some of these will only have a single view (login and search), but the others will have multiple views. Right now all of those views are their own module. Would it be more appropriate to break the project down as follows?

  1. Main application
  2. Login module
  3. Search module
  4. Search results module
  5. Data display module
  6. Data control module

I can subdivide the modules with folders from there. Is there some other set description of when to divide something into its own module?

by Vartib via /r/csharp

Leave a Reply