Should I use Prism for developing simple desktop applications? C#
Asked Answered
N

3

5

I want to move on to WPF applications and convert my win-form apps(into WPF)

At the moment there is too much to learn about WPF in order to get nice application...

I found Prism : http://msdn.microsoft.com/en-us/library/gg406140.aspx

And I believe that this can be a shortcut that will allow me to get the cool abilities of WPF by simply adding my business logic.

  1. Do you recommend the Prism for a WPF beginner?
  2. Will it be possible to remove the Prism and build my own UI after I'll get more experienced with WPF?

    • If you have other ideas for creating desktop application that support multiple views and navigation - please let me know

Thanks.

Nur answered 11/4, 2011 at 16:28 Comment(4)
Maybe not Prism, but a DI library like Unity or Ninject would be a good idea. I don't think an MVVM library is necessary, since it's trivial to implement the basics on your own.Hammonds
The answer to both your questions is no. This library is good for large applciations with >10 developers on the UI side. Use simple MVVM. What about your application - I would use tabs with close buttons like in VS2010. If you want to navigate to a view - open a new tab. If you want to leave a view - close the tab. Each tab can have different view and not depend on other tabs.Mitchum
@ vorrtex: I find tabs very handy. Yet I think they are quiet complicated for the simple user. I want a simple ui for the user that will put the navigation logic on me: The user does not need to understand that there is more info on another tab.Nur
Tabs aren't complicated at all. Let's take a web browser as the example, I bet that any user can understand that other tabs have additional information. This interface is the most modern and has taken the place of multi-windowed interfaces and MDI.Mitchum
L
17

No, Prism is a big layer that sits on top of WPF (or Silverlight). It will not make learning WPF any easier or remove the need to learn how WPF works. Prism is a very powerful abstraction layer that can accelerate the creation/maintenance of large enterprise applications - but it has a steep learning curve beyond the learning curve of WPF. If you are just building a simple application, build it in straight WPF. The things you learn doing that will help you later build things with Prism. To really be effective with Prism, you need to be comfortable with a lot of the more complex aspects of WPF development such as bindings, XAML, and the MVVM design pattern. Start by learning those things in isolation on a small project and then you have a better shot at using Prism effectively on a larger future project.

Lanell answered 11/4, 2011 at 16:34 Comment(3)
@Levy: What I really need is something like mdi form... A main form in which pages are replaced according to the parent navigation. I read that mdi is a bad practice and mvvm should be used. As you can see I'm new to the mvvm as well. So can you offer me a startup project that is less complicated than prism but have the mdi look and feelNur
Learning Prism before having at least a basic understanding of WPF is like building a mansion before you know how to build a dog house.Strata
@Nur I suggest you edit your question (or ask a new one) specifying that you want to move from Windows Forms MDI to WPF, and what the best way of learning WPF would be.Strata
T
5

The answer which has been provided by Robert Levy is perfect, I would add something that when you move from Windows Forms to WPF try to avoid using same patterns which you can use in Windows Forms. Try to learn how tasks could be accomplished using WPF before starting implementation.

You can find here very good resource to learn MVVM pattern.

Tegantegmen answered 11/4, 2011 at 16:43 Comment(0)
T
1

As other answers have suggested, Prism won't shortcut WPF learning. Prism is more about partitioning applications into modules, and developing each module independently.

Here are my suggestions:

  • Don't try to learn all of WPF. You can write great line-of-business apps with relatively little WPF.

  • Learn the MVVM pattern. MVVM is widely used to separate UI concerns from the back-end concerns of an app.

  • Learn Prism. It's useful for all but trivial apps. It does a good job reducing the complexity of WPF applications, and it reduces coupling between the parts of an app. Once you get the hang of it, it really does make apps easier to maintain and develop.

There are articles on CodeProject (including mine) and elsewhere to get you started on all of these topics.

Torpor answered 22/4, 2011 at 20:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.