Coffeehouse Thread

138 posts

Do you find WPF to be unnatural / unlogical?

Back to Forum: Coffeehouse
  • TommyCarlier

    @brian.shapiro: The last time I tried Long Zheng's twitter app, it made my computer very slow. It even made the mouse pointer stutter continuously. No app has ever done that.

  • battlebottle

    @TommyCarlier: There's been come dramatic speed improvements over the last few releases. I also find the WPF aspect of live messenger pretty engaging and pleasant, though i find a lot of other things about that program to be pretty poor. I feel like WPF is a lot like flash, both technically and in a lot of practical ways. A lot of people who make flash or WPF applications get carried away with gratuitous animations and graphics which turns the program into a sluggish memory hog. It is possible to write great and performant apps with wpf. Metrotwit and live messenger 2011 are two of those. It's also not a long way from how people often say c# and java applications are all slow and terrible, but the problem if often that both platforms make it easier to write lazy code. there is nothing in each technology that prevents good applications being written in them and there are plenty of examples of that.

    The biggest problem with wpf afaics, is that it's easy to create interfaces that are unperformant. There's nothing intuitive to the programmer as regards to what they need to do to make sure the application always run fast on the targeted hardware. It takes a programmer who knows alot of the ins and outs of the framework to write a good app using it. knowing when to use bitmapCache is one major example.

  • W3bbo

    There's been come dramatic speed improvements over the last few releases. I also find the WPF aspect of live messenger pretty engaging and pleasant, though i find a lot of other things about that program to be pretty poor. I feel like WPF is a lot like flash, both technically and in a lot of practical ways. A lot of people who make flash or WPF applications get carried away with gratuitous animations and graphics which turns the program into a sluggish memory hog. It is possible to write great and performant apps with wpf. Metrotwit and live messenger 2011 are two of those.

    WLM2011 isn't a WPF application.

    It's also not a long way from how people often say c# and java applications are all slow and terrible, but the problem if often that both platforms make it easier to write lazy code. there is nothing in each technology that prevents good applications being written in them and there are plenty of examples of that.

    There is. It depends on the quality of the widget and windowing libraries provided on the platform and how well they wrap around native system features or imlement their own equivalents (as WPF does).

    Java's Swing and AWT, for example, are designed to be as cross-platform as possible, so they don't expose Windows-only features, and miss out on other things (Aero button animations, for example, or proper spacing for Tab controls, things like that), and that's assuming developers use the "native" lookAndFeel option, which you have to explicitly set, otherwise you get the horrendous Sun-designed themes.

    I'll admit that you can push things to get the right result, but in many cases that requires truely excessive amounts of work (such as implementing your own widget library from scratch, and no-one wants to have to do that). 95% of the time developers will use the libraries they're given and just get to work on their domain-specific coding. It doesn't matter to them if the library has a 750ms initialisation time with O(n^2) widget drawing time complexity because they don't want (or can't afford) to shift technology platforms. That's why I'm wary of suggesting anyone use WPF because by the time they realise that the end-product will be awful they've run out of time to fix WPF's shortcomings or move back to WinForms. End result: they push out a slow desktop application with horrendously anti-aliased text and widgets that don't respect the current system visual style and colour scheme.

    The biggest problem with wpf afaics, is that it's easy to create interfaces that are unperformant. There's nothing intuitive to the programmer as regards to what they need to do to make sure the application always run fast on the targeted hardware. It takes a programmer who knows alot of the ins and outs of the framework to write a good app using it. knowing when to use bitmapCache is one major example.

    "Performance" can refer to many things. Throughput, smoothness, latency, and so on. I'm seeing a trend in software lately to focus more on throughput so latency suffers. There are also many other qualiatative measures regarding how good a UI framework is. For example one issue with WinForms that irks me how if you have a Form instance with lots of controls on it (even just a lot of buttons and textboxes) things slow down tremendously (note this has nothing to do with double-buffering).

  • AndyC

    , W3bbo wrote

    *snip*

    And I'll remind everyone of one, key, fact:

    There does not exist a single non-Microsoft WPF application that doesn't want to make me tear my eyeballs out. And many first-party WPF applications are still highly suspect.

    I could say much the same about HTML5 'applications'. So let's ditch that too while we're at it, eh?

     

  • brian.​shapiro

    @TommyCarlier:

    I haven't tried Long Zheng's app actually, I've only seen screenshots. I thought W3bbo was talking about the visual appearance only.

    The things I've been working on don't seem to slow down my computer, though.

  • battlebottle

    I feel WPF does have a lot of poorly conceived aspects to it, and there are many applications where it's use is completely unsuitable where that really shouldn't be the case. I'll admit I don't know enough about other UI frameworks to compare it to them well, but there's certainly a lot of times where I've found it brilliantly suitable for certain kinds of applications.

    WLM2011 isn't a WPF application.

    I would beg to differ. it doesn't show up on snoop, but I would be absolutely stunned to find the vast majority of the UI was not driven by wpf. If you have any source regarding it not being wpf driven I'd genuinely love to see it.

    horrendously anti-aliased

    This problem was fixed with wpf 4. Though the font rendering mostly looked bad because it jarred with font rendering in the rest of windows. Text rendered with GDI is not sub pixel positioned, in contrast to mac osx and linux. Whether this is a good or bad thing is a matter of taste. Many people prefer not to use anti-aliasing of any sort. IE9 will be using sub-pixel positioning and I'm willing to bet all text rendering will all be sub-pixel positioned going forward.

     

  • longzheng

    Yes.

  • raptor3676

    @longzheng:

    Well, from work you made with, my now favourite twitter client, I would have though WPF made a lot of sense to you.

     

  • longzheng

    , raptor3676 wrote

    @longzheng:

    *snip*

    Well, from work you made with, my now favourite twitter client, I would have though WPF made a lot of sense to you.

    Brute force comes to mind.

     

  • figuerres

    , W3bbo wrote

    And I'll remind everyone of one, key, fact:

    There does not exist a single non-Microsoft WPF application that doesn't want to make me tear my eyeballs out. And many first-party WPF applications are still highly suspect.

     

    Suspect of what ??

    and i will say that i have a few apps that seem to do ok.

    not masterpices of art or design but they look ok  and work well on normal hardware.
    I think you just have not seen many apps.
    some like mine are customer for a given customer and not in mass market.
    but they should not make any one wish to remove anyones eyes (mine or the users)

    Smiley

  • W3bbo

    I would beg to differ. it doesn't show up on snoop, but I would be absolutely stunned to find the vast majority of the UI was not driven by wpf.

    My understanding is that WLM2011 uses a derivation of the non-public DirectUI API that supports 3D transforms (regular DirectUI is 2D-only. For more information on DirectUI you need to consult the court documents for one of Microsoft's lawsuits a few years ago).

    If you have any source regarding it not being wpf driven I'd genuinely love to see it.

    Take a look at the MSNMsgr.exe (version 15.4, the latest), if you take it apart and look at the RVA Data Directory section you'll see the 14th entry (reserved for the CLR runtime header's RVA) is marked as null. Meaning msnmsgr.exe contains no managed code.

    My current computer is XPx64 and its PE headers mark it as NT6+ so my kernel's loader refuses to run the executable, but I assume that evidence is good enough for you.

    Or run Messenger yourself and open up Process Explorer, you'll see there aren't any CLR modules loaded (hint: look for mscoree.dll which contains the CLR's entrypoint) and especially not System.Windows.dll (where WPF's public API lives).

    This problem was fixed with wpf 4. Though the font rendering mostly looked bad because it jarred with font rendering in the rest of windows. Text rendered with GDI is not sub pixel positioned, in contrast to mac osx and linux. Whether this is a good or bad thing is a matter of taste. Many people prefer not to use anti-aliasing of any sort. IE9 will be using sub-pixel positioning and I'm willing to bet all text rendering will all be sub-pixel positioned going forward.

    Sort-of. WPF uses subpixel positioning for all font-sizes, which is why it looks bad. WPF4 can correct this (by letting you choose) but you have to opt-in to it, which I feel is a mistake. WPF4 should be grid-snapping at small font sizes and then move on to 'pure' type rendering at larger sizes (this is what OS X has done since the beginning). I'm indecisive on the issue, I find grid-snapping makes type more 'cleaner' because it gives them more defined and contrasted edges, whereas WPF4's "Ideal" rendering method (like OS X) has the habit of blurring the edges. Call me a partisan, but I'd like grid-snapping to remain the default on Windows, let Apple keep their 'Ideal' rendering, I prefer hard edges.

  • W3bbo

    Suspect of what ??

    Nothing, it's a turn of phrase. I'm saying that the amount of effort Microsoft puts into some of their WPF-based applications is questionable. That I don't trust them to maintain high standards of quality across the board consistently.

    Visual Studio 2010's GUI is WPF, but that doesn't make it perfect. I, myself, have many issues with it (menus are laggy on my 6-month old laptop, for example). It's not a deal-killing issue (no, the inherently broken Help system was) but just something that irks me. And when a product has too many things that irk me, it damages my impression of the product and makes me want to look for a competitor that 'feels' better to me.

    For example, I skipped Office 2007 because I found the UI too cluttered, the help system lacking (not saying 2003's is any better, however), the hard-coded colour schemes inflexible, some parts laggy, and Access (which I used a lot at the time) had a really degraded user experience (the home page is full of adverts, wtf). I was tempted to overlook Office 2010 too, but I'm pleased they fixed it up, but had Office 2007 had a better qualiatative experience I'd have certainly gone with it.

    Other examples of 'tiny things adding up to make me abandon-ship' include:

    • Moving from WMP9 to WMP10, then realising Winamp is what I'm looking for
    • Windows Mobile 5.x, then seeing that Windows Mobile 6.0 was awful ('glass' gradients do not work on mobile 16-bit displays) and WM6.1 and 6.5 were just mere facades over decades-old platforms, then discovering iOS
    • It's not all Microsoft stuff: The MySQL Workbench toolkit is (in my experience) not the most user-friendly or simplest of GUIs for MySQL Server. I'm sticking with MySQL Administrator and MySQL Query Browser, a 2-part toolset (similar to MSSQL2000's Enterprise Manager and Query Analyser tools).
    • Another third-party example is Nero. I started using it in early 2002 when I got my first CD burner. It was a small and light CD burner and image-making software. I started to notice things going wrong around 2006 when it started including "Nero Scout" (Yet Another desktop search engine) and other bundleware that had absolutely nothing to do with CD burning. I also noticed they removed the ability to create ISO images (only their bastardised "NRG" format). After setup gave my computer a number of service processes that served absolutely zero purpose I found ImgBurn which does everything Nero does, and a lot more besides, all within a tiny binary. It also looks good on Windows thanks to judicious use of icon art and pulls no stupid patronising UI tricks like Nero did.

    and i will say that i have a few apps that seem to do ok.

    not masterpices of art or design but they look ok  and work well on normal hardware.
    I think you just have not seen many apps.
    some like mine are customer for a given customer and not in mass market.
    but they should not make any one wish to remove anyones eyes (mine or the users)

    AutoCAD 2011. I used it for a minor design thing I was working on mid last year (granted, I was using it as a glorified file format converter, but still...). The main program is native as you'd expect, but their ribbon UI was implemented as a hosted WPF control. It was horrendous: incredibly slow and laggy, but also very, very ugly (even when used on Windows Vista/7).

    Part of what kills WPF for me is the lack of support for alternative visual styles, even official Microsoft styles, and instead gives you a (deliberately?) ugly Windows 2000-style look. I know it's partly due to the vector-based UI in WPF, but the Visual Style API was designed so it could be used from DPI-independent applications and services. It is possible to build a WPF skin that pulls artwork from Visual Styles, and I'm disappointed Microsoft didn't invest in this. It also means that there's going to be headaches in WPF applications 5 years from now when Microsoft ditches 'Aero' as the main Windows style and all these WPF apps are going to look out of place.

  • brian.​shapiro

    @W3bbo:

    Take a look at the MSNMsgr.exe (version 15.4, the latest), if you take it apart and look at the RVA Data Directory section you'll see the 14th entry (reserved for the CLR runtime header's RVA) is marked as null. Meaning msnmsgr.exe contains no managed code.

    All you really need to verify it is use some type of window spy program, since all WPF windows will have a class name that begins with HWndWrapper and won't have any child windows.

    Part of what kills WPF for me is the lack of support for alternative visual styles, even official Microsoft styles, and instead gives you a (deliberately?) ugly Windows 2000-style look.

    xmlns:aero="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"

    ??

  • magicalclick

    I do not understand the facination of Ribbon and WPF. .Net 3.0 does not even have Ribbon at all. So, why are we talking about Ribbon which is unrelated to WPF?

    Anyway, VS WPF >>> all older VS because older VS are so messed up when using high DPI setting.

    And the reason why MS doesn't have many WPF apps? MS is not Google who likes to screw up existing formats, in this case, MS didn't want to screw XP users who doesn't know how to install optional Windows Updates. Just like many MS sites still using Flash instead of Silverlight, like I said, MS value users more than their technologies.

    Expression Blend is using WPF. Go try it.

    As someone's examples are all native app based. The moral of story, some devs like to make crappy eye candy on native apps. And if they can use WPF, it is just easier to make crappy eye candy. WPF is a tool, not a design guideline. Surely it is slower. I haven't managed to add 40 thousand images as effeciently as WL Photo Gallery.

    Leaving WM on 5/2018 if no apps, no dedicated billboards where I drive, no Store name.
    Last modified
  • Bas

    @longzheng: so essentially you're saying "I don't get how it works, so I'm going to brute force my way through it and say it's awkward?"

  • vesuvius

    @W3bbo:I am making quite a decent living as a WPF expert. Yes there are times when I create hybrid applications and use winforms controls, but the flexibility WPF gives in creating components far outweighs any other considerations.

    For your basic applications you can use either. I am currently working on some drawing tools to annotate images and WPF is far much nicer to do this sort of thing than Winforms. The code is nicer to wrtite and maintain and the result is superior. And you can use these tools on any surface (lets say a listbox for example). Using the winforms controls on the datagrid is a non-starter.

  • W3bbo

    *snip*

    xmlns:aero="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"

    Visual Styles in WPF are re-implemented as a library of vector graphics within WPF assemblies. They don't actually use the raster Visual Styles API present in Windows. If you run a WPF application on Windows XP and use the Microsoft Zune or Royale Noir visual style you'll get ugly, ugly widgets and controls (unless you provide your own appearance graphics).

    @W3bbo:I am making quite a decent living as a WPF expert. Yes there are times when I create hybrid applications and use winforms controls, but the flexibility WPF gives in creating components far outweighs any other considerations.

    For your basic applications you can use either. I am currently working on some drawing tools to annotate images and WPF is far much nicer to do this sort of thing than Winforms. The code is nicer to wrtite and maintain and the result is superior. And you can use these tools on any surface (lets say a listbox for example). Using the winforms controls on the datagrid is a non-starter.

    From the developer's perspective I think WPF is a good system, my criticisms are pointed at details of implementation. In the same way I'm practically in love with .NET's BCL, I still dislike parts of the runtime's implementation (why doesn't it more aggressivly AOT compile assemblies and cache them for future application starts?).

  • longzheng

    , Bas wrote

    @longzheng: so essentially you're saying "I don't get how it works, so I'm going to brute force my way through it and say it's awkward?"

     

    In my experience, the WPF learning curve is very high, from the basics to the advanced. Plus, the tools are too fragile for the WYSIWYG experience to last any considerate amount of time. Most of the MetroTwit XAML I do now is without the help of any previews and it's a bit of trial and error.

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.