is WPF THE choice for windows apps? [closed]
Asked Answered
H

6

10

I am developping in Ironpython with Visual Studio 2010 through PTVS.

I see that WPF is quite slow compared to the silverlight equivalent... at least to me. My program does a lot of calculations but the user interface is really simple. I have read lots of WPF vs Silverlight questions and this one too. I heard about silverlight out-of-browser mode... I don't know what to think about it.

I am a little bit confused, I need my application to be fast, I don't need much things concerning the user interface. It is a windows app only, it is only destined to run on the user computer.

so, is wpf actually the best choice in this case?

Thanks

Hog answered 27/10, 2011 at 14:53 Comment(4)
If the user interface is really simple, you can detach it from your bussiness logic (using the MVP pattern, for example) and have more than one view (WPF, Silverlight). Your GUI toolkit then becomes a configuration parameter (your app becomes "skinnable"), and you can try them out and compare them easilyEnwreathe
@dario_ramos: In theory. In practice I doubt it ever happens.Insolvent
@Ray: Since he has a simple GUI (i.e. small), I thought he could afford the time to implement more than one viewEnwreathe
Unfortunately asking what's "best" is too subjective for SO. Can you rephrase your question to be more objective? E.g. "What benefits does WPF have over classic Windows Forms?"Eckardt
B
16

To be honest, contrary to all the other comments. I use WPF even for simple applications. In fact it really helps avoiding alot of necessary code on other ui frameworks. I like the fact that using WPF i can directly think about the data i'm going to modify, without writing alot of event handlers for adding items to collection, showing them in a list etc. Also WPF is not bound to use MVVM, just use a class that combines both view model and model. After using WPF alot, i can't imagine to use Windows Forms again.

But of course this is just my personal opinion. In the end always use the tool best suited for your problem at hand. If you don't know WPF and you want to use it just for a small applications, i would suggest windows forms or something else.

Baguio answered 27/10, 2011 at 15:18 Comment(2)
+1: A key point is productivity is also going with what you know well. I still write the odd Win forms app, but do prefer WPF now that I have spent a lot of time with WPF/Silverlight & Expression Blend. MVVM binding is so much simple to work with.Swope
This is what I was trying to say, but you've said it so much better.Hedvig
A
2

In my subjective opinion no. The best option would be winforms. I find it quicker in development and you have more documentation and support online. WPF is more user interface based and uses naturally the MVVM paradigm. For a simple app it is simply too much bloat.

Acidforming answered 27/10, 2011 at 15:0 Comment(0)
B
1

If your user interface is really simple, then I'd say winforms would probably be simpler. WPF is very powerful but with power comes complexity and a learning curve.

Speed shouldn't be an issue though given a simple interface.

Benjy answered 27/10, 2011 at 15:3 Comment(0)
T
1

If your UI is really simple and a browser based application would be suitable go for Silverlight, Since silverlight uses a stripped down version of .Net it is going to perform faster. However I was recently writing an application with a fairly complex UI using quite heavy grids / treeviews with a lot of data and implementing custom behaviour, I never personally noticed the application running slowly or considered WPF to be slow.

In comparison it is slower than silverlight but if your UI is fairly simple how much slower would it be in reality?

Also since silverlight uses a stripped down version of .Net is there any features you may need behind the scenes that silverlight doesnt support?

I would disagree with @Daniel Casserly about WPF / MVVM being too bloated for a simple application, MVVM nicely seperates out your UI from the logic behind it and will allow for expansion of this application if neccecary. I prefer the WPF way of databinding and also designing a UI in XAML over the Winforms method though this may just be personal preference.

If you have never used WPF before it is not too hard to learn to make a basic UI

Tejeda answered 27/10, 2011 at 15:4 Comment(0)
H
1

WPF is "the" choice for Windows apps when you have a designer and a developer who both know WPF well, and can code to abstractions without hanging on each other when developing their half of the application.

Otherwise, you're both going to be very angry with each other, development will be slow, and you'll wonder why you didn't just use good old WinForms to begin with.

Chances are, unless you have a designer who has a great vision for the UI and and a lot of experience wit WPF, you're not going to be exploiting what WPF has to offer.

Edit:

Just realized you said the user interface is really simple. Skip WPF for now, use WinForms, and do it Model View Presenter style. That way, if you need to update to WPF later, it won't be a huge ordeal. (MVP is great for code readability and testing anyways).

Hedvig answered 27/10, 2011 at 15:4 Comment(1)
well as winforms designer interface is not available in visual studio with Ironpython, I guess I have to go with WPF.(I am the developper and designer)Hog
A
0

just to say, with blend and all the tooling you get your ui done very fast. Learning winforms is at least not for the future, xaml is everywhere. Wpf takes relatively much resources and loads up slowly, but with simple async programming its more than performant enough. Sl out of browser is another option, for more lightweightability.

Albin answered 27/10, 2011 at 16:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.