This blog post was created with AI assistance
π― What is an Application Shell?
An application shell is the first object that starts when you launch a Windows or character mode application in Uniface. Think of it as the foundation of your application - it's what sets everything up and shows your first screen to users.
The application shell does three main things:
- β Initializes your application environment
- β Displays the first form component
- β Manages menus, toolbars, and panels
π₯οΈ Types of Application Shells
Uniface 10.4 supports two types of application shells for desktop applications:
1. Windows Application Shells πͺ
These shells control the appearance of your application window. You can customize things like:
- Background color or image
- Title bar text
- Window size and position
Example: You could set a company logo as the background image and customize the title bar to show "MyCompany CRM System v2.0".
2. Character Mode Application Shells π
These shells are for text-based applications. The appearance uses text colors and video attributes that you configure in configuration files. Perfect for terminal-based or legacy system interfaces.
βοΈ Common Properties
Both shell types share these properties:
- Title - The text shown in the window title bar
- Library - Contains messages, global scripts, and menus
- Menu Bar - The main menu at the top
- Pop-up Menu - Context menus that appear on right-click
- Panel - Additional UI panels
- Session Panel - User session information display
- Panel Position - Where panels appear on screen
π¬ How Application Shells Work
When your application starts, the shell follows this process:
- Initialization - The apStart trigger runs to set up the environment
- Authentication - Users can be authenticated (login)
- Display - The initial form component appears
- Message Line - A message area shows application messages
- Component Execution - Form components run with their menus and toolbars
Example: Imagine starting a customer management application. The shell's apStart trigger could check user credentials, load customer data from the database, and then display the main customer list form with a welcome message at the bottom.
π§ Application Shell Triggers
Triggers are special events that let you add custom behavior to your shell. They're useful for:
- π Setting up security and user authentication
- π Loading initial data or configuration
- π¨ Customizing the user interface
- π§Ή Cleanup operations when the app closes
π Associated Libraries
An application shell can have an associated library containing:
- π¬ Messages displayed to users
- π Global ProcScripts (reusable code)
- π Menus used throughout the application
- π Other global objects needed by multiple components
Example: You could store error messages like "Connection failed" or "Record saved successfully" in the library, making them available to all parts of your application.
π‘ Why Application Shells Matter
Application shells give you centralized control over your application's:
- Look and feel π¨
- Startup behavior π
- User experience flow π
- Global resources π¦
This makes your application easier to maintain and provides a consistent experience for users.
π Getting Started
To create an application shell in Uniface 10.4:
- Open the Uniface IDE
- Navigate to the Application Shells section
- Choose Windows or Character Mode type
- Configure properties like title, menu bar, and panels
- Add trigger code for initialization (apStart)
- Test your application to see the shell in action
β¨ Conclusion
Application shells are the backbone of Uniface desktop applications. They control how your application starts, looks, and behaves. Understanding shells helps you build professional, user-friendly applications with consistent navigation and appearance. Whether you're building modern Windows apps or maintaining legacy character mode systems, application shells give you the control you need. π
Happy coding! π»
Top comments (0)