> 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.
And 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.)
Not ignoring Flexbox, this is the crux of my problem with web development. There are 8,476 different frameworks, transpilers, toolkits, and what have you that all kinda-sorta do the same things. When first approaching this world you get confronted with alphabet soups of packages all combined to "make front end development sane". Everybody seems to have their own soup, though, and many claim that theirs is the way to do development. The flexibility that so many Node-style devs love leads directly to this impenetrability and fragility.
> Not ignoring Flexbox, this is the crux of my problem with web development. There are 8,476 different frameworks, transpilers, toolkits, and what have you that all kinda-sorta do the same things
If they do the same thing, pick one and dig in. I really don't get this argument - walking down the cereal aisle will not generate this amount of antipathy despite the amount of choice available; why on earth should development different?
The optimal taste, texture and crunchiness is different for everyone, you can even default to the traditional oats or corn flakes if the newfangled cereals are too brightly-colored or too confusing for you[1].
I love the JS ecosystem and its Cambrian explosion - lots of ideas (good and bad) being tried out by other people[2] and the good ideas tend to be adopted by the more mainstream projects.
1. This is obviously a thinly veiled allusion
2. This is important - don't be the guinea pig and don't jump onto the latest and greatest.
> If they do the same thing, pick one and dig in. I really don't get this argument - walking down the cereal aisle will not generate this amount of antipathy despite the amount of choice available; why on earth should development different?
If I don't like the cereal I've wasted a couple of bucks. Picking the wrong framework can be much more costly in terms of time/money. And with the amount of framework churn you can't even make a good decision because in two years time everyone's moved on to the next big thing.
And as he said (and it bears repeating): "This is important - don't be the guinea pig and don't jump onto the latest and greatest."
How to pick the right one: age ("old" but not too old) x community x documentation
For the simplest developments I used jQuery (which is a thin layer over pure JS). If you need more complexity you could go for a higher level framework (but there were not so great things like JavascriptMVC)
PHP gets a lot of bad rap but Fb is built on it
There is no perfect solution. When I see people "praising" Win32 I can just laugh (no, really, anything is better than this: https://msdn.microsoft.com/en-us/library/bb384843.aspx) but I think the advantage of that is that there was only few alternatives so once the learning curve was gone that was it)
I have returned back to native UIs development (WPF/Forms/XAML/Android), after 4 years of web development, couldn't be happier in what concerns my productivity.
The difference between what you are doing and what desktop UI has always enjoyed is a component system that works flawlessly. The Web Components specification is a good step forward in this regard, but as many people have pointer out, try to do something trivial like a modal wizard in Java/.NET and try the same thing on the web side.
But none of your examples are as cross system portable and "native/normal feel" as writing an app that only works in chrome/chromium.
For the decades leading up to this stage cross system GUIs with a few simple library dependencies have been an unachieved "easy" task. Web remains as frustrating as ever because now we need it to work on all non portable browsers even on platforms that supports better ones. Then we want new features at an alarming pace that GTK could never normalize across *nixes.
Using the only non-browser that I think sort of got cross system portability working as an example.. I don't think things functioned reliably against the weird m$, Ibm and gcj Java implementations. But since they aren't really GUIs themselves with bookmarks, and familiar menus, no one gets upset when you tell them to replace an odd Java implementation before running a Java program.
Why is native/normal feel the end-all-be-all of UI systems? I've never quite understood why this is so desirable. Or why the answer seems to be using a shoddy UI system stuffed in a browser frame.
Because chances are that whatever custom UI/UX design you come up with isn't going to be better (or even as good as) OS UI toolkits that've been designed by experts, battle tested for decades, and used for every type of application known to man.
Applications with native UIs also tend to give a a better impression of responsiveness, and they reduce mental load for your users since they're don't have to relearn much (if anything). They can rest assured that every button and popup menu and text field (for example) functions identically to every other such control they've encountered on the system and in other native apps. This is worth way more than most people think.
One easy example of this is text fields in OS X. Native text fields there all have a form of emacs key bindings built into them to make powerful text navigation and manipulation a systemwide thing. Every application built with Cocoa gets this for free, but more often than not applications using non-native UIs don't implement this functionality at all. This is highly frustrating when you've worked said bindings into your workflow.
I know a great coder who refuses to start personal projects because he can't find UI libraries which are:
1. Cross-platform across mac-win-linux-android-ios
2. Built for a compiled language such as pascal or C++
3. Built to use native controls
4. Integrated to registered libraries through an interface like activex
5. Accompanied by a UI builder with design-time and runtime states and component builders.
6. Easily integrated to embedded and server-side SQL.
Sometimes we impose too many constraints on ourselves and never actually start anything. Fear of success?
Good point. And actually, Delphi matches many of those bullet points. Expensive, though. (The promo of the free Delphi 10.1 Berlin Starter version just got over on Aug 9. First time in a a while, maybe, since Turbo Delphi Explorer.)
I think writing an IDE or anything else with editor integration during the editor wars would be a similar analogy:
- you could push one or the other
- you could try to support users on both side based on the editor variable
- you could go the new route where only users who care enough to invest do
- you could go the Jed simplicity route.
In the end, IDEs like jetbrains have the new route with plugins for the factions. Most lower investment cases do the Jed route which is more like web neutral. No one who pushed the unwanted editor on its opposing group seems to be still standing.
It is a good idea because you reduce the learning curve for end-users of application by the use of common controls. Think about the MS-DOS era, and then Windows came along, with the ubiquitous F1 key everywhere, Ctrl-P and Ctrl-S, not to mention the toolbars, etc.
I'm coming up blank trying to think of web sites and chrome based apps that provide a look and feel consistent with - and as performant as - what is offered by the native platform.
I think we could divide in two types of interfaces: for data entry and for graphics/complex. For data entry, html/css is extremely easy, but for complex specialized interfaces it could be more dificult.
I wouldn't call Qt Designer "easy" in any sense of the word, but possibly that is because I have found how good that sort of tool can be, and it is called Interface Builder (Xcode), which isn't perfect, but should be what Designer strives for.
I'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.
Yes, 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.
But 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.
I 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.
Performance 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.
The 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.
True, 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.
Replace "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.
HTML and CSS aren't as complex as those. Not even close