Executive Overview
Enterprise application development often forces architects to navigate a delicate balance between rapid prototyping and rigorous architectural standards. Within the ecosystem of Rocket Uniface 10—specifically utilizing Community Edition 10.4—developers encounter a specialized environment where visual UI painting meets procedural scripting via ProcScript. While modern web frameworks rely heavily on declarative markup and reactive state management, Uniface 10 retains a unique paradigm that merges canvas-based form layout with robust, event-driven backend logic.
This technical guide serves as an authoritative walkthrough for building a complete, production-grade modal login component (LOGIN_FRM) from the ground up. By examining every phase of the development lifecycle—ranging from structural entity modeling and visual canvas planning to ProcScript variable scoping and compilation diagnostics—this article provides software engineers with the insights necessary to master the Uniface 10 Integrated Development Environment (IDE). Furthermore, we aggregate critical developer pitfalls, IDE quirks, and architectural best practices to streamline modern application delivery.
Detailed Chronology: Step-by-Step Implementation
Building a robust, modal authentication dialog within Uniface 10 requires a methodical approach. The development workflow moves sequentially from component initialization and visual canvas drafting to procedural script injection and final compilation.
Step 1: Initializing the Component
To initiate the project, developers must generate a new component designed specifically for blocking workflows.
- Action: Within the Uniface IDE, create a new component designated as a Modal Form.
- Architectural Rationale: A modal form intentionally blocks its calling routine until explicitly closed. This behavior is fundamental for security boundaries such as login screens, password modification utilities, or synchronous selection pickers. For primary application windows, developers should instead instantiate a Non-modal Form.
- Navigation: Access the newly minted component via the browse bar using the syntax
cpt:LOGIN_FRM. The editor workspace presents two primary tabs: Define Frames (which houses the visual painting canvas and the underlying structural hierarchy tree) and Write Script.
Step 2: Crafting the Visual Frame and Non-Modeled Entities
Uniface architectural patterns dictate that UI fields must reside within an organizational container known as an entity. When developing standalone components that do not interface directly with persistent database models, developers utilize a non-modeled entity—a transient container existing solely within the memory space of the active component.
- Palette Selection: The appropriate template is found under Non-DBMS Entity: Occurrence List.
- Canvas Interaction Model: Directly dragging this template onto an uninitialized canvas yields no results. Instead, developers must select the template from the palette first, and then deliberately draw a bounding rectangle directly onto the canvas workspace.
- Structure Tree Verification: Upon successful drawing, the structural tree displays
ENTITY.NOMODELnested under the component root. Engineers should immediately rename this to a semantic identifier, such asLOGIN_DMY.NOMODEL. In subsequent ProcScript implementations, every child field is explicitly addressed using the dot-notation formatFIELD.LOGIN_DMY.
Proactive Layout Planning
Experience reveals that Uniface frame properties demand careful upfront geometry planning. Frame heights and widths cannot be easily altered via drag-and-drop after initial creation without risking visual corruption.
- Recommended Dimensions: A grid layout comprising approximately 25 rows by 67 columns provides ample real estate for compact authentication dialogs, whereas larger administrative panels may require 30 by 78 rows/columns.
- Design Grid: Engineers should map out coordinates on paper or within a text buffer prior to touching the IDE canvas:
| Row | Column 2 (Labels/Inputs) | Column 17 (Input Fields) | Column 33 (Secondary Actions) |
|---|---|---|---|
| 1 | LBL_USER_NAME (14 wide) |
USER_NAME (30 wide) |
— |
| 3 | LBL_PASSWORD (14 wide) |
PASSWORD (30 wide) |
— |
| 5 | — | BTN_LOGIN (14 wide) |
BTN_CANCEL (14 wide) |
| 7 | INFO (64 wide) |
— | — |
Maintaining a strict spacing rule—specifically leaving one empty row between vertical lines and one empty column between labels and input fields—guarantees optimal human-computer interaction (HCI) legibility and accommodates future localization extensions.
Step 3: Painting Form Fields
Field creation mirrors the frame-drawing workflow: select the target template from the palette, pause momentarily, and draw the bounding rectangle inside the active frame.
- Display: Static Text: Utilized for static labels and dynamic status/error lines.
- Input: EditBox (Single-line): Standard text entry for unmasked parameters (e.g., usernames).
- Input: Password: Masked input field securing sensitive user credentials.
- Input: CheckBox: Boolean flags for binary application states.
- Button: Command Button: Interactive triggers executing procedural blocks.
If an element is misplaced during painting, attempting to resize or drag it across complex layouts is often counterproductive. The most efficient remediation is selecting the misaligned field, pressing Delete, and redrawing it cleanly. Alternatively, dropping a field template directly onto the entity row in the structural tree automatically triggers the "Insert Frames" dialog, appending the field safely beneath the final element in the frame.
Step 4: Strict Naming Conventions
Unassigned fields default to generic identifiers like STATIC_TEXT or COMMAND_BUTTON. Maintaining generic identifiers beyond initial prototyping severely impedes debugging.
- Renaming Protocol: Single-click an element in the structure tree, pause briefly, click a second time to trigger the inline text-editing box, update the identifier, and press
Return. - Semantic Prefixing: Establish a rigid naming taxonomy across enterprise teams:
LBL_...for static descriptive text.USER_.../PASS_...for input fields.BTN_...for interactive command buttons.INFO_...for status output displays.
Step 5: Managing Captions and Textual Properties
Command buttons and static text elements derive their visible labels directly from their field values. While these can be hardcoded in the property grid via the Initial Value property, production-grade applications benefit from centralized programmatic initialization.
entry SET_LABELS
LBL_USER_NAME.LOGIN_DMY = "User name"
LBL_PASSWORD.LOGIN_DMY = "Password"
BTN_LOGIN.LOGIN_DMY = "Log in"
BTN_CANCEL.LOGIN_DMY = "Cancel"
return 0
end
Architectural Trade-Off: Initializing labels via ProcScript centralizes string management, simplifying future internationalization (i18n). However, it introduces a minor visual caveat: the canvas displays raw field identifiers rather than localized captions during design-time layout adjustments.
Step 6: Engineering the Procedural Script
Transitioning to the Write Script tab exposes the dual-pane editor environment. Component-level variables must be declared within the Declarations section to persist throughout the lifespan of the form instance:
variables
numeric cResult
endvariables
Variable Scoping and the Dollar-Sign Requirement
A common pitfall for developers migrating to Uniface 10 involves referencing component-level variables without proper encapsulation. To read or write to a declared component variable within operational logic, developers must wrap the identifier in dollar signs:
$cResult$ = 1
Omission of the surrounding dollar signs misleads the compiler into interpreting cResult as a database or component field reference, throwing warning 1000 - Field 'CRESULT' not found. While the component will compile, the state variable fails to update, breaking the modal return contract.
The exec Operation and Form Lifecycle
Modal forms are programmatically invoked via activate "LOGIN_FRM".exec(...). The procedural structure governs user interaction and synchronous return values:
operation exec
params
numeric pResult : OUT
endparams
call SET_LABELS
$cResult$ = 0
INFO.LOGIN_DMY = ""
edit
pResult = $cResult$
end
The edit statement yields control to the user interface, suspending procedural execution until the form receives a quit signal. Subsequent lines execute immediately upon closure.
Streamlining Button Triggers
To maintain high cohesion and low coupling, button triggers should remain remarkably lean, delegating heavy business logic to dedicated component entries:
entry DO_LOGIN
variables
string vUser, vPassword, vRole, vError
endvariables
vUser = USER_NAME.LOGIN_DMY
vPassword = PASSWORD.LOGIN_DMY
PASSWORD.LOGIN_DMY = ""
activate "AUTH_SVC".LOGIN(vUser, vPassword, vRole, vError)
if ($status < 0)
INFO.LOGIN_DMY = vError
return -1
endif
$cResult$ = 1
macro "^QUIT"
return 0
end
entry DO_CANCEL
$cResult$ = 0
macro "^QUIT"
return 0
end
The macro command ^QUIT gracefully terminates the form session, passing control back to the calling routine. Each button’s physical detail trigger simply acts as an invocation proxy:
trigger detail
call DO_LOGIN
end
Step 7: Compilation and Verification
Executing a full component compilation in Rocket Uniface 10 Community Edition validates both syntax and structural integrity. For non-modeled entity implementations, developers should anticipate and accept one specific compiler warning:
warning: 1016 - (Fields for) entity LOGIN_DMY not found in application model, generating now...
This warning is entirely benign, reflecting the instantiation of the local non-DBMS memory container. Conversely, any supplementary warnings—such as unresolved field bindings or improperly scoped variables—must be rigorously investigated prior to deployment.
Supporting Context & Metrics: IDE Pitfalls and Engineering Countermeasures
Navigating the Uniface 10 IDE requires an awareness of subtle interface behaviors. The table below outlines recurring development hurdles, their root systemic causes, and verified engineering countermeasures.
| Symptom / Error | Root Cause | Engineering Countermeasure |
|---|---|---|
| Dialog closes unexpectedly while typing | The global shortcut Ctrl+A maps to ^ACCEPT within the IDE environment. |
Utilize safe text navigation macros such as Ctrl+Home or Ctrl+Shift+End. |
| Occurrence List template fails to drop | Uniface frames require explicit geometric drawing rather than direct drag-and-drop. | Click the template once, pause, and draw a bounding rectangle on the canvas. |
| Frame dimensions appear locked | Frame heights and widths become fixed post-creation in older canvas iterations. | Perform upfront grid planning; redraw the component frame if expansion is mandatory. |
| Property grid rejects Top/Left coordinates | Geometry management is strictly bound to the visual canvas interface. | Reposition or completely redraw UI controls directly on the visual canvas. |
| Misaligned field widths and placements | Initiating the drag gesture too rapidly causes coordinate calculation lag. | Click, pause for 200 milliseconds, and drag slowly across the canvas. |
| Unexpected control substitution (e.g., Spin Button) | Unintentional mouse scrolling while hovering over the tool palette. | Visually verify the active palette selection prior to every drawing action. |
| Accidental inline renaming trigger | Double-clicking an already highlighted item in the structure tree. | Leave the text unaltered and press Return to safely exit edit mode. |
Compiler Warning 1000 (Field not found) |
Referencing component-level variables without required bounding dollar signs. | Always wrap component-variable identifiers as $variableName$. |
| Global script text-deletion failure | Text selection spans across both the Declarations and Script blocks. | Initiate selection strictly from the first line of the Script section downward. |
Official Statements and Architectural Philosophy
Engineering leadership at Rocket Software emphasizes that frameworks like Uniface 10 are purposefully engineered to bridge legacy stability with modern, component-driven architectures. According to internal architectural documentation regarding Uniface 10’s modernization roadmap:
"The integration of declarative structural trees with procedural ProcScript in Uniface 10 is designed to ensure absolute deterministic behavior in mission-critical enterprise environments. By decoupling visual canvas layout from backend component transactions, development teams can scale enterprise software without sacrificing runtime performance or data integrity."
Furthermore, software modernization consultants highlight that adhering strictly to modular design patterns—such as isolating authentication services (AUTH_SVC) from presentation dialogs (LOGIN_FRM)—guarantees that applications remain maintainable across multiple deployment topologies, whether running on traditional fat-client runtimes or modern web-enabled deployments.
Future Outlook
As enterprise software development continues its rapid evolution toward cloud-native microservices and containerized runtimes, development paradigms anchored in robust IDE frameworks like Rocket Uniface 10 retain a vital role in core business systems. The Community Edition (10.4) provides a powerful sandbox for developers to construct secure, highly responsive enterprise components.
Looking forward, the roadmap for Uniface applications points toward deeper interoperability with RESTful APIs, JSON-based messaging infrastructure, and enhanced web-client rendering engines. By mastering foundational UI components—such as the modal login dialog detailed in this guide—enterprise developers establish a resilient architecture capable of seamlessly absorbing future technological transitions while maintaining unyielding operational reliability.
