# About aspects

This tutorial gives an overview of what _aspects_ are, in the context of _BladeRunner,_ and explains how they fit into the application structure.

An _aspect_ is a specific presentation of an app to a user. It might be used in particular circumstances (in the [Creating a New Aspect](bladerunner-create-a-new-aspect) tutorial, there is a detailed example of a _Login aspect_, which is displayed instead of the main app contents if the user is not logged in), on particular devices (you might need to access the same information and functionality through a completely different interface, depending on whether you are using a PC, a tablet or a smart-phone), or because of different preferences. A single app may have multiple _aspects_; providing for different devices, user segments and so on. On the other hand, an app might get by perfectly well on just the _default-aspect_. It all depends on your needs.

In a _BladeRunner_ application, an _aspect_ consists of an entry _index.html_ page, and a set of required resources. It acts as a sub-context for that application. Each aspect potentially has access to all the resources and _blades_ in its parent application, but it may be set up only to deliver a fraction of that to the end-users.

## The Basic App Structure

Within the _bladerunner_ directory, your _apps_ folder will contain the root folders of all your apps, plus a folder called _WEB-INF_. The example below has only one app: **_myapp_**. The home directory of each aspect resides in the root of the application that owns it; its name always suffixed with **_-aspect_**.

![br_aspect_1](../../../images/br_aspect_1.png)

In the above example, **_myapp_** contains a single _bladeset_ (which contains all the _blades_ belonging to the app) and a single _aspect_: the aptly named **_default-aspect_**.

## How do Aspects Work with bundlers?

An aspect uses '_seed locations_' to determine which of its parent application’s _blades_ and resources it depends upon. These _seed locations_ are made up of the _src_ and _resources_ folders as well as the _index.html_ file within the _aspect’s_ home directory.

![br_aspect_2](../../../images/br_aspect_2.png)

These _seed locations_ are scanned for references to _caplin libraries_, _third-party libraries_, _bladesets_ and _blades_. If any are found, those resources are then pulled in, together with any dependencies that cascade downwards for each _bundle_ resource type.

For instance, you might have some HTML inside the _resources_ folder of your _default-aspect_, which refers to a _blade_. _BladeRunner_ will see this and load this _blade_ into your app when the _default-aspect_ is viewed.

<dl><dt><strong>💡 TIP</strong></dt><dd>

You can see all the dependencies for a particular aspect, by running the '_app-dependencies_' command:

```
bladerunner app-dependencies _<app-name> <aspect-name>_
```
</dd></dl>

For example:

```
bladerunner app-dependencies example-app default
```

You can find out how to create a new _aspect_ in the [Creating a New Aspect](bladerunner-create-a-new-aspect.md) tutorial.
