Overview
The UI Modeler is based on theIntent.Modelers.UI module, which provides:
- Visual modeling of UI components and pages
- Page layout and composition
- Navigation and routing structures
- Component hierarchies and containment
- Integration with service layer operations
- Support for various UI frameworks (Blazor, React, Angular, etc.)
Designer Configuration
The UI designer is configured with:- Designer ID:
f492faed-0665-4513-9853-5a230721786f - Designer Name: User Interface
- Order: 30 (appears after Services in the designer list)
- Type Systems: Common Types, User Interface Core Types, Common UI Components
Core Elements
Component
Components represent reusable UI elements that can be composed into pages. Properties:- Name: Component name (e.g.,
CustomerCard,ProductList) - Type: Component type (page, layout, widget)
- Child Components: Nested components
- Properties: Component properties/inputs
- Events: Component events/outputs
Page
Pages represent top-level views in your application. Properties:- Name: Page name (e.g.,
CustomerListPage,ProductDetailPage) - Route: URL route for the page
- Layout: Parent layout component
- Components: Child components on the page
Layout
Layouts define common page structures and shared UI elements. Properties:- Name: Layout name (e.g.,
MainLayout,AdminLayout) - Sections: Named sections (header, footer, sidebar, content)
- Shared Components: Components common to all pages using this layout
Navigation
Navigation elements define routing and navigation structures. Properties:- Menu Items: Navigation menu structure
- Routes: Application routing configuration
- Guards: Route guards/authorization
Container
Containers are components that hold other components. Examples:- Grids and flex containers
- Cards and panels
- Tabs and accordions
- Modal dialogs
Data-Bound Component
Components that display or interact with data from services. Properties:- Data Source: Service operation providing data
- Binding: Field mappings between data and UI
- Actions: Operations triggered by user interaction
UI Component Types
Basic Components
Provided by theBasic UI Components package:
- Text: Display text content
- Button: Interactive button elements
- Input: Text input fields
- Checkbox: Boolean input
- Radio: Single selection from options
- Dropdown/Select: Selection from list
- Image: Display images
- Link: Navigation links
Layout Components
- Container: Generic container
- Row: Horizontal layout
- Column: Vertical layout
- Grid: Grid layout system
- Card: Card container
- Panel: Panel with header/footer
Data Components
- Table: Tabular data display
- List: List of items
- Form: Data entry form
- Detail View: Single item detail display
Navigation Components
- Menu: Navigation menu
- Breadcrumb: Breadcrumb navigation
- Tabs: Tabbed interface
- Stepper: Multi-step wizard
Modeling Patterns
List-Detail Pattern
- Create a list page component
- Bind to a query operation returning a collection
- Add a table or list component
- Create a detail page component
- Add navigation from list items to detail page
- Bind detail page to a query operation returning a single item
CRUD Form Pattern
- Create a form page component
- Add input fields for each DTO property
- Bind form to create or update command
- Add validation rules
- Add submit button
- Configure success/error handling
Master-Detail Layout
- Create a page with a split layout
- Add a list component in the master section
- Add a detail component in the detail section
- Bind detail to selected item from list
Dashboard Pattern
- Create a dashboard page
- Add a grid layout
- Add card components for each widget
- Bind each card to different data sources
- Add refresh and filtering capabilities
Service Integration
The UI Modeler integrates with the Services Modeler to connect UI components to backend operations.Calling Queries
Calling Commands
Service Proxy Detection
The modeler automatically detects when service proxies are needed: Package:Intent.Modelers.UI.ServiceProxies
Auto-installed when UI components reference service operations
Metadata API
Accessing UI Models
Working with Pages
Working with Components
Designer Settings and Extensions
The UI Modeler supports extensibility through:Component Packages
Additional component libraries can be installed:- Framework-specific components (Blazor, React, Angular)
- Third-party UI component libraries
- Custom component libraries
Core Types
TheUser Interface Core Types package (444f582b-b875-4c72-9671-697b47fa367c) provides base types for all UI elements.
Web Client Integration
When building web applications, the modeler auto-detects and installs: Package:Intent.Modelers.WebClient
Version: 5.0.0-pre.0+
This adds web-specific capabilities like:
- HTTP client generation
- API proxy classes
- Authentication/authorization
Common Modeling Scenarios
Creating a List Page
- Create a new Page:
CustomerListPage - Set route:
/customers - Add a Table component
- Bind to query:
GetCustomers - Add columns for each field to display
- Add action buttons (edit, delete)
Creating a Form Page
- Create a new Page:
CreateCustomerPage - Set route:
/customers/create - Add a Form container
- Add Input components for each field:
- Name (text input)
- Email (email input)
- Phone (tel input)
- Add a Submit button
- Bind to command:
CreateCustomer - Configure navigation on success
Creating a Dashboard
- Create a new Page:
DashboardPage - Set route:
/dashboard - Add a Grid layout (e.g., 2x2)
- Add Card components in grid cells:
- Sales Summary Card → Bind to
GetSalesSummary - Recent Orders Card → Bind to
GetRecentOrders - Top Products Card → Bind to
GetTopProducts - Customer Stats Card → Bind to
GetCustomerStats
- Sales Summary Card → Bind to
Creating Responsive Layouts
- Create a Layout:
MainLayout - Add sections:
- Header (navigation bar)
- Sidebar (side menu, collapsible on mobile)
- Content (page content area)
- Footer (copyright, links)
- Configure breakpoints for responsive behavior
- Apply layout to pages
Integration with Modules
The UI Modeler integrates with:- Blazor Templates: Generate Blazor components and pages
- React Templates: Generate React components
- Angular Templates: Generate Angular components
- Routing Templates: Generate routing configurations
- State Management: Generate state management code
- Validation: Generate client-side validation
Best Practices
- Component Reusability: Create reusable components for common UI patterns
- Consistent Layouts: Define layouts for different sections of your application
- Clear Navigation: Model navigation structure explicitly
- Data Binding: Connect components to service operations early in design
- Organize by Feature: Group related pages and components together
- Responsive Design: Consider mobile and desktop layouts
- Accessibility: Use semantic component types for better accessibility
- Naming Conventions: Use clear, descriptive names for pages and components
- Separation of Concerns: Keep presentation logic in UI layer, business logic in services
Example UI Model
A typical e-commerce UI model might include:Related Resources
- Services Modeler - Define service operations for UI data binding
- Domain Modeler - Understand domain structure for UI design