DEV Community

Peter + AI
Peter + AI

Posted on

πŸš€ How to Create a New Component in Uniface 10.4: A Step-by-Step Guide

πŸ“ This blog post was created with AI assistance based on Uniface 10.4 documentation.

Creating components in Uniface 10.4 is easier than you might think! Whether you're building forms, services, or reports, the process is straightforward once you understand the basics. Let me walk you through it! πŸ’»

πŸ“‹ What You Need Before Starting

Before creating your first component, make sure you have a project set up in Uniface. Think of a project as a container that holds all your application definitions. Without it, you won't be able to create any components.

🎯 Types of Components You Can Create

Uniface 10.4 offers several component templates to choose from:

  • Form Component πŸ“± - For user interfaces
  • Service Component βš™οΈ - For business logic
  • Report Component πŸ“Š - For generating reports
  • Dynamic Server Page 🌐 - For web pages with dynamic content
  • Static Server Page πŸ“„ - For static web pages
  • Entity Service πŸ—„οΈ - For database operations

πŸ”§ Step-by-Step: Creating Your Component

Step 1: Open Your Project

First, open the project where you want to add your new component in the Project Editor.

Step 2: Choose Your Template

In the Resource Browser, find the template for the component type you need. For example, if you're building a user interface, select the Form component template.

Step 3: Drag and Drop ✨

Simply drag the template from the Resource Browser and drop it onto your project in the Project Structure Editor. Uniface will create a new component with a temporary name automatically.

Step 4: Give It a Name

Click on the temporary name and type in a meaningful name for your component. Press Enter to confirm. Choose names that clearly describe what the component does!

πŸ’‘ Example: Instead of naming a form "Form1", use something descriptive like "CustomerOrderForm" or "ProductSearchForm".

Step 5: Open and Configure

Right-click your new component and select "Open". It will open in its own tab where you can start working on it.

Step 6: Set Properties 🎨

In the Properties Inspector, you'll see various settings for your component. These properties control how your component behaves. For example:

  • Memory management - How the component uses system resources
  • Library usage - Which runtime libraries to use
  • Update permissions - Whether users can modify data (for forms)

Don't worry if this seems overwhelming at first! You can start with the default settings and adjust them later as you learn more about what your component needs.

🎬 What Comes Next?

After creating your component, the next steps depend on the type:

  • For Services, Dynamic Server Pages, and Static Server Pages: Define the component structure - this is where you specify what data and logic your component will use.
  • For Forms and Reports: Define both the structure and layout - you'll arrange how things look and work for your users.

πŸ’‘ Pro Tips

  • Always use clear, descriptive names for your components πŸ“
  • Start with default properties and customize later as needed πŸ”„
  • Keep related components in the same project for better organization πŸ“
  • Test each component as you build it - don't wait until everything is done! βœ…

πŸŽ“ Common Beginner Mistakes to Avoid

  • Forgetting to create a project first
  • Using generic names like "Component1" or "Form2"
  • Not saving your work regularly
  • Trying to configure too many properties at once

πŸŽ‰ Conclusion

Creating components in Uniface 10.4 is a fundamental skill that becomes second nature with practice. The drag-and-drop approach makes it quick and intuitive, while the flexible property system gives you the power to customize behavior as needed.

Start simple, learn the basics, and gradually explore more advanced features as you become comfortable with the process. Happy coding! πŸš€


Have questions about Uniface components? Drop them in the comments below! πŸ‘‡

Top comments (0)