[#appendix-tui-catalog]
= Catalog App
:page-section-summary-toc: 1

ifndef::snippets[:snippets: ../../../../../src/test/java/org/springframework/shell/docs]

Catalog application shows various ways how the Terminal UI Framework can be used.
In this section, we discuss how this application works. It can be considered as
a reference application as it's using most of the features available and tries
to follow the best practices.

[[create-scenario]]
== Create Scenario
Every `Scenario` essentially is a sample code of a `View` as that's what catalog
app demonstrates. In the sample app create a new scenario class under
_scenario_ package and implement it as something shown below.

[source, java, indent=0]
----
include::{snippets}/CatalogSnippets.java[tag=samplescenario]
----

NOTE: You need to define all fields, `name`, `description` and `category`
with _@ScenarioComponent_.
