News for hackers. Stuff that matters.
Re:Ask HN: Is web programming a series of hacks on hacks? by nivertech on Monday September 12, 2016 @03:44AM (#12477878)
I 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.

Re:Ask HN: Is web programming a series of hacks on hacks? by sangnoir on Monday September 12, 2016 @04:22AM (#12478007)
> 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.

Re:Ask HN: Is web programming a series of hacks on hacks? by TeMPOraL on Monday September 12, 2016 @06:01AM (#12478377)
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.)

Re:Ask HN: Is web programming a series of hacks on hacks? by vonmoltke on Monday September 12, 2016 @11:17AM (#12480418)
> Ignoring flexbox for a second

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.

Re:Ask HN: Is web programming a series of hacks on hacks? by sangnoir on Tuesday September 13, 2016 @02:38AM (#12486035)
> 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.

Re:Ask HN: Is web programming a series of hacks on hacks? by flukus on Tuesday September 13, 2016 @02:52AM (#12486086)
> 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.

Re:Ask HN: Is web programming a series of hacks on hacks? by raverbashing on Tuesday September 13, 2016 @05:35AM (#12486640)
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)

Re:Ask HN: Is web programming a series of hacks on hacks? by pjmlp on Monday September 12, 2016 @10:56AM (#12480188)
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.
Re:Ask HN: Is web programming a series of hacks on hacks? by MattSayar on Friday September 16, 2016 @12:07PM (#12514990)
> how exactly do you vertically center stuff with CSS? :P

I know this was just a throwaway comment, but seriously, I love this site:

http://howtocenterincss.com/

Re:Ask HN: Is web programming a series of hacks on hacks? by aclsid on Monday September 12, 2016 @09:49AM (#12479633)
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.
Re:Ask HN: Is web programming a series of hacks on hacks? by totalcrepe on Monday September 12, 2016 @06:48AM (#12478580)
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.

Re:Ask HN: Is web programming a series of hacks on hacks? by douche on Monday September 12, 2016 @07:35AM (#12478807)
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.
Re:Ask HN: Is web programming a series of hacks on hacks? by kitsunesoba on Monday September 12, 2016 @12:21PM (#12480999)
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.

Re:Ask HN: Is web programming a series of hacks on hacks? by vram22 on Monday September 12, 2016 @05:01PM (#12483644)
>Applications with native UIs also tend to give a better impression of responsiveness

Not just an impression. They often are actually more responsive. Except when they hang, which does happen sometimes, but then so do web apps.

Re:Ask HN: Is web programming a series of hacks on hacks? by nurettin on Monday September 12, 2016 @08:03AM (#12478950)
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?

Re:Ask HN: Is web programming a series of hacks on hacks? by vram22 on Monday September 12, 2016 @04:55PM (#12483591)
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.)
Re:Ask HN: Is web programming a series of hacks on hacks? by totalcrepe on Monday September 12, 2016 @08:34AM (#12479135)
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.

Re:Ask HN: Is web programming a series of hacks on hacks? by aclsid on Monday September 12, 2016 @09:46AM (#12479609)
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.
Re:Ask HN: Is web programming a series of hacks on hacks? by GrinningFool on Monday September 12, 2016 @09:42AM (#12479581)
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.
Re:Ask HN: Is web programming a series of hacks on hacks? by atoko on Monday September 12, 2016 @11:31AM (#12480562)
Visual Studio Code
Re:Ask HN: Is web programming a series of hacks on hacks? by Retra on Monday September 12, 2016 @08:33AM (#12479127)
They could be made portable if an equivalent amount of effort was spent devoted to that goal.
Re:Ask HN: Is web programming a series of hacks on hacks? by bigato on Monday September 12, 2016 @07:19AM (#12478740)
> But Tcl/Tk is the most easiest GUI toolkit ever, too bad the resulting UI does not look professional.

ttk does

Re:Ask HN: Is web programming a series of hacks on hacks? by anodari on Monday September 12, 2016 @06:29AM (#12478491)
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.
Re:Ask HN: Is web programming a series of hacks on hacks? by witty_username on Monday September 12, 2016 @07:08AM (#12478685)
Qt is easy with Qt Designer and looks professional.
Re:Ask HN: Is web programming a series of hacks on hacks? by hellofunk on Monday September 12, 2016 @07:40AM (#12478832)
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.
Re:Ask HN: Is web programming a series of hacks on hacks? by witty_username on Monday September 12, 2016 @01:51PM (#12481940)
It was easy for me to arrange widgets in a layout and connect signals and slots.