Skip to content
Purely native C++ cross-platform framework for Android and iOS development. https://www.boden.io
C++ Objective-C++ Python CMake Java C
Branch: master
Clone or download
Latest commit 7b7ab98 Aug 13, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
3rdparty Updating nlohmann/json to v3.6.1 (#298) Jun 7, 2019
README Release 2019q2 (#288) May 30, 2019
bauer BDN-591 - Added Windows build pipeline (#332) Jul 29, 2019
cmake Android improvements (#320) Jul 17, 2019
docker Added Android/iOS/macOS icon support to roger (#260) May 13, 2019
docs [Breaking Change] Capitalize TriState enum values (#333) Jul 29, 2019
examples
framework [Breaking Change] Capitalize TriState enum values (#333) Jul 29, 2019
package Made testboden_common a shared library; added iOS signing; refactored… Aug 30, 2018
roger Android win (#291) May 30, 2019
tests BDN-620 Allow clicking links in Labels (#327) Jul 24, 2019
.clang-format Sort Includes (#170) Feb 15, 2019
.clang-tidy Adding and applying clang-tidy Mar 19, 2019
.dockerignore set up docker for building and testing Oct 21, 2016
.gitattributes
.gitignore Boden Strap: auto install dependencies (#109) Oct 9, 2018
.gitmodules Removing/Refactoring various outdated classes, switching to googletes… Apr 5, 2019
CLA.md Contribution License Agreement (#331) Jul 24, 2019
CMakeLists.txt Change version to 0.3 Aug 13, 2019
Jenkinsfile BDN-591 - Added Windows build pipeline (#332) Jul 29, 2019
LICENSE.FDL-1.3.md LGPL Proposal (#205) Jun 18, 2019
LICENSE.GPL-2.md LGPL Proposal (#205) Jun 18, 2019
LICENSE.GPL-3.md LGPL Proposal (#205) Jun 18, 2019
LICENSE.LGPL-2.1.md LGPL Proposal (#205) Jun 18, 2019
LICENSE.LGPL-3.md LGPL revision (#308) Jun 24, 2019
LICENSE.md
README.md Add -t bodendemo to build instructions to speed up building with Andr… Jun 26, 2019
THIRD-PARTY-LICENSES.md Add Yoga to list of third-party licenses Mar 5, 2019
boden BDN-355: Adding project template function "new" (#137) Nov 16, 2018
boden.py BDN-306, BDN-310 Rename build.py, remove everything but ios,android,mac Oct 17, 2018

README.md

BODEN CROSS-PLATFORM FRAMEWORK

Build purely native cross-platform experiences with Boden

Website Getting Started API Reference Guides Twitter Feedback

  • Native widgets: Instead of drawing widgets that look nearly identical to the platform's design, Boden uses native OEM widgets ensuring that your app will always have a truly native look and feel.
  • Fast: Boden is written in modern C++17 to make development easy and apps fast and battery-friendly.
  • Open: Boden is an open framework and welcomes contributions and feedback from the community. We want you to shape its development so Boden can meet your requirements.

Note: This is a beta release. The Boden API is not yet fully complete and stable.

Table of Contents

Getting Started

Prerequisites

On a Mac: macOS 10.14+, Xcode 10.1+, Python 3.4+, CMake 3.10.2+.

On Windows: Windows 10, Python 3.4+, CMake 3.10.2+, Ninja, Git, Oracle JDK 8, and Android Studio (with Android NDK, see the installation instructions for further details).

On Ubuntu 18.04: sudo apt update && sudo apt install git cmake ninja-build python python3-distutils openjdk-8-jdk qemu-kvm plus Android Studio (with Android NDK, see the installation instructions for further details).

Step 1: Clone the Boden Repo

git clone --recurse-submodules https://github.com/AshampooSystems/boden.git

Step 2: Generate and Open an IDE Project

cd boden
python boden.py open -t bodendemo

This will bring up Xcode on macOS or Android Studio on Linux/Windows.

If anything goes wrong, please make sure that all dependencies are installed and set up correctly. Check out our extended guides for help:

Step 3: Run a Boden Example Application

In Xcode, select the bodendemo target and hit Cmd+R.

In Android Studio, select the bodendemo target and hit Shift+F10.

Your First Boden Application

To create your first Boden app, open up a terminal (or command prompt), change to your local boden directory, and execute the following commands:

python boden.py new -n AwesomeApp
cd AwesomeApp
python ../boden.py open

This will create a new folder named AwesomeApp and generate source and project files for a simple Hello World cross-platform application. The last command will prepare and open an Xcode project on the Mac or an Android Studio project on Linux/Windows.

In Xcode, select the AwesomeApp target and then press Cmd+R to build and run the Hello World application.

In Android Studio, wait for Gradle to finish its sync and configuration processes and then select the bodendemo target and press Cmd+R to build and run the example application, then select the AwesomeApp target and then press Ctrl+R on Mac or Shift+F10 on Linux/Windows to build an run the Hello World application.

Note: On macOS and Linux you can also simply type ./boden instead of calling python boden.py explicitly. If you want to build the Android version of the app on macOS, run ../boden open -p android.

Hello World

Here's a quick look at the source code generated by the boden new command:

// MainViewController.cpp
#include <bdn/ui.h>
#include <bdn/ui/yoga.h>

#include "MainViewController.h"

MainViewController::MainViewController()
{
    _window = std::make_shared<bdn::ui::Window>();
    _window->title = "AwesomeApp";
    _window->geometry = bdn::Rect{0, 0, 400, 300};
    _window->setLayout(std::make_shared<bdn::ui::yoga::Layout>());

    auto button = std::make_shared<bdn::ui::Button>();
    button->label = "Hello World";

    _window->contentView = button;

    _window->visible = true;
}

MainViewController.cpp is the most interesting part of the source generated for the Hello World application. The main view controller will be instantiated at application launch. It's responsible for setting up the application's user interface.

Here's what the code does in detail:

First, create a new Window and set its title to AwesomeApp:

_window = std::make_shared<bdn::ui::Window>();
_window->title = "AwesomeApp";

To get an automatic layout, use a yogalayout::Layout and set a default window size:

_window->geometry = bdn::Rect{0, 0, 400, 300};
_window->setLayout(std::make_shared<bdn::ui::yoga::Layout>());

Then, instantiate a new Button and set its label to "Hello World":

auto button = std::make_shared<bdn::ui::Button>();
button->label = "Hello World";

As the button is the only control which will be displayed in this example, set it as the window's content view:

_window->contentView = button;

Finally, make the window visible:

_window->visible = true;

Documentation

You can find the full Boden documentation on our website.

The Boden documentation is still work in progress. If you can't find the information you're looking for, please don't hesitate to ask by opening a GitHub issue or contacting us directly.

License

You may license Boden under one of the following open-source licenses:

For commercial/proprietary licensing, please contact us at boden-team@ashampoo-systems.com.

Contact & Feedback

We are happy about your feedback!

Get in touch with us and stay up to date about Boden:

If you find something that is missing or doesn't work, please consider opening a GitHub issue.

You can’t perform that action at this time.