Live data from Hacker News

XMLUI

blog.jonudell.net

91–100 of 345 posts

Re: XMLUI

#91
This reminds me of xaml with css thrown in. It is almost like this validates Microsoft's blazor plans with C#

Re: XMLUI

#92
post #64

I wrote Qt C++ for 7 years as an open source contributor to KDE. This reminds me of QtWidgets’ .ui files—custom XML files following a specific schema. Later, Qt introduced QML, which I personally found unintuitive, and over time I lost interest in Qt altogether. That said, I still think XML for UI definitions makes sense, and it’s understandable that some larger environments continue to use it.

Some of us are still programming in Qt using just C++ and .ui files. Never bothered to switch to QML. I wasn't convinced there were enough advantages to make it worth the effort.

Re: XMLUI

#94
post #51

> to me this feels like an alternative to the JavaScript industrial complex that ticks all the right boxes The goal is admirable, but the execution and implementation is, in a word, absurd. From the XMLUI website: > XMLUI provides the glue that binds the React ecosystem into a declarative model. This negates the raison d'être of React, which is to bring the development style of immediate mode UIs to the browser— that…

Great points! I love Nic Barker's frantic hand gestures while he explains how React works in that video. "Oh gosh, you don't want the hear this! Ha ha *grin*!":

https://youtu.be/8ZlN07IvoPI?t=2654

There was an interesting hn discussion about immediate mode a few years ago:

Immediate mode GUI

https://news.ycombinator.com/item?id=19744513

http://behindthepixels.io/IMGUI/

I wrote up some of my own opinions:

https://news.ycombinator.com/item?id=19745034

>DonHopkins on April 25, 2019 | parent | context | favorite | on: Immediate Mode GUI

>Immediate mode GUI's don't let you apply useful object oriented programming techniques like subclassing and prefabs (persistence) to implement and configure custom components.

>Properly object oriented retained mode GUIs let you subclass components to implement custom views and event handling, and develop and publish reusable prefabs and libraries of pre-configured, stylized, specialized component. [...]

>I don't know what you mean about easily composing immediate mode API's, or agree that different immediate mode APIs don't need to know about each other. They depend on a lot of behind-the-scenes implicit hidden state (practically a hidden shadow-DOM-like retained mode), so I suspect in many cases they'd walk all over each other (especially text editors dealing with input focus and keyboard navigation). Unity3D has two immediate mode APIs, one for the editor and one for runtime, and they sure don't mix. [...]

>How would you write a functional extension for Unity3D's old immediate mode GUI that let you embed an ACE code editor in a Unity WebGL app? What would the API and state management even look like? How could you make it platform independent?

>And even if you solved all of those problems with an immediate mode API, by its very nature it still wouldn't enable you to build GUIs in the interface editor or store them in prefabs, and you'd still have to recompile you app (which can take half an hour with Unity) every time you wanted to tweak the user interface (which is why I like programming Unity apps in JavaScript as much as possible). [...]

>Embedding object oriented "retained mode" widgets with different APIs inside of each other is old hat and common for backwards compatibility. Whenever you write a new GUI toolkit, embedding widgets from the last toolkit is one of the first things you do (including recursively embedding widgets from the toolkit-before-last).

>Concrete example: Microsoft lets you embed old fashioned OLE controls in Windows Forms / Presentation Foundation applications, which might be implemented in MFC themselves. And MFC is all about embedding old Win32 widgets implemented in C, and newer OLE components implemented in Visual Basic or whatever, in venerable C++ MFC user interfaces. Say what you want about how much Win32/MFC/OLE/WF/WPF sucks, and I'll wholeheartedly agree, but if you're running Windows, you probably have widgets on your screen using several different retained mode APIs embedded more than two levels deep right now. [...]

>The problem with immediate mode that is you have to come up with somewhere to store and retrieve any values or state required on a case-by-case basis (including the edited value itself, and other view state like scrollbar state for text editors, etc), and that tightly couples your component function with whatever's using it, so they're not very reusable or simple. With OOP, the object has its own place to store that stuff, which is cleanly decoupled from whatever's using the component.

>Then there's the issue of event handlers. Some user interface components just aren't so simple that they only have one true/false return value like buttons. Text editors can notify on value change, end edit, select, deselect, etc. And Unity's retained mode GUI supports persistent event handlers that let designers hook up events with methods of objects with parameters, without writing or recompiling any code.

>And there's also a lot more to layout that you can easily express with an immediate mode GUI. Sometimes you have to measure a bunch of things and align them in various ways, like grids or flex layouts, and adapt to the screen size and other constraints (i.e. responsive design), and that's really hard to do with immediate mode, while retain mode has a rich set of layout components you can use and extend. And there's nothing like XCode's layout constraints for immediate mode. [...]

>A perfect example is TextMesh Pro's text editor. It has so many different (and useful) features and parameters and callbacks and ways to configure it, and it keeps so much state in order to redisplay efficiently with the fewest number of draw calls and reformatting, that it would be extremely impractical and inefficient and unwieldy for it to use an immediate mode API. Especially with C# positional arguments instead of Pythonic or Lisp-like optional unordered keyword arguments.

>When you encapsulate your immediate mode layout in a class, or write an engine that interprets (i.e. JSON) data to drive the immediate mode API, or use reflection in your wrapper functions to dispatch event callbacks and bind your widget data to your model data, you're just rolling your own informally-specified, bug-ridden, slow implementation of half of retained mode. (See Greenspun's tenth rule.)

Re: XMLUI

#95
post #74

Earlier quoted context omitted.

In 2010 I was working for a student computer support shop. We had web developers building our own ticketing system. In those days, I was told that everything in the UI was just tables. It was the only way they could get enough control on UI elements before div tags became widely spread.

Also 1x1 pixel spacer GIFs.

IE6 forced us to do crazy stupid stuff, like   - and don't even start talking about

Re: XMLUI

#96
post #40

Earlier quoted context omitted.

Spreadsheets traditionally don’t support iteration (loops) or recursion. In Excel you had to go the VBA route for actual programming.

In my hands they do

In other hands, I have seen Excel spreadsheet hundred-products pricelists become a freaking tangle of merged cells, multiple rows for products, spelling mistakes, multiple spaces everywhere, and price cells hand-formatted. And I had to export the contents to machine readable .csv...

Re: XMLUI

#97
post #8

As a programmer I found that all no-or-less-code approaches break up sooner than one would expect. Eventually I chosen to always use the programming language itself for data fetching, looping and leave the templating (lit html in my case) to just passing in the data structures.

Eventually; but having something less complex than a general-purpose programming language to build prototypes and v1.0 products to test business-purpose fit is really important, too. Lets users have ideas and build them and try them out without having to engage a programmer. Hella valuable for workflow-process design, too. Best to have that one programmer on tap who can fix problems and recognize when it’s too unwieldy, of course.

Re: XMLUI

#98
Almost immediately is the reason I don't like using this stuff. A hardcoded default value. There are so many things these UI generators can almost do but don't, and a default value for a dynamic selection is often one of the trickier ones to get right.

Re: XMLUI

#99
Using VB as a reference seems incorrect. Much of the appeal of Visual Basic, and Delphi, was the UI builder. Just click a button to create new project and you already had a window ready to go. Drag and drop in components, click buttons and what-not to wire up functionality. The barrier to entire was so incredibly low, having to edit XML files feels miles away from that ease of use.

That being said Visual Basic also create some absolutely terrible programs.

Re: XMLUI

#100

Seems like we keep reinventing the wheel - the previous version of of HTML, XHTML ( eXtensible HyperText Markup Language ) is a direct subset of XML. Also, related - Mozilla Firefox used to have something called XUL ( XML User Interface Language - https://en.wikipedia.org/wiki/XUL - using which you could build complete desktop web applications with the Firefox / Gecko web engine (something that is now popular with th…

I thought of XUL right away too.
Post reply on HN