Note: This blog post was created with the assistance of AI. β¨
What is an Application Shell? π
An application shell in Uniface 10.4 is like the outer wrapper of your application. Think of it as the container that holds everything together and controls how your application starts, runs, and behaves. It's the foundation that initializes and runs your Windows applications, character-based programs, or application servers.
Types of Application Shells π¦
Uniface supports three main types of application shells, each designed for different purposes:
1. Windows Shell π₯οΈ
This type defines how your desktop application looks and behaves. It controls:
- The appearance of the application window
- How form components are displayed
- Menu behavior
- Panel layouts
Example: The Uniface IDE itself runs in a Windows shell called ide.aps
, and the Uniface Debugger uses udbg.aps
.
2. Character Mode Shell π
For applications that run in text-based environments (like terminal or console applications), this shell defines:
- The layout of the character-based interface
- How the application behaves in text mode
3. Server Shell π
This shell defines how an application server works. It can replace the default Uniface Server with your own custom server implementation.
Example: The Uniface Server starts using userver.aps
.
What Can You Do with Application Shells? π οΈ
Application shells provide special properties and triggers that let you code specific behaviors, such as:
- Setting up the environment - Configure your application before it starts running
- User authentication - Control who can access your application
- Executing components - Manage how different parts of your application run
- Cleanup operations - Perform tasks when the application shuts down
How Application Shells Work βοΈ
When you compile an application shell in Uniface, it creates a runtime shell file with the extension .aps
(Application Shell).
Simple workflow:
- You design your application shell in Uniface
- Uniface compiles it during the build process
- A runtime file with
.aps
extension is generated - This file is used to start and run your application
Real-World Example π‘
Let's say you're building a desktop application for inventory management. You would:
- Create a Windows shell to define your main application window
- Set up authentication triggers to verify users before they access the system
- Define initialization code to connect to your database
- Add cleanup code to properly close connections when users exit
After compilation, Uniface creates a .aps
file (for example, inventory.aps
) that you can use to launch your complete application.
Key Takeaways π―
- Application shells are the foundation of every Uniface application
- Three types exist: Windows, Character Mode, and Server shells
- They compile into
.aps
files that run your application - They give you control over startup, authentication, and shutdown processes
- Even Uniface's own tools (IDE, Debugger, Server) run using application shells
Conclusion π
Application shells are a powerful feature in Uniface 10.4 that give you complete control over how your applications initialize, run, and shut down. Whether you're building desktop applications, server applications, or character-based systems, understanding application shells is essential for creating robust Uniface applications.
Happy coding! π¨βπ»π©βπ»
Top comments (0)