
Boden – Native mobile cross-platform applications - nurettin
https://www.boden.io/
======
sidewinder128
It looked very promising but GPL for mobile iOS and Android Apps It is
impossible, even I release the Apps free it is very difficult to work with GPL
on those ecosystems. It is sad because it really looks very cool code.

~~~
gitoby
Boden author here, a bit overwhelmed by the feedback. We are in the process of
releasing a new version that will change the license to LGPL / Commercial.

~~~
jacobush
LGPL has the same problem! Users must be able to relink an application with
their own version of the LGPL library. This is impossible for almost all iOS
scenarios and only very slightly easier on Android.

This is often overlooked. If you want to keep LGPL you can investigate
"linking exception", it's used by some GNU libraries if I recall correctly.

This has been discussed for a decade:

[https://stackoverflow.com/questions/459833/which-open-
source...](https://stackoverflow.com/questions/459833/which-open-source-
licenses-are-compatible-with-the-apples-iphone-and-its-offici)

[https://roadfiresoftware.com/2013/08/the-problem-with-
using-...](https://roadfiresoftware.com/2013/08/the-problem-with-using-
lgpl-v2-1-code-in-an-ios-app/)

~~~
gitoby
Please take the following with a grain of salt. I am not a legal expert, but
we have competent US lawyers assessing this for us right now.

The main issue we see with the GPL is that your app has to be effectively
licensed under the GPL too, which makes your app's license incompatible with
the iOS App Store's terms of service.

This is apparently not the case with the LGPL. Yes, you will have to provide a
way for users to relink your application to another version of Boden. As far
as I can see (I am not a lawyer), this can happen outside of the iOS App
Store.

Our US lawyers are currently investigating this. As soon as we get a reliable
assessment from the legal experts, we'll add an LGPL option to Boden.

~~~
jacobush
Tell me, when your user has downloaded an app and wants to relink it with
their custom version of Boden, how do they proceed?

~~~
detaro
LGPL 2.1 6c - on request, you provide the user with object code they can link
against their custom version. Should be enough, if no other terms of the app
store get in the way?

(VLC is an example of a well-known program that relicensed to LGPL and now is
available in the app store, so clearly it is possible)

~~~
jacobush
And how does the user then get their relinked app onto their phone?

(There are _plenty_ of App Store apps with LGPL code in them. The question is,
should they be there? And VLC is not a good example, since presumably, I don't
know - but I think all of it is LGPL or in any case, open source. The user can
rebuild all of VLC in that example. The situation with Boden is going to be
that a an app, probably proprietary, has a Boden library in it.)

~~~
detaro
Isn't the problem of "how do I get the app onto my phone" the same in both
cases?

------
flopp
There's a recent episode of the CppCast where the developers of boden.io are
interviewed: [http://cppcast.com/2019/04/marcus-
tobias/](http://cppcast.com/2019/04/marcus-tobias/)

------
rhodysurf
This is awesome but man the licensing sucks.. Sounds like to release on the
App Store you have to pay for a commercial license? Even a free app?

~~~
cheez
The licensing is likely intended to ensure sustainability

~~~
mwcampbell
Or even, gasp, profitability for the developers. That's a perfectly reasonable
thing for a developer or company to expect.

It would be better, though, if they published pricing and had a self-service
purchase process, rather than requiring users to contact them.

~~~
detaro
It's a really new project, so they're probably still figuring out what model
works best and might want to limit the kind of deal they do - e.g. make sure
it fits the client and they can support them with development where necessary.
Freely selling licenses and then have unhappy customers that didn't evaluate
the current state properly would be problematic.

------
gitoby
Author here. We didn't expect so much attention and are happy about the
feedback! Ask us anything.

With regard to the GPL licensing issues brought up here: We are aware that the
GPL is not sufficient and we are in the process of adding an LGPL option. This
will allow you to publish apps based on Boden on the iOS app store.

~~~
injidup
How will the license enforce that an app using an LGPL version of the library
can't be sold? As such LGPL doesn't mean the consuming app has to be free.

~~~
gitoby
Sorry, I should have written "apps conforming to the terms of the LGPL"
instead of "free". Of course it's still possible to sell apps based on Boden
licensed under LGPL as long as you comply with the license terms.

I fixed the parent comment.

~~~
injidup
Is there then a business model in a commercial license for Boden if a company
can use it as LGPL? In general are there many companies who pay for a
commercial license to avoid LGPL?

------
programmarchy
The target audience seems very small. There’s lots of C# shops (Xamarin), and
lots of JavaScript shops (React Native, Titanium), but few C++ shops that’d
benefit from developing apps.

Maybe I’m wrong but the niche seems too small to be sustainable.

~~~
langitbiru
Soon there will be Dart shops (Flutter). :)

~~~
programmarchy
Funny you mention that. I primarily work with native mobile development and
have grown fond of Flutter. Interestingly, the situation is reversed; shops
will adopt Dart because of Flutter.

~~~
pjmlp
At least that is what Dart team hopes, after losing support from Chrome and
Angular teams.

~~~
felideon
Except Angular Dart is alive and kicking, no? Powering AdSense at least which
is a huge chunk of Google's business if I recall correctly from a Flutter talk
by the PM who put some numbers on a slide.

~~~
pjmlp
It looks pretty dead to me.

AdSense team rescued Dart from certain death.

They also used to be heavy GWT users before, a stack now mostly discarded by
Google.

------
ericlewis
From reading the iOS code there is already a number of bugs that will have
issue, including but not limited to the iOS handling of text inputs. You won't
get events / onchange firing correctly for autocorrections or when Chinese
chars compact themselves. Seems like a very cool project anyway, there is a
lot you could learn from react-native's approach to native components.

Edit: not to mention no support for text areas, will be interested to see that
abstraction :)

~~~
Jach
I didn't look but I suspected such issues the moment they mentioned best
practices and std::string in the same paragraph... It seems like it could be a
fun project but I wonder who the target audience will be. Maybe they're
working with a partner? I'm thinking for others it must be new startups just
starting out, since every existing company I've seen that targets both
platforms with native apps inevitably seems to split the codebases into iOS
and Android sides because the platforms are sufficiently different. And of
those companies a subset will have a shared C++ layer where it makes sense,
probably with lots of cross platform issues already ironed out such that
trying to drop in this would be too risky unless it matures into a really
awesome project rather than its current preview release state... Best of luck
to them.

------
ppeetteerr
It's cool to have options for x-platform development. I think we're at a solid
3 solutions: Boden (C++), Kotlin, and Xamarin (C#). Not to forget Unity and
the JS solutions out there...

~~~
andrewmd5
Flutter (Dart) is one of the best.

~~~
ppeetteerr
Oh yeah! Good call.

------
charlesdaniels
I am curious to know if this can also target a desktop toolkit such as
gtk/qt/tk/wx and so on. I probably wouldn't want to use such an arrangement as
a user, but I could see it being very useful as a developer for testing out
app functionality without emulation or a separate device.

I also wonder if this will be able to target the puri.sm Librem 5 when that
comes out?

~~~
gitoby
There is already an experimental macOSX port in boden. More desktop support is
a future goal. The library is designed to support all types of operating
systems.

------
openbasic
I don't see anything on camera, GPS, maps, push, etc. Was this implemented?

~~~
detaro
From what I remember from a podcast with the creators (cppcast I think), it's
planned but not yet implemented.

------
chrismsimpson
This is how I think it should be solved:
[https://github.com/chrismsimpson/Meta](https://github.com/chrismsimpson/Meta)

------
dang
A discussion from 6 months ago:
[https://news.ycombinator.com/item?id=18570423](https://news.ycombinator.com/item?id=18570423).

~~~
Lord_Zero
From that thread:

> Yes, I was also wondering why it's necessary to come up with yet another
> smart pointer, which you need to learn and which is probably not battle
> tested. -
> [https://news.ycombinator.com/item?id=18586992](https://news.ycombinator.com/item?id=18586992)

Even though on the main website they say:

> No custom containers, smart pointers, or reinvented basics. This allows you
> to reuse your existing knowledge and focus on what's most important: your
> app.

~~~
stackmad
Author of boden here: We have since moved away from a self written smart
pointer and replaced as much as possible with standard C++ classes (
shared_ptr, weak_ptr, std::string etc. )

------
rw2
I want to use C++ less than Java and Swift, especially Swift, I don't see this
as catch on because C++ is lower level language.

------
bsimpson
I don't speak C, but as a long-time web developer, it smells to me to see
"Center" capitalized in the flexbox snippet. Why is it different than CSS? How
is a developer supposed to understand the capitalization rules?

[https://www.boden.io/reference/ui/yoga/layout/](https://www.boden.io/reference/ui/yoga/layout/)

~~~
rayiner
In C/C++ a common style is to use camelcase with an initial lower case letter
for variable like things and with an initial upper case letter for constant or
enumeration like things.

------
layoutIfNeeded
While I love C++, I can’t help but see this as the n-th iteration of the noble
but impossible pursuit of a cross-platform GUI framework.

Cross-platform GUIs never work. They _almost_ work to the point where managers
latch onto the idea because they think it will let them fire half of the
engineers, but the end result is always well in the uncanny valley.

Open Gimp on macOS and see what I’m talking about. Or Slack. Or Eclipse. Etc.

------
emmanueloga_
I was exciting about trying an C++ IDE again after a few years of working in
other languages. I tried VisualStudio for some simple C++ stuff (learning
OpenGL with GLFW) and I found compilers and IDEs are still a pretty sluggish
experience, all these years later.

I suspect Qt people developed QML for this reason: it is hard to beat the
experience of instantly running something vs compiling C++ code on each run.

------
IceWreck
> Write your mobile apps in modern C++17 and compile 100% native Android and
> iOS apps from a single statically typed codebase.

Does this thing work in the same way as flutter? (ie. your own UI framework
that looks and feels like the official one?)

~~~
pjmlp
Not at all, they bind to platform widgets and use a programming language that
is one of the building blocks of our industry.

------
pier25
So how does this actually work? It sounds like Xamarin Forms.

~~~
rhodysurf
uses C++ interfaces to native (objC/Java) classes so you can write the whole
app in C++

------
bbarley
Forget Boden and forget messy C++... use Google backed Flutter framework with
Dart.

[https://flutter.dev](https://flutter.dev) Checkout youtube for presentations.

Build once for iOS, Android, ChromeOS, Web, All desktops.

~~~
untog
As the intro page demonstrates, modern C++ isn't really all that messy. I
think there's a solid argument that it's a more dependable option than Dart,
which isn't really used by anyone other than Google.

~~~
bbarley
Better languages have moved beyond C++. I've developed software for over 20
years. I've use C++ for many of those years. Software languages and tools have
evolved past C++.

Imagine the "evolution of man" drawing. C++ is the middle guy not exactly
standing upright.

~~~
untog
An "evolution of man" drawing wouldn't really be accurate because it implies
each entry is static in terms of evolution. C++ is very obviously not, and
modern C++ is barely recognizable compared to code written years ago.

------
jfbaro
Awesome! Does anyone know if there is any similar framework for RUST?

~~~
pjmlp
First Rust still requires some ergonomic improvements to handle GUI coding in
a better way.

~~~
weberc2
Like what? (earnest question)

~~~
pjmlp
Handling callbacks without piles of Rc<RefCell<>> to access widget data, or
having vectors simulating graphs, the most used data structure for UI widgets,
having to deal with use-after-free indexes.

~~~
holy_city
It sounds like you tried to write rust like it's OOP. You're gonna have a bad
time if you do that.

>Handling callbacks without piles of Rc<RefCell<>> to access widget data

That's why you don't let widgets hold program state, they should just
propagate deltas and display current state. It's a different way of thinking
about how UI can work, but imho it has a lot of benefits aside from just speed
and safety.

>having vectors simulating graphs,

You mean adjacency lists? They're a canonical realization of a graph, and a
fast one at that.

>having to deal with use-after-free indexes.

What do you mean by this?

~~~
pjmlp
I have experience with plenty of languages, including doing UI programming in
Haskell, just to make your point.

If Rust answer to typical UI programming patterns is "you are holding it
wrong" then don't expect too much uptake by mainstream UI developers.

See Catherine's talk about their game engine implementation, regarding use-
after-free indexes, and techniques to avoid it, by binding timestamps to
indexes.

~~~
holy_city
I don't think Rust has any one answer to a UI problem, since the UI story is
basically the wild west right now. Everyone is doing something a little
different.

I didn't mean to imply that, just that when I see people complain about the
ergonomics of the language and point to using a bunch of Rc<RefCell<T>> stuff
usually smells funny, it implies to me that you're either trying to use OO or
control flow architectures and patterns, where the type system is able to
handle the edge cases that you'd need to think about anyway. There are nicer
alternatives, especially in terms of data flow architectures.

And I don't know what you mean by "indexes" in this context or which talk
you're referring to, do you have any more details or a link? Google isn't
finding me anything.

~~~
pjmlp
Catherine is relatively known in the Rust community, hence why I didn't
mention anything else.

Here is her keynote talk at Rust Conf 2018.

[https://youtu.be/aKLntZcp27M](https://youtu.be/aKLntZcp27M)

~~~
holy_city
Ah ok had to skim through the slides a bit, I think you meant to use the
phrase "generational indexes" which is why googling didn't help me. This
project was more helpful for my understanding:

[https://github.com/fitzgen/generational-
arena](https://github.com/fitzgen/generational-arena)

I'm not sure what your ultimate point was though? You don't have to use
anything like that in normal Rust code

~~~
pjmlp
Only if you understand by normal Rust code, CLI apps.

If we are talking about graphical applications, that would be a common usage.

------
abtinf
A cross-platform c++ framework... why not just use QT?

~~~
detaro
Qt isn't using native elements, and their mobile support is usable but not
really great either (and doesn't appear to be a current priority, which makes
a mobile-only project potentially more attractive). I'm not sure I'd use it if
I didn't have existing Qt experience or even code to reuse.

