β οΈ This blog post was created with the assistance of AI.
π What is an Application Shell?
An application shell is the foundation of your Uniface application. Think of it as the container that holds and runs your Windows or character-based applications. π It's essentially the starting point where your application comes to life!
You can also create customized application shells for servers, making them quite flexible for different deployment scenarios.
β Prerequisites
Before you start, make sure you have:
- Created a project in Uniface to contain your application definitions
- Access to the Uniface IDE
π οΈ Step-by-Step Guide
Step 1: Open Your Project π
In the U-Bar (Uniface's navigation bar), click Browse, select prj
, and choose the project you want to work with.
Step 2: Create the Application Shell π¨
Go to the Templates tab in the Resource Browser. Here you'll find different templates for various types of application shells:
- Windows application shells πͺ
- Character-based application shells π»
- Application server shells π₯οΈ
Simply drag and drop the template you need onto your project object in the Structure view. Easy, right? π
Step 3: Open the Application Shell Editor βοΈ
Right-click your newly created application shell and click Open. This launches the Application Shell Editor where the magic happens!
You'll notice a Shell Type property that shows what kind of shell you're working with. This property is important because it determines which other properties and triggers you can edit.
Step 4: Configure Properties βοΈ
Set the properties that apply to your specific application shell. Different shell types have different configuration options.
For more advanced settings, click the More icon (β―) in the More Properties section. This opens the Define Application Shell Properties dialog where you can fine-tune everything to match your needs.
Step 5: Write Your Initialization Code π
In the script editor, you'll write ProcScript code. This code defines:
- The application environment π
- Initialization actions that run when your application starts π
Example: You might set up database connections, load configuration files, or initialize global variables here.
Step 6: Compile Your Shell π¨
Click the Compile button to compile your application shell. This converts your definitions and scripts into executable code.
If everything is set up correctly, you'll get a successful compilation message. If there are errors, the compiler will tell you what needs fixing. π
π‘ Different Shell Types
Uniface 10.4 supports several shell types:
- Windows Application Shells: For desktop applications with graphical user interfaces πΌοΈ
- Character Mode Application Shells: For text-based interfaces, useful for legacy systems or terminal applications π
- Application Server Shells: For server-side applications that handle requests from clients π
Each type has its own set of properties and triggers that you can customize based on your requirements.
π― Tips for Success
- Start simple: Begin with basic configurations and add complexity as needed
- Test early: Compile frequently to catch errors quickly π
- Use templates: The built-in templates provide a solid foundation
- Document your code: Add comments to your ProcScript for future reference π
π¬ Conclusion
Creating an application shell in Uniface 10.4 is straightforward once you understand the basic steps. Remember to choose the right template for your needs, configure the properties carefully, and write clean initialization code. With these foundations in place, your Uniface application will be ready to run! π
Happy coding! π¨βπ»π©βπ»
Top comments (0)