News for hackers. Stuff that matters.
Re:Marko – An isomorphic UI framework similar to Vue by wruza on Sunday August 20, 2017 @06:27AM (#15057819)
As a desktop developer, I rarely ever touched backends. Though they are not "modern js", it was close enough to that madness to stay away from it. Otoh, I can't remember a time when I couldn't easily grasp any of Qt, Gtk, whateverTk toolkits in few hours. A month ago we started a project with a custom backend (on me) and had to choose a frontend option for our frontend-employee to use. It feels like hell, really. We picked Angular2 randomly after few probes and it seems that out project has more quirks, hacks and LoC than if we just coded it in pure js with heavy templating help from e.g. perl backend. I don't know where it all goes about the web. Before, when I heard about new cool js framework, I thought "well, guys do The Technology". Now that I'm forced to dive into it, I see that they just reinvent square wheels in a wrong ways that were polished a decades ago in regular desktop apps.

Not to blame or insult good frontend people here and everywhere, but it feels like en masse they don't understand the programming essence at all. Sorry, but UI development was never HARDER than today. My colleague feels the same, having more than 15 years of html/css/js experience.

My thoughts are we're throwing it out next week and generate all ui with decent server-side scripts, leaving /js/util.js of 1kloc as a broker and generic table sorter.

Re:Marko – An isomorphic UI framework similar to Vue by sbergot on Sunday August 20, 2017 @06:53AM (#15057886)
I hate to be that guy but you are confusing simplicity and familiarity.

> I can't remember a time when I couldn't easily grasp any of Qt, Gtk, whateverTk toolkits in few hours

When I tried those things, I had a hard time making an hello world app in two hours because of dependency/build/tooling issues.

However I was able to grasp angular 2 in two hours probably because I am more familiar with the frontend ecosystem.

It would be like saying that because you knew english & german and was able to quickly learn swedish, you should be able to learn russian easily.

> Not to blame or insult good frontend people here and everywhere, but it feels like en masse they don't understand the programming essence at all. Sorry, but UI development was never HARDER than today. My colleague feels the same, having more than 15 years of html/css/js experience.

15 years ago the js applications were nowhere as complex as they are today. So obviously things are a bit more difficult IF you want a rich application. If you just want to make a simple document you don't need all those librairies.

> We picked Angular2 randomly after few probes and it seems that out project has more quirks, hacks and LoC than if we just coded it in pure js with heavy templating help from e.g. perl backend

This is your first project with a very unfamiliar tech. This was an expected outcome.

> My thoughts are we're throwing it out next week and generate all ui with decent server-side scripts, leaving /js/util.js of 1kloc as a broker and generic table sorter.

And that's a perfectly reasonable option, especially if you don't have someone with more experience in frontend tech to keep things sane.

Re:Marko – An isomorphic UI framework similar to Vue by wruza on Sunday August 20, 2017 @09:58AM (#15058414)
Fair points, generally, but LoC and deadline arguments still kicking my ass. I'm counting days, not hours, that we are spending on magic issues instead of programming our direct business. No rant, I have an example right before me.

Our CEO, also programmer in distant past, took his macbook, asked me "where do I get Xcode", and in his free time did anything we did in web, including animations, itunes-like header/progress area, etc. With my "intensive kickstart", obviously, but the shocking fact is that he never touched Objective-C, Cocoa, AppKit and HTTP. Never. In. His. Life. (Though he has very strong background of sockets, threads, C, widget frameworks, coreutils, evaluation models and general software engineering). It took about a week or two in between of management and negotiations to simply write that thing by all canons.

I don't think we'll hire another frontend master on the middle of the road anyway, but that has something to do with complexity, not competence.

(Fun thing, he started with Swift but quickly "downgraded" to Objective-C, because Swift was getting in his way too much with no clear benefit.)

Re:Marko – An isomorphic UI framework similar to Vue by jcelerier on Sunday August 20, 2017 @08:03AM (#15058060)
> When I tried those things, I had a hard time making an hello world app in two hours because of dependency/build/tooling issues.

I'd be interested to know how you tried.

For instance, for GTK:

https://developer.gnome.org/gtk3/stable/gtk-getting-started....

For Qt, the IDE itself comes with examples that can be built and run in two clicks.

Or maybe you want to use python ?

  virtualenv --no-site-packages .
  source bin/activate
  pip3 install pyqt5 
  echo "import sys
  from PyQt5.QtWidgets import QApplication, QPushButton

  if __name__ == '__main__':    
    app = QApplication(sys.argv)

    w = QPushButton('Hello world')
    w.show()
    
    sys.exit(app.exec_())" > main.py
  python3 main.py
I fail to see how this is more complicated than using npm or bower to fetch the relevant libraries.
Re:Marko – An isomorphic UI framework similar to Vue by stuaxo on Sunday August 20, 2017 @09:35AM (#15058352)
It's great that Qt works with virtualenv and pip, Wx does too.

This is a quite recent phenomenon and to be applauded.

Minus sides -

Neither of these work with pypy yet (ideally the bindings would be rewritten using cffi for best benefit).

The downloads on these are quite big, but maybe this isn't the end of the world.

Gtk still doesn't work with pip like that yet.

Pyimgui may be worth a look if you want a small download that works everywhere, though it does look like it's own thing.

Re:Marko – An isomorphic UI framework similar to Vue by wruza on Sunday August 20, 2017 @10:07AM (#15058446)
Our node_modules are 100Mb too, not counting a browser itself. Gtk recently quit building for MSW at all and relies on MSYS2, and it works now via 'gi', like any gir-enabled libraries, no custom wrappers needed. I ran complex Gtk3 Windows widget galleries last month, for Lua and Python at least.
Re:Marko – An isomorphic UI framework similar to Vue by martin_ky on Sunday August 20, 2017 @07:47AM (#15058019)
> Now that I'm forced to dive into it, I see that they just reinvent square wheels in a wrong ways that were polished a decades ago in regular desktop apps.

Being a desktop and embedded developer myself, I share your sentiment. My personal explanation of the state of the art of web UI tech is, that there can only be wrong ways of doing it if the basic abstraction at the bottom of the stack is wrong. HTML was invented as a hyperlinked semantic document markup language with presentation largely left to the browser's interpretation. Presentation (CSS) and interaction (JS) aspects were only added (dare I say "glued") to it later, which seems like a design afterthought.

Re:Marko – An isomorphic UI framework similar to Vue by jstewartmobile on Sunday August 20, 2017 @10:01AM (#15058422)
I hear you brother. Sometimes I think with emscripten, web assembly, and WebGL, I should just write the thing in C++ using a UI toolkit that is older than my coffee...
Re:Marko – An isomorphic UI framework similar to Vue by jancsika on Sunday August 20, 2017 @09:17AM (#15058290)
> whateverTk

> Now that I'm forced to dive into it, I see that they just reinvent square wheels in a wrong ways that were polished a decades ago in regular desktop apps.

If you're talking about tcl/tk, decades ago it had a motif look to it (raised 3d borders, lots of grays). There was no theming engine. Font sizes were integer only (and that only recently changed). I'm not sure what the status of antialiasing was, but it probably wasn't good.

The event loop was (and is) slow. Unicode support was new.

Oh, and then there was the documentation. Seems like everyone who installed tcl/tk on a university machine made a public copy of the docs. So if there were bugs in a topic of the doc (and there were), and you searched for something related to that topic, you'd get back 100 links to copies of that same doc which all had the same error. What you wouldn't get were in-depth blog entries explaining that topic, complete with inline, cross-platform working demos which you can read, write, modify, and-- with a single shortcut-- inspect using one of at least 3 completely different implementations of the same standard from competing companies.

Re:Marko – An isomorphic UI framework similar to Vue by jancsika on Sunday August 20, 2017 @09:45AM (#15058382)
Oh, I almost forgot-- if you were making a cross-platform application for MacOS, Windows, and X11, you would spend a lot of time on at least one of those platforms trying to figure out some crazy workaround for a bad UI decision.

For example, for a file dialog under Windows and MacOS a call to the native libraries is made to get a native dialog widget. But in Linux of the late 1990s/early 2000s there was no such thing as a native dialog. So some tk developer coded their own file dialog.

Let's say you started in a deeply nested directory and you wanted to climb out. You see a button that goes one level up the directory tree. Great. You click that button and on Linux now the window shrinks because its width is set to be as wide as the directory being shown. So you couldn't do multiple clicks in a row to climb up the tree without moving the mouse to the left for each click.

You might be able to dig into the internals and muck around to get that dialog to have a better UI. But then you notice that the window menus in Linux-- unlike the ones on MacOS or Windows 95-- don't toggle the menu display on click. They only display on click. Not sure about Gnome 1, but Gnome 2 window menus definitely toggled on click. If you want that standard behavior now you've got to dig into yet another implementation-specific codebase for your tcl/tk installation. And since you're mucking around inside the implementation there is no guarantee that what you change will still work when you upgrade to a newer version.

If Firefox rolled their own weirdo file dialog on Linux and required an extension to get something that looked better, you can bet every new release would be met with complaints and sneers about just that. Yet whenever people bring up whateverTk it's some kind of antediluvian paradise.

Re:Marko – An isomorphic UI framework similar to Vue by wruza on Sunday August 20, 2017 @10:34AM (#15058535)
Tcl/Tk never clicked for me, because it had no decent business table view (or I just didn't find it). When Borland died, Gtk and Qt were the only viable alternatives, though I can remember some shallow experiments with early Wx, Fox, FLTK and pure GDK/Cairo :)