Tool Architecture
Sakai tools are modular web applications that provide specific functionality like assignments, gradebook, or forums. Tools integrate with the kernel services and are rendered within the portal framework.What is a Tool?
A tool is a user interface component that provides specific educational functionality. Tools are:- Self-contained: Each tool is a separate web application
- Service-based: Tools use kernel services for core functionality
- Portal-rendered: Tools render within the portal’s iframe or portlet containers
- Site-scoped: Tools are placed within sites and pages
Tool Interface
The coreTool interface defines the contract for all Sakai tools:
Tool Module Structure
Typical tool structure follows this pattern:Example: Assignment Tool Structure
Not all tools have separate API/implementation modules. Simple tools may only have a
tool/ module that uses existing kernel services.Tool Types
Sakai supports different types of tools based on their rendering approach:- Standard Tools
- Portlet Tools
- Helper Tools
Traditional tools that render full HTML pages within an iframe.
- Most common tool type
- Full control over HTML/CSS/JS
- Rendered via
IFrameToolRenderService
Tool Registration
Tools are registered in the system through configuration files that define:- Tool ID (unique identifier)
- Title and description
- Categories and keywords
- Required permissions
- Configuration properties
Tool Order Configuration
The system maintains a default tool ordering: Reference: kernel/component-manager/src/main/bundle/org/sakaiproject/config/toolOrder.xmlTool Integration with Kernel Services
Tools should use kernel services for all core functionality:Tool Placement
A placement is an instance of a tool within a site page. The same tool can be placed multiple times with different configurations.Portal URL Patterns
Tools can be accessed through various portal URL patterns:Standard Tool Access
Direct Tool Access
Bypass site navigation and go directly to a tool:/portal/directtool/sakai.samigo?sakai.site=e4a2b1db-f452-4ef0-8aee-b4bdde701c8c/portal/directtool/sakai.rsf.evaluation?sakai.site=~
Tool Development Frameworks
Sakai supports multiple frameworks for tool development:Spring MVC + Thymeleaf (Recommended)
Spring MVC + Thymeleaf (Recommended)
Preferred for new development
- Modern Spring MVC controllers
- Thymeleaf templating
- RESTful endpoints
- Clean separation of concerns
Web Components + Lit
Web Components + Lit
Strategic direction for frontend
- Encapsulated, reusable components
- Shadow DOM for style isolation
- Modern JavaScript (ES2022+)
- Integration with existing tools
JSF 2.3
JSF 2.3
Used in many existing tools
- Component-based framework
- Still supported but not recommended for new tools
Wicket
Wicket
Component-based web framework
- Used in several tools
- Good for complex UIs
- Not recommended for new development
Best Practices
1. Use Kernel Services
✅ Correct:2. Post Events for Significant Actions
3. Internationalization
Always support i18n:4. Accessibility
Follow accessibility best practices:- Semantic HTML
- ARIA labels where needed
- Keyboard navigation
- Screen reader support
5. Responsive Design
Use Bootstrap 5.2 for responsive layouts:Tool Helper Pattern
Tools can use helper tools for specific functionality:HELPER_DONE_URL.
Reference: kernel/api/src/main/java/org/sakaiproject/tool/api/Tool.java:56
Next Steps
Architecture Overview
Understand the overall system architecture
Kernel Services
Learn about available kernel services
Sites & Workspaces
Understand how tools are organized in sites