From Clomosy Docs
Overview
TRObject is a programming language designed for developing mobile applications on the Clomosy platform. It can be run on various operating systems such as Android, Windows, iOS, macOS, and Linux via the Clomosy Learn application. This document is intended to help you understand the TRObject language and assist you in progressing with the related frameworks.
Audience
This document is designed for beginners and software professionals who wish to learn the TRObject programming language through simple and easy-to-follow steps. The aim is to provide a foundational understanding of TRObject programming concepts. Upon completing this document, you are expected to reach an intermediate level of knowledge and advance towards higher expertise in mobile application development.
Prerequisites
Before starting this course, you should have a basic understanding of the Clomosy mobile application development platform and fundamental software concepts. If you already have knowledge of another mobile application development platform or a computer programming language, it will provide you with an additional advantage.
Why Use TRObject?
- Modern Syntax: TRObject features a readable and modern syntax, making the software development process more efficient.
- Object-Oriented Programming: By supporting the object-oriented programming paradigm, it makes complex software projects more manageable.
- Ease of Learning: TRObject is designed to be easily learned by beginners, allowing them to quickly grasp coding concepts.
- Extensive Library Support: Offers extensive library support for various tasks and functions, accelerating the mobile app development process.
- High Performance: Optimized for developing high-performance mobile applications.
- IoT and Integration Support: Seamlessly integrates with Raspberry Pi, MQTT protocol, SQL databases, and IoT projects, offering compatibility with next-generation software languages.
Program Structure
Every Clomosy program follows a specific execution order. This section explains how to structure your code and build the program structure using TRObject syntax on the Clomosy platform. Key rules and building blocks for organizing code in a modular and understandable way are discussed under this heading.
Syntax
The rules that define how to correctly write code in your language. This includes variable declarations, function calls, operator usage, and other grammatical rules specific to the language.
Data Types
A description of the data types supported by your programming language (e.g., integers, floating-point numbers, strings, etc.) and how they are declared and used within the program.
Operators
The operators used to perform mathematical, logical, and comparison operations in the language. This section explains how addition, subtraction, logical operators (AND, OR), and other operations work.
Conditional statements
Explains how to control the flow of the program using conditional statements like "if" and "else." This section covers how the program behaves based on different conditions.
Loops
A guide to repetitive task structures like "for" and "while" loops. It explains how to iterate over a set of instructions and when to use each loop type.
Functions
This section covers how to define and use reusable blocks of code that perform specific tasks. It explains function definitions, how to pass parameters, and return values.
Procedures
Similar to functions but without returning a value. This section explains how procedures are used for performing specific tasks and when to use them instead of functions.
System Library
SystemLibrary is a library that is included by default in all script components. It adds frequently used procedures and functions such as ShowMessage and IntToStr.
Clomosy Class
The structure of the Clomosy class includes properties used to obtain information related to the user account, parameter usage, unit creation, and system functions within the project. These properties bring together data and behaviors, enabling the design of complex projects in a more understandable way.
Error Trapping
Explains how errors are handled in the language. This section describes error-catching mechanisms (e.g., "try-catch" blocks) and how to manage errors to prevent program crashes.
File Handling
In Clomosy, text files are used for defining, storing text-based data, or performing read/write operations.
Arrays
An array is a data structure that can store multiple values of the same type. It can have a fixed size or be dynamically resized. Arrays allow access to elements via indexes and are typically used to organize and manage groups of data efficiently.
In the Clomosy platform, there are two types of array usage:
Units
In Clomosy projects, the Unit structure is used to organize code into functional and manageable parts. A Unit is a package of code that represents various components and modules within a project.
Responsive Designing
In Clomosy, responsive design is achieved not through flexible structures like in the web world, but by dynamically adjusting the size and position of visual components.
Especially in desktop applications, a responsive layout can be created using properties like Align, which adjusts the size of components based on the width and height values of their container.
After reviewing the Forms and Components section, you can explore how to create a design.
Forms
Forms are fundamental building blocks for creating user interfaces in Clomosy applications. Forms contain visual objects (controls) and their associated events.
Components
In software development, components are reusable objects used to perform specific functions. Components can serve a wide range of tasks, from user interface elements to more technical functions like data access or network communication.
Sensor Structures
Sensor structures allow devices to detect and analyze environmental data. Many sensors are present on smart devices. Sensors are of great importance in making tasks easier for end users.
Animation Usage
To create animations, bitmap sequences to be played at a specific speed can be defined using TclBitmapListAnimation, and the start and end times of the animation can be controlled.
Database Operations
Database operations on the Clomosy platform enable users to manage data efficiently. Database connections can be established, queries can be executed between tables, and data can be read and updated. Clomosy supports SQL queries, providing developers with flexible data management capabilities.
Related Links (Follow the Steps to Proceed)
- Download to use the Clomosy platform.
- To become a developer, go to Developer page.
- Go to Project Creation to create a project
- Go to Users page for testing