WPF, love it or hate it?
-
Well, WPF is built on DirectX. which means that any traditional limitations of controls, don't exist. It means all controls are integrated. It means you can draw a control any way you like. It also means you can animate things, such as windows that fly open, tabs that animate shut, etc.
Christian Graus Driven to the arms of OSX by Vista.
Christian Graus wrote:
windows that fly open, tabs that animate shut
X| I just want an interface that works quickly and cleanly. Animations are the first thing to go. No matter how powerful a machine I get it will always be displaying the simplest interface I can make the OS display.
-
WPF sounds like a good idea, but I'm wondering if it's worth the learning curve. Has anyone here actually used it successfully? Any positive or negative comments?
DP
I like it. Being a web developer mainly, I find it WPF to be a much more natural way of doing desktop apps than WinForms, MFC etc. Obviously it is not as mature as WinForms, but is has some very nice ideas. For example the concept of using composition in the UI is absolutely wonderful. I also like the command concept, although it is a bit rough on the edges (no built in undo for example). The resolution independence is also nice - although it is a bit more complex than that in real life. Data binding is also nice. How one can use resources and styles is also very nice. Basically WPF combines the best of web and traditional desktop application development.
"When you have made evil the means of survival, do not expect men to remain good. Do not expect them to stay moral and lose their lives for the purpose of becoming the fodder of the immoral. Do not expect them to produce, when production is punished and looting rewarded. Do not ask, `Who is destroying the world?' You are."
-Atlas Shrugged, Ayn Rand -
Christian Graus wrote:
windows that fly open, tabs that animate shut
X| I just want an interface that works quickly and cleanly. Animations are the first thing to go. No matter how powerful a machine I get it will always be displaying the simplest interface I can make the OS display.
Simplest isn't always best for everybody. Animations as visual cues for things changing is incredibly useful in learning and every day use. So many times I've clicked on a menu item or a button and something change on the screen but I was too slow to catch it. Animation helps people link actions to results. Animations for animations sake though - waste of time. But animation as part of a useful design - very useful stuff!
-
Well if you think you must use XAML to use WPF, then you should go back and learn more about it. You really do not have to do that, although it is very convenient and elegant when used correctly. All the classes used in WPF are part of the dotnet framework so you can do everything manually if this is your vehicle of choice, but XAML will help keep complexity down.
thrakazog wrote:
There is also no visual inheritance
There is actually visual inheritance, although it could be improved. This is what templates are about.
You are right, you don't HAVE to use XAML, but when all the tools surrounding WPF all revolve around XAML, the choices are limited. XAML is okay, I just wish there was something better.
-
WPF sounds like a good idea, but I'm wondering if it's worth the learning curve. Has anyone here actually used it successfully? Any positive or negative comments?
DP
Hate it. I like Adobe's Flex platform much more. Databinding is much more intuitive, controls can be styled with regular CSS and I feel it provides more seperation between layers. Flex feels like a presentation layer. To me WPF feels like a mix between presentation and biz logic. Animations render far more smoothly in Flex as well. WPF doesn't do what you expect it to do sometimes given the XAML I'm staring at - therefore I've renamed it WTF. The Expressions stuff is odd - difficult to figure out.
-
WPF sounds like a good idea, but I'm wondering if it's worth the learning curve. Has anyone here actually used it successfully? Any positive or negative comments?
DP
That's actually a tough call. Here are the facts: * It's far more capable than WinForms, and is undoubtedly the "next generation". * It's complicated as hell, and will no doubt frustrate you beyond measure in your attempt to learn it. So it's a toss-up. If you really want a "chewy" app with all sorts of fancy capabilities, then I would say it's worth the pain learning it, but if you don't need it, it's not at a point where I can wholeheartedly say go out and learn it already, because I know how much it hurts. :P I will say this though: I love what I can do with it, but I hate how I have to go about doing it.
Sad but true: 4/3 of Americans have difficulty with simple fractions. There are 10 types of people in this world: those who understand binary and those who don't. {o,o}.oO( Check out my blog! ) |)””’) http://pihole.org/ -”-”-
-
What is it about WPF that gives it a "Wow" advantage over using standard controls? I've heard comments like this, but I don't understand the difference. I'm sure that's because I know little about WPF at this point, but I'd love it if you could elaborate.
DP
Two things that I think were done exceptionally well in WPF are the layout model and the content model. I love the choices we have in designing a declarative, dynamic layout (StackPanels, DockPanels, WrapPanels, Grid) rather than the comparatively limited layout options in WinForms. It makes designing the dynamic resizing of a window in WPF a breeze. The content model is equally as great, as it allows you to embed anything inside any content control, like adding custom user controls inside a button or tab header for example, or pictures with transforms. You aren't limited to supporting only media types that the control designer intended, as you are with WinForms. It's completely universal. You can even embed blocks of custom content into a flow document, and have text flow around it and stuff.
Sad but true: 4/3 of Americans have difficulty with simple fractions. There are 10 types of people in this world: those who understand binary and those who don't. {o,o}.oO( Check out my blog! ) |)””’) http://pihole.org/ -”-”-
-
I have, in small apps. I like it. The declarativeness, the ease of binding data to the UI.
I'm going to have to disagree with you on that one. While I agree the DataBinding is certainly powerful (and can, in certain scenarios be very simple), there are cases where the binding syntax can become quite horrific indeed. For example, imagine something like this:
-
Edbert P wrote:
we're programmers, not designers
Now that's my problem. I'm a data centric developer, I'm bloody hopeless at good GUI design (the reason I hate the web - all presentation) and WPF seems to be all about GUI. I have all my GUIs set up for late binding and no longer have to think about it and along comes WPF which wants let me bind EVERYTHING. Bloody new fangled technologies, MS always putting up new toys to play with and you can never be sure which ones will last grumble grumble mutter mutter
Never underestimate the power of human stupidity RAH
Well, it is called Windows Presentation Foundation ;)
Sad but true: 4/3 of Americans have difficulty with simple fractions. There are 10 types of people in this world: those who understand binary and those who don't. {o,o}.oO( Check out my blog! ) |)””’) http://pihole.org/ -”-”-
-
That's my biggest gripe with it as well. Why use XML? honestly! Things would be so much simpler to understand if it used a format that was more tailored to the purpose. XAML is so exceedingly hard to read, one wonders why it was done that way. I'm sure there are lots of good technical reasons, it is just a shame is all. WPF has so many great concepts, but some parts of it are just mind bogglingly frustrating.
I wholeheartedly agree. XML is a horrible syntax to type by hand, even with Intellisense. I also strongly recommend Pete O'Hanlon's MoXAML Power Toys[^] if you do a lot of work with XAML/WPF as it allows proper XAML commenting and auto-generation of DependencyProperties.
Sad but true: 4/3 of Americans have difficulty with simple fractions. There are 10 types of people in this world: those who understand binary and those who don't. {o,o}.oO( Check out my blog! ) |)””’) http://pihole.org/ -”-”-
-
I'm going to have to disagree with you on that one. While I agree the DataBinding is certainly powerful (and can, in certain scenarios be very simple), there are cases where the binding syntax can become quite horrific indeed. For example, imagine something like this:
chaiguy1337 wrote:
I'm going to have to disagree with you on that one
That's OK - no law against that...yet ;P
chaiguy1337 wrote:
there are cases where the binding syntax can become quite horrific indeed
Yeah - I never got anything as bad as that. I was throwing Booleans and collections of objects around and it was all pretty simple.
-
I took a look at it, could find no justification for using it in the business apps I write, however I might look at it again next new project I embark on simply for the lone fact that I like the idea of a UI done with vector graphics, the rest is irrelevant to me.
"It's so simple to be wise. Just think of something stupid to say and then don't say it." -Sam Levenson
wow, personally a data binding model that actually works was enough incentive to use it for new projects.
-
wow, personally a data binding model that actually works was enough incentive to use it for new projects.
steven.higgan wrote:
a data binding model that actually works
:confused: I guess my thousands of customers worldwide using our winform app are all mass hallucinating that the databinding is working every day for years now? :)
"It's so simple to be wise. Just think of something stupid to say and then don't say it." -Sam Levenson
-
WPF sounds like a good idea, but I'm wondering if it's worth the learning curve. Has anyone here actually used it successfully? Any positive or negative comments?
DP
WPF is simply awesomesaurus. Finally, the only limit to GUI design is your imagination. It took me two weeks and a good book to learn it well enough to use in a project.
-
I'm going to have to disagree with you on that one. While I agree the DataBinding is certainly powerful (and can, in certain scenarios be very simple), there are cases where the binding syntax can become quite horrific indeed. For example, imagine something like this:
chaiguy1337 wrote:
For example, imagine something like this:
I doubt that those of us who are unfamiliar with WPF could consciously imagine that (to dream it would surely be a nightmare). What does it actually do?
-
chaiguy1337 wrote:
For example, imagine something like this:
I doubt that those of us who are unfamiliar with WPF could consciously imagine that (to dream it would surely be a nightmare). What does it actually do?
Oh nothing that I can imagine. I just intentionally constructed the longest syntax I could, using all the various options. Chances of this arising "in the wild" are slim, and good design can avoid having to resort to something like this, but my point was that DataBinding actually has a lot of complicated subtleties you have to (or should) be aware of. ...and I didn't even show the implementations of the converters. ;)
Sad but true: 4/3 of Americans have difficulty with simple fractions. There are 10 types of people in this world: those who understand binary and those who don't. {o,o}.oO( Check out my blog! ) |)””’) http://pihole.org/ -”-”-
-
My experience so far, it's great for business and non business apps that have rich UI. What lets WPF down it when it comes to process large amounts of information. For example I have a SQL studio written in Winforms that uses a custom listview for output/results, using the listview in WPF is 50% slower, this is purely down to the way WPF presents and renders UI and data. I thought going direct through DirectX would improved performance.
Software Kinetics - Moving software
Norm .net wrote:
Winforms that uses a custom listview for output/results, using the listview in WPF is 50% slower
Actually it should not. You might have to reconsider the way you use the listview. I do not know what kind of tests you have done to come up with this number, but it is not justified. (And no you do not have to use directx to re-implement a listview)
-
WPF is simply awesomesaurus. Finally, the only limit to GUI design is your imagination. It took me two weeks and a good book to learn it well enough to use in a project.
CannibalSmith wrote:
and a good book
wanna tell us which book?
-
CannibalSmith wrote:
and a good book
wanna tell us which book?
-
WPF sounds like a good idea, but I'm wondering if it's worth the learning curve. Has anyone here actually used it successfully? Any positive or negative comments?
DP
WPF looks cool, the screens you can make with animation. But the learning curve is too steep. I used up over a week to figure out how to get vertical lines to appear on a data grid, and not even the one provided in WPF. The databinding is really great to get tabled data onto a data grid, but the styling is painful. It required more time than I had. Prior to that, I spent some time investigating 3rd party libraries from DevExpress and Infragistics for WinForms. After my trials with WPF, my company decided to embark on using Infragistics. Our data is very much tabular what we display to the user. Infragistics allows us to have simple databinding, either to a database table, xml data, or internal List<> or array. Setting up the styling (attributes) is lengthy, since there are so many. There are close to 1,000 attributes that you can set for a data grid. And, you can either set them up programatically, in the property window of VS, or their own dialogs. Now, people at my company are creating applications that look like they were made in WPF, using Infragistics WinForms. Note that both Infragistics and DevExpress are costly libraries, but they have a pay schedule and DevExpress offers some free UI controls. Happy UI coding.