8 ms·
Complicated to create UIs? Win32 was complicated. MFC was complicated. GTK is hard HTML and CSS aren't as complex as those. Not even close
by raverbashing 10y ago
Complicated to create UIs? Win32 was complicated. MFC was complicated. GTK is hard
HTML and CSS aren't as complex as those. Not even close
- bbcbasic 10y agoYou can create controls in WIN32 or MFC that would simply be impossible in HTML for a reasonable level of performance
- raverbashing 10y agoYes, but this doesn't matter for the majority of applications today
- nodamage 10y agoReplace "WIN32 or MFC" with "iOS or Android" and the point still stands, especially on mobile devices where processing power is limited and battery life more important.
- ivanhoe 10y agoPerformance yes, you can't compete with that one because browsers don't let you control the low-level stuff. But the speed of development and the ease of doing complex layouts with css is hard to match (when you master css enough, of course), specially if you're trying to do UI from the code directly, without IDE helpers and visual builders.
- millstone 10y agoThe speed of development is very fast for the first 75%, and comes to a screeching halt for the last 25%. The web stack has no good way to answer basic questions like "does the user have arrow keys" or "what is the current mouse position." That's the point that you start to layer on the "hacks on hacks" that OP references.
- emodendroket 10y agoCan any system tell you that the user has arrow keys?
- sangnoir 10y ago> You can create controls in WIN32 or MFC that would simply be impossible in HTML for a reasonable level of performance Flip side: You can distribute/deploy the host HTML application with reach that will be impossible achieve with a WIN32 or MFC application.
- rpeden 10y agoTrue, but it should be possible to create high performance UI controls inside an HTML5 canvas element. With canvas, every browser has hardware accelerated immediate mode rendering that could be used to create UI toolkits. Looking around the web, there are some attempts to make this happen, but none of them seem to be hugely popular. Last time I looked into this (years ago), a big blocker was that nothing inside a canvas element is visible to accessibility APIs, so UI rendered in a canvas would be invisible to people using assistive technologies like screen readers.
- tonyedgecombe 10y agoDelphi, VB6, WinForms made development a lot easier, there was a reason they were called RAD tools.
- throwanem 10y agoBecause it was the 90s?
- deleted 10y ago[deleted]
- yanyabo111 10y agoNot fair, if just make some simple UI stuff, html and css can be the same easy as WinForms.
- nivertech 10y agoI was building GUIs in pure Win32, with my own C++ wrapper classes for Win32 and later with OWL and MFC. I'd say building Win32 GUIs in C++ was easier than current Web stack. Same with Java AWT and Swing libraries. Objective C / Cocoa is more complex - never really managed to learn it beyond basic stuff, maybe with Swift it's easier. Elm is close to those desktop GUI frameworks, but functional instead of OO. But Tcl/Tk is the most easiest GUI toolkit ever, too bad the resulting UI does not look professional.
- sangnoir 10y ago> I'd say building Win32 GUIs in C++ was easier than current Web stack. >Same with Java AWT and Swing libraries. I will have to vehemently disagree. I have no experience with Win32 GUIs, but I still have nightmares about wrangling nested LayoutManagers: comparing that to the current state of the web (especially after Flexbox) is downright absurd. I am very happy with: Typescript + (Sass|LESS) + framework (Angular|Bootstrap|ReactJS). I think the 'hardcore' devs who would rather avoid using abstractions (frameworks/JS transpilers) will have a torrid time with the front-end.
- TeMPOraL 10y agoAnd I have to disagree with you. Doing UIs in native frameworks like JavaFX or even in a pure C++/WinAPI, is much more saner than doing any kind of UI in HTML/CSS. Ignoring flexbox for a second, which is kind of bleeding edge new thing, remind me - how exactly do you vertically center stuff with CSS? :P. My two main issues with doing UIs on the web are: - web stack is terribly unpredicatable; you're trying to force an inherently document-layout-oriented model into a free-form 2D canvas, which leads to layouts exploding whenever user switches browser/OS/device/timezone/whatever. - the code makes no sense; no matter how crappy the Java APIs were (due to deficiencies of the language mostly), the code you wrote at least did what it said, because it expressed the UI concepts explicitly. HTML/CSS is a huge mess of insanity when it comes to doing UI work. I mean, in what reasonable world should the idea "center this" be expressed as "set the left and right margin to 'auto'"? CSS is full of stuff like that. (And then there are some silly philosophies like "separation of form and content" which everyone touts, but rarely anyone actually follows; see e.g. grid layouts.)
- TimJYoung 10y agoYes, from a purely presentational aspect, HTML/CSS is way better than Win32, etc. Things like a virtual DPI, easy-to-use transparency and alpha blending, no paint cycles, and much more. However, displaying a modal window and handling messages in a local window-specific message loop is easy in Win32, and much more difficult in HTML/JS. In general, the browser makes it much more difficult to deal with synchronous operations like modal windows and server requests that require the application to wait on the response. This is how you end up with the overly-complicated mess that is callback-hell, which is then solved by another overly-complicated mess called promises. So, presentation functionality = A+, foundational functionality for UIs = D.
- aclsid 10y agoBut you should really compare these with modern desktop UI development. Anchors are awesome in .NET and don't get me started with Java layouts. UI design truly is better on the desktop side. Maybe it will be more difficult for a designer to develop a nice interface for a desktop program but that's about it.
- socmag 10y agoI totally disagree with this. It is far easier to build an application in shitty old MFC than a thousand attempts and 10,000 random attempts to fix things in no content way. The problem now is nobody can rationally understand the complexity. At least that was known before. Perhaps the language may have been a barrier to some back in the day, but complexity vastly transcends that small issue.
- GrinningFool 10y agoI've built native ui applications under win32 (API itself, MFC, ATL), os/2, x11, qt, gtk and more. Developing UI for each of these was a thing I found much more straightforward than web applications over the last decade. The initial learning curve was higher, but once you had that knowledge it remained correct and relevant for years- sometimes decades. And your application UX was faster and smoother. The minor lag between user interaction and UI action that we take as a given today in all but the most basic applications simply didn't exist if you wrote your UI to conform with the platform guidelines. Even poor performing complex UIs typically did better than today's well written complex UIs - on hardware quite a bit less capable. We've accepted he current hodgepodge because of portability, but if you've ever worked with the base platforms for any length of time , the difference is painfully clear. This doesn't touch on how you could expect a consistent ui experience across all applications on an entire platform. It's hard to get that across even two web sites. We are currently well into a full generation of developers and consumers who are unaware of what's being lost, because most of their interactions are with browser base applications and mobile phones. Waiting a few dozen to a few hundred extra ms for ui to respond is considered normal, if it's noticed at all.
- GrinningFool 10y agoI should add what I see as the one up side - the ability to test UIs written on modern platforms in an automated way is vastly improved.