References Getting Started Getting Started Architecture Architecture Application Application Window Window WebView WebView Deployment Deployment Components Components Framework Integrations Framework Integrations Examples Examples Community Community github GitHub github Get Started arrow_up_right
Getting Started Getting Started Architecture Architecture Application Application Window Window WebView WebView Deployment Deployment Components Components Framework Integrations Framework Integrations Examples Examples Community Community

Architecture

Configuration Events Getting Started Architecture Application Window WebView Deployment Components Framework Integrations Examples Community

Configuration

Boson applications are configured using clean, structured DTO (Data Transfer Object) classes.

$config = new Boson\ApplicationCreateInfo( 
    name: 'My Application',
    debug: true,
);

These DTOs encapsulate all the necessary configuration settings and are passed directly into the application's constructor (optionally).

$app = new Boson\Application( <Boson\ApplicationCreateInfo> );

This approach ensures a clear separation of concerns, type safety, and easy maintainability — making your setup explicit, predictable, and easy to reason about. Whether you're defining window size, webview content, or runtime options, everything is handled through well-defined DTOs that keep your codebase organized and expressive.

You can read more about each configuration objects in the corresponding sections of the documentation.

Hierarchy

Boson's configuration system is built on a clear and logical hierarchy. At the top level, you define global application settings (ApplicationCreateInfo) — things like the app name, threads count, debug mode, and general behavior.

Nested within those are window-specific configurations (WindowCreateInfo), where you can control properties such as dimensions, resizability, title, and more.

Digging even deeper, each window contains its own embedded WebView settings (WebViewCreateInfo), giving you fine-grained control over how web content is rendered, what scripts are allowed, caching policies, and other browser-like behaviors.

flowchart
    Application[ApplicationCreateInfo] --> Window
    Window[WindowCreateInfo] --> WebView
    WebView[WebViewCreateInfo] --> BatteryApi
    WebView[WebViewCreateInfo] --> NetworkApi
    WebView[WebViewCreateInfo] --> BindingsApi
    WebView[WebViewCreateInfo] --> DataApi
    WebView[WebViewCreateInfo] --> WebComponents
    BatteryApi[BatteryApiCreateInfo]
    NetworkApi[NetworkApiCreateInfo]
    BindingsApi[BindingsApiCreateInfo]
    DataApi[DataApiCreateInfo]
    WebComponents[WebComponentsCreateInfo]

This layered configuration model keeps your setup organized and modular. Each level of the hierarchy focuses on its own responsibilities, making it easier to understand, maintain, and scale as your application grows.

An application without windows and webview in them makes no sense, the configuration settings of the main window (as well as the main window itself) are always present and available.

github discord telegram Get started Documentation Contribution Guide License Release Notes BOSON PHP © 2025. All Rights Reversed.