Each component of the PlatformUI application is written as a YUI module.
The YUI module system comes with a dependency system which is used in the PlatformUI application.
For instance, the PlatformUI application has a module called ez-templatebasedview
which provides a base view class to ease the usage of a template.
This module is a dependency of most of the views in the application and has itself some dependencies,
like for instance the view module from YUI. Those dependencies are expressed in the yui.yml configuration
and this configuration is meant to be extended / overridden in other bundles. For instance:

This configuration defines two modules – ez-templatebasedview and ez-loginformview:

ez-templatebasedview requires the modules ez-texthelper, ez-view, handlebars and template.
The source code of this module is in %ez_platformui.public_dir%/js/views/ez-templatebasedview.js on the disk;

ez-loginformview requires the modules ez-templatebasedview, node-style and loginformview-ez-template.
The source code of this module is in %ez_platformui.public_dir%/js/views/ez-loginformview.js on the disk.

Note that the order of module definitions is not important, ez-loginformview
can be defined before the ez-templatebaseview module even if the latter is a dependency of the former.

Most of the PlatformUI application views use a Handlebars template to generate the HTML markup.
In the application the templates are also handled as YUI modules but those modules are special
because they are dynamically generated from the regular template files on the disk.
For this to work, the YUI module corresponding to a template must have the type flag set to template.
To complete the example above, the template module loginforview-ez-template should be defined in the following way:

To be able to extend the PlatformUI application configuration, the extension bundle has to set up its own configuration handling.
For this, you only have to tweak the extension class generated in the bundle in the first step
to load the extension bundle's yui.yml and css.yml and to process their respective content with PlatformUI's configuration.
The default empty yui.yml and css.yml also have to be created so that eZ Platform is still usable.