any suggestions on a good front-end library/framew...
# thinking-together
s
any suggestions on a good front-end library/framework for making drag and drop interactive OOP UIs? for example, a workspace of objects, and clicking a method inside an object then clicking on other objects to pass them as arguments. lots of these exist for specific languages, I'm sure, but if I wanted to make one for my own language, what would I use?
k
Wouldn't it depend on what language you built your own language in? Would a general GUI library help?
s
It would depend, but I assume most of the suggestions would be web libraries/frameworks, which could probably be made to work with any language
k
GUI libraries are typically still native, due to performance concerns. Maybe that will change in future.
z
Agreed GUI libraries are native.
But it sounds like you are trying to describe a polyglot Visual Basic ?
Which language are you using Spencer?
s
well, my implementation is in Python right now, but really I'm just looking for a good implementation technology for such a UI - nothing about being polyglot
like, I can define some serializable protocol for discovering methods and objects and introspecting to find out the possible arguments, and implement that on my implementation side - but I don't know what would be a good way to implement the front-end of that
(And of course it would probably be nicer if I didn't have to send that data through a serializable protocol at all, but instead the front-end just got it as structured data through function calls, but that seems unlikely, so I can just bite that bullet)
e
@Spencer Baugh whenever you’re talking about User interface libraries, Inevitably you will ask for a text entry field. The text entry field is the most complicated part of every operating system. To render text in a box and handle text entry, that is over 1 million lines of code more than your typical project. There are not even 100 people alive in the world who know the truetype language that underlies text rendering. The text editing library code is therefore deeply tied to either the operating system vendor or one of the few companies that has spent millions of dollars to understand it. So Google, Adobe, Apple, Microsoft, and a few Japanese companies and Samsung, Are among the few places where this technology has been mastered. Text entry is incredibly complicated when you get to Asian languages or right to left languages like Hebrew and Arabic. Haven’t you ever wondered why the PDF file format took over as the World standard for documents? It’s because it was the only file format that allowed font embedding, and had missing font fail over technology. Nowadays with soft keyboards on mobile devices the world has gotten very concentrated into just two operating systems. iOS and android, and the market is split between those two about 80/20 Although the economic value of the Apple platform is about 50% due to their more well heeled customer base. a Console based Product in python can be very platform independent, but the minute you ask for Graphics and the black box of a text entry field you are now tied to an operating system or a platform technology like Adobe Air which offers platform independent text entry fields and font rendering. I am pretty sure that Unity has a cross platform input field technology as well, but I have not used it. The Google Flutter library is an attempt to make a cross platform technology which is powerful, and there is also QT which has been around long enough to cover all sorts of stuff. There are very few Python libraries which delve into font rendering and text entry fields in their full glory. In Photoshop, when you are putting in text, you have the ability to select 5 different rendering styles ("soft", "hard", "sharp", etc.), and you can massage the font rendering process very finely. MS went though a big effort to render fonts on LCD screens more beautifully by doing sub-pixel rendering, i think they called it "Clear Type". This is a very deep area and affects output quality very noticeably. Apple has always had terrific rendering, why artists overwhelmingly prefer OSX over Windows. Human languages are really complicated and supporting them is a huge task. English with its lack of accented letters and very simple structure is pretty much the easiest language on earth. Japanese is actually the most difficult language on earth to handle properly. So the benchmark for most technologies, is how well does it handle Japanese? Korean and Chinese are tough but more uniform than Japanese. calligraphic Arabic is basically impossible. But all the right to left languages present very tricky rendering problems because people intermix left to right and right to left sections in the same sentence. If you can avoid having a text entry field Like most game machines have a grade of alphabetic characters you type with, then it becomes a great deal easier and now you’re back to simple polygons and bezier splines and there are dozens of libraries that do those. Python has a huge library set. So the decision point in your library selection process will revolve around, are you going to be doing text entry? And will you have user added fonts in your universe? A lot of GPU graphics libraries start to fizzle out when you get into text entry and fonts. Many a game has been built using bitmaps of letters, Arranged in spritesheets so that the GPU you can draw text quickly. The game machine companies spend big money in their OS to handle the intricacies of text so the game programmers don't duplicate a lot of effort. anyway you have touched on a deep subject that does not permit a simple answer. I spent much of my career making Japanese software and so this area was of great interest to me
👍 1
z
Ok so it is python. Does this mean python on the server and HTML /JavaScript on the client ?
k
https://wiki.python.org/moin/GuiProgramming might be a starting point. via google: 'cross-platform python gui'
s
Sorry I think I was misleading in my question - I'm talking about good libraries that one could use to make a visual/interactive programming environments. The "OOP" in my question was about the user experience, not about the implementation. I'm indifferent to implementation language, like I said. Of course any UI toolkit or library is capable of doing that (such as GTK), I'm just wondering if anyone has thoughts on ones which are particularly good at it
k
Not to my knowledge. Just the low-level GUI has a lot of trade-offs (some discussed above), and language developers unfortunately don't seem to be a large enough market for a yacc-style GUI tool.
e
I suggest you look into https://www.qt.io/qt-for-python, at least they support Python. Unity favors C++ or JS. Adobe AIR requires Haxe or AS3, OSX requires Swift or ObjectiveC and Android is primarily programmed in Java. Python being interpreted is not typically used to build graphical interactive software. Python has weak module support, so not well suited for large projects. If the reason you like Python is because you prefer indentation significant languages, you can always try my Beads language which is very similar to Python.
👍 1
g
you might want to look at game engines—a lot of UI libraries for HTML/etc are directed at basically form input—if you want to do something more adventurous game engines are usually more amenable without a lot of custom work
👍 2
i
Yeah, if you want graphical interactivity then game engines give you a ton of leverage at a very low learning cost.
m
If you want to use a html/javascript library, then you can take a look at konva https://konvajs.org/ .. it has drag and drop support for shapes. I use it myself actually, together with react
👍 1