@breadstone/ziegel-platform-presentation
v0.0.9
Published
Includes the most important services for a better handling of the application.
Readme
@breadstone/ziegel-platform-presentation
Platform-level presentation services for the ziegel framework. Provides view models, presentation patterns, and UI coordination services for enterprise applications.
Platform Presentation: Enterprise presentation patterns with view models, coordinators, and platform-level UI services.
🚀 Overview
@breadstone/ziegel-platform-presentation provides:
- View Models: MVVM pattern implementation with data binding
- Presentation Services: Platform services for UI coordination
- View Coordinators: Navigation and view lifecycle management
- Data Binding: Two-way data binding for reactive UIs
- Command Patterns: UI command handling and routing
- Validation Integration: Form validation and error handling
📦 Installation
npm install @breadstone/ziegel-platform-presentation
# or
yarn add @breadstone/ziegel-platform-presentation🧩 Features & Usage Examples
View Models
import { ViewModelBase, bindable } from '@breadstone/ziegel-platform-presentation';
class UserViewModel extends ViewModelBase {
@bindable name: string = '';
@bindable email: string = '';
async save() {
// Save logic
}
}Presentation Coordinators
import { PresentationCoordinator } from '@breadstone/ziegel-platform-presentation';
class UserCoordinator extends PresentationCoordinator {
async showUserDetails(userId: string) {
const viewModel = new UserViewModel();
await this.presentView('user-details', viewModel);
}
}Command Handling
import { CommandHandler, ICommand } from '@breadstone/ziegel-platform-presentation';
class SaveUserCommand implements ICommand {
constructor(public user: User) {}
}
class SaveUserHandler extends CommandHandler<SaveUserCommand> {
async handle(command: SaveUserCommand) {
// Handle save operation
}
}📚 Package import points
import {
// View Models
ViewModelBase,
bindable,
// Coordinators
PresentationCoordinator,
// Commands
CommandHandler,
ICommand,
// Services
PresentationService
} from '@breadstone/ziegel-platform-presentation';📚 API Documentation
For detailed API documentation, visit: API Docs
Related Packages
- @breadstone/ziegel-platform: Core platform services
- @breadstone/ziegel-presentation: Base presentation utilities
- @breadstone/ziegel-core: Foundation utilities
License
MIT
Issues
Please report bugs and feature requests in the Issue Tracker
Part of the ziegel Enterprise TypeScript Framework
