core concepts
Understand the fundamental concepts that power Rhappsody apps. These concepts form the foundation of everything you’ll build.
what you’ll learn
- How Rhappsody apps work
- The building blocks of Rhyme
- Key principles and patterns
- Best practices for app development
understanding actions
Actions are the building blocks of every Rhyme app. They’re like Lego pieces - each one does something specific, and you combine them to build amazing things.
what are actions?
Actions are pre-built commands that handle common tasks:
- Displaying text and images
- Getting input from users
- Saving and loading data
- Making decisions
- And much more!
action format
Every action follows this pattern:
category/name parameters
For example:
text/title "Welcome!"
- Shows a titlebutton/text "Click me"
- Creates a buttondata/set $score = 100
- Saves a value
action categories
Actions are organized into categories by what they do:
[blocks]
Blocks are a powerful feature in Rhyme that allow you to organize and structure your code.
block syntax
All blocks in Rhyme are declared on a separate line and are surrounded by square brackets [
and ]
. This simple syntax makes blocks easy to spot and understand in your code.
[block-name]
// Your code goes here
[another-block]
// More code here
The square brackets clearly mark where one section ends and another begins, helping you organize your app into logical pieces.
$variables
Variables are the foundation of data management in Rhappsody applications. They provide a simple, intuitive way to store and manipulate information throughout your app.
key concepts
naming conventions
- Variables are prefixed with a
$
symbol (e.g.,$my-var
) - All variables are global to the entire app
- Variable names are case sensitive -
$my-var
is different from$My-Var
- Convention: use lowercase letters, numbers, and dashes (e.g.,
$user-name
,$item-count
)
best practices
- Use descriptive, meaningful names that clearly indicate the data’s purpose
- Longer names are encouraged for clarity (e.g.,
$customer-email
instead of$email
) - Ensure variable names are unique across your entire application
- Remember that all variables share the same global scope
variable types
string
Text values enclosed in double quotes. Use single quotes when the value contains double quotes.
tags
Tags are single words prefixed with special characters that provide a succinct but clear shortcut approach in the Rhyme language. These powerful shortcuts are used extensively throughout Rhyme to make your code more readable and easier to write.
what are tags?
Tags combine a special character prefix with a descriptive word to create instant functionality:
- Quick to type - Just a few characters give you powerful features
- Easy to remember - The prefix hints at what the tag does
- Visual clarity - Special characters make tags stand out in your code
tag types
Rhyme includes several types of tags, each with its own special character: