Live data from Hacker News

Boden cross-platform framework: Native C++11, native widgets, no JavaScript

github.com

91–98 of 98 posts

Re: Boden cross-platform framework: Native C++11, native widgets, no JavaScript

#91
post #76

Why is it that nowadays all kinds of libraries go down the framework path by forcing/encouraging the user to adapt their workflows to use some kind of custom tooling? I mean look at the readme: Getting Started? Just call "python boden.py new -n AwesomeApp" Just provide examples in source form with minimal and standard instrumentation (like project files) and leave the rest to the user

I rather like using the custom tooling. It means that if people are following the prescribed procedure, they will always be using the latest version of a project template or some such rather than duplicating a local copy of what might be a hideously out-of-date template.

With Swift, for example, using Swift Package Manager (SPM) to initialise templates means that the syntax in the newly-created project's files is up-to-date, the Package.swift file follows the appropriate naming conventions for whatever version of SPM it is, and it's much more convenient to do `swift init` than to go clone a github repo manually then rename this or that.

It's basically a command-line version of project templates in Visual Studio or whatever, and people generally like those. Sane defaults are nice, but sane defaults with validation are nicer.

Though I agree that it would be nice to just have a blank template available for those who don't want to use the tooling. There should always be a subsection in the Getting Started section that says "clone this repo, and you're good to go. Be sure to clone the repo again when you want to make another project; don't just copy your existing clone!".

Re: Boden cross-platform framework: Native C++11, native widgets, no JavaScript

#92
post #80
post #55

This does not appear to be idiomatic C++11. I mean: bdn::P button = bdn::newObj (); Idiomatic would be to use std::shared_ptr and std::make_shared, instead of yet-another-custom-smart-pointer.

I am a member of the Boden dev team. The smart pointer system is actually still a topic of discussion in the Boden team as well. It has a couple of nice properties, like the fine grained control bdn::P gives us over the time when an object is actually destructed. For example, these pointers provide an easy way to ensure that destruction of our View objects happens only on the main thread, no matter which thread relea…

Deferring destructors is a suspicious pattern in general - in C++, I generally expect them to not be async and unpredictable like that. What guarantees do you make wrt destruction order? I hope it's not as complicated as finalizers in Java and C#...

The more logical model, to me, would be to have child views owned by parent views, and to only allow ownership-changing calls (i.e. adding or removing a child) from the main thread. That way all you really need is unique_ptr (from parent to children) and raw pointers (from children to parent, and from any observers). Although it would probably still be better to use shared_ptr just so that observers can use weak_ptr, since untangling lifetimes in callbacks can be tricky, and often it's easier to just check if the object is still there.

To give a specific code example, with unique_ptr, the same snippet would be:

    _window = std::make_unique();
    _window->setTitle("AwesomeApp");

    auto button = std::make_unique();
    button->setLabel("Hello World");

    // The following *moves* button, such that _window takes ownership over it.
    // It can only be called from the main thread.
    _window->setContentView(button); 

    _window->requestAutoSize();
    _window->requestCenter();
    _window->setVisible(true);
And furthermore, _window wouldn't have to be a pointer at all - it can just be a member of MainViewController.

Re: Boden cross-platform framework: Native C++11, native widgets, no JavaScript

#93
post #79

GPL means its pretty much unusable...

Author here. We’re still in the process of figuring out what the right open-source licensing model for Boden should be. In the long run, development must be financed by a viable business model as Boden is not a hobby project. We’re considering adding a commercial option later, ending up with a dual GPL/commercial license similar to other projects. We’re happy to hear your thoughts about other licensing options!

I should have been a little clearer than my one line quip. I wasn't trying to say you should give it out for free :). It's just that GPL and LGPL (v3 specifically) are extremely hard or impossible to comply with in the mobile world.

Even if the software author complies with terms and provides full source or in the case of LGPL, enough to relink the app with a modified version of a LGPL'd component, you can't really swap the app for your modified one due to the "protections" in place on Android and iOS.

Personally, I'd suggest taking a look at how Qt does their commercial licensing.

Re: Boden cross-platform framework: Native C++11, native widgets, no JavaScript

#94
Flutter, out of Google is a solution for iOS and Android cross-platform development that includes very fast UI primitives, a edit and continue workflow, intuitive and reactive UI framework, and a nicer high-level language to work with than C++ (Dart).

Re: Boden cross-platform framework: Native C++11, native widgets, no JavaScript

#95

Earlier quoted context omitted.

In your experience, how do web applications compare to native Mac apps? Of course, a web app can be accessible with both VoiceOver and magnification (based on all the features you listed, I'm guessing you're low-vision). But are even the most accessible web applications noticeably less efficient for you than native Cocoa apps?

You're correct, I have low vision. Enough to code and read relatively comfortably, but not for long; so I either make the text enormous or turn on VoiceOver. Below, I'm talking about macOS; I don't use VoiceOver on iOS. I tend to find with web apps that they're pretty inaccessible with VoiceOver, depending on what they were made with. If it's Electron or React Native, unusable. I just make the text huge. No good for…

Interesting. Based on your description, it seems that NVDA on Windows fares better with Electron apps than does VoiceOver on Mac. NVDA's "browse mode" features work equally well whether it's Electron, Chrome, or Firefox (and to a lesser extent in IE and Edge).

In another thread, you wrote that Xcode is the best IDE you've found for Mac simply because it's native to the Mac. Have you tried Eclipse? Given that Eclipse's SWT widget toolkit is based largely on native widgets, it might be native enough. Then again, the editor is custom, so it may still fall short.

I ask you these questions because I'm interested in the perspective of a Mac user who has apparently learned to make very effective use of multiple Mac accessibility features.

Re: Boden cross-platform framework: Native C++11, native widgets, no JavaScript

#96

Earlier quoted context omitted.

You're correct, I have low vision. Enough to code and read relatively comfortably, but not for long; so I either make the text enormous or turn on VoiceOver. Below, I'm talking about macOS; I don't use VoiceOver on iOS. I tend to find with web apps that they're pretty inaccessible with VoiceOver, depending on what they were made with. If it's Electron or React Native, unusable. I just make the text huge. No good for…

Interesting. Based on your description, it seems that NVDA on Windows fares better with Electron apps than does VoiceOver on Mac. NVDA's "browse mode" features work equally well whether it's Electron, Chrome, or Firefox (and to a lesser extent in IE and Edge). In another thread, you wrote that Xcode is the best IDE you've found for Mac simply because it's native to the Mac. Have you tried Eclipse? Given that Eclipse'…

I had to install Java and Eclipse to give it a try just to reply to this comment.

I never liked Eclipse, it always felt extremely non-native to me. Nothing much seems to have changed.

Right from the start, the Eclipse Installer (by Oomph, apparently) is a web app that VoiceOver has difficulty with meaning I have to interact with it using web navigation controls which is a pain when I'm not expecting it.

The rest of the interface was a bit hit and miss. Either VO could read what was on screen, or it thought I was looking at a table that apparently had no elements in it.

Turning VO off and clicking around, still definitely not a native experience, though better than I remember it. Native-handling of text, access to macOS Services… but only in certain parts of the program!

After poking around a bit more, it turns out the only places I could get native handling of text were web views (of which there are many); most text presents non-native controls to deal with things like copying and pasting, precluding the ability to use built-in Services.

Besides that, the way the app is designed was just foreign. Non-native paradigms for presenting information like those tear-off palettes (that turn into weird, full windows when torn off, rather than inspector palette windows; if you click the internal (non-macOS) minimize button on one of these windows, the window itself stays the same size, but the UI inside gets smaller, leaving this huge empty window with nothing in it.

I was curious to see what VO would say about this window. It was just as confused as I was, thinking one of the two remaining on-screen buttons was a checkbox. That's probably how it was implemented internally, but it was certainly not a checkbox. Once I clicked on the internal restore button, the rest of the UI came back, but VO couldn't tell me what it was looking at. I had to Tab around blindly to get to a usable control, and even then, VO couldn't tell me where it was or in what context.

I couldn't actually create a new project because the "Finish" button, when creating a project, didn't seem to do anything, either through VO or using the mouse pointer directly. The button was lit up and coloured as though it were selectable, it just didn't do anything. So I couldn't actually play with the IDE itself, but I knew I was done with it.

The design looks and feels like Windows in the late 90s/early 00s, from the layout of various windows to those weird tear-off sidebar things. I especially despised the tiny icons that all practically looked the same, conceptually blurred together, and I couldn't find a clear way to make them bigger. VO saw each draggable toolbar as separate, making the toolbar at the top unnecessarily difficulty to navigate. Then those same icons infiltrated the global menus, making those a mess to wade through.

I'm a great believer that there is absolutely nothing stopping cross-platform desktop software being a first class citizen on, at the very least, the three main players: Windows, macOS, and Linux. Sadly, Eclipse, like most Java software, thinks it can get away with the last common denominator stuff and force it on other systems. It just makes for a rather unpleasant time, whether VO is on or not. Native widgets don't make up for non-native design patterns.

Sorry for the novel!

As to NVDA, I expect NVDA uses some heuristics to figure out how to read out all the myriad types of interfaces there are on Windows. I remember one app for vision impaired people, I can't remember it's name because I wound up passing on actually buying it, that basically constantly scanned what was on screen and made informed guesses. I'd say VoiceOver probably relies more on well-made apps conforming to system guidelines; if so, it's somewhere between naïve and brilliant, because I personally favour a system where accessibility is a first-class citizen, not an afterthought for which we need to call upon the powers of magic to figure things out.

Re: Boden cross-platform framework: Native C++11, native widgets, no JavaScript

#97
post #26

Earlier quoted context omitted.

v1.0 final is not even out yet...

I don't call that a defence when it's already out in the wild, and people are already talking about it like it's "good enough" when we are already able to use its version number as justification when it's clearly not.

And now, Flutter is at 1.0 as of today.

Re: Boden cross-platform framework: Native C++11, native widgets, no JavaScript

#98
post #77

Earlier quoted context omitted.

Maybe you mean that "native widgets" has become just a byword for "following platform conventions"?

I think he means "things tend to either with follow conventions and use native widgets, or they do neither". Users can internalize that dichotomy, and recognize that as soon as they don't see native widgets they probably aren't getting platform conventions either.

Basically that, yes. I don't think people are necessarily conscious of the association, though.
Post reply on HN