> For the complete documentation index, see [llms.txt](https://windows96.gitbook.io/dev-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://windows96.gitbook.io/dev-docs/getting-started/some-examples/1.-a-very-basic-app.md).

# 1. A very basic app

This API example will show you how to create a very basic app with a resizable window. You may use it as a base for new apps, since it will just be an empty window.

## Creating the file

This example will take place at `c:/system/boot/apps/example_1.js`.

## Defining the goal

The goal of this application is to be used as a base for writing new applications to save time.

## The source code

```javascript
// Import the necessary functions from their namespaces.
const { register } = w96.app;
const { Theme } = w96.ui;

// Define the application class
class ExampleApplication extends WApplication {
    constructor() {
        super();
    }
    
    async main(argv) {
        super.main(argv);
        
        // Create the main window object and assign it to a variable
        const mainwnd = this.createWindow({
            title: "My Application",
            icon: Theme.getIconUrl("exec", "small"), // The icon for this window.
            initialHeight: 400,
            initialWidth: 640,
            body: "very cool text", // Specify the HTML body of your application here.
            bodyClass: "example1-app", // The class to use to style the body and its contents of this window.
            taskbar: true // Show this window in the taskbar
        }, true); // true specifies that this is an app window (main window)
        
        mainwnd.show();
    }
}

// Register the app

register({
    command: "example-app",
    type: "gui",
    cls: ExampleApplication,
    meta: {
        icon: Theme.getIconUrl("exec"), // You may specify a custom icon URL here.
        friendlyName: "Example Application"
    }
});
```

## The final result

![The result of this example.](/files/-Mg9Vy-zX-WATlyweuxY)

## Important notes

Note that this app uses `this.createWindow` instead of `StandardWindow` to create windows. This is done because `WApplication` will automatically manage the creating of windows and sub-windows when the application is started.
