How dlhsoftteam/angular-kanban works
Project Type and Purpose
• This project is an AngularJS component library that provides a Kanban board directive (ds-kanban-board) for building kanban interfaces, with an additional demo that integrates a Gantt Chart.
• The README clarifies that it serves both as a reusable UI component (for AngularJS applications) and as a demonstration on how to integrate Kanban functionality, including event callbacks (such as onEditingItem and onItemStateChanged).
File Structure
• Notice the “Kanban.Library” folder that contains two main directories:
• Kanban.Angular.Components: Contains the core Kanban board source files (HTML, CSS, JavaScript/TypeScript, templates, and Angular scripts).
• Kanban.Angular.GanttChartIntegrationSample: Contains a sample project demonstrating how to integrate the Kanban board with Gantt chart functionality.
• The project files include configuration files (csproj, packages.config, web.config) and build scripts, which point to a .NET-based project setup possibly used for packaging or demo hosting.
• The file tree indicates that the components and demos are organized in separate folders, emphasizing a reusability and modular design approach.
Main Components
• Angular-Kanban Library – Core Component:
• Contains the ds-kanban-board directive.
• Includes HTML templates (for board, group, item, state) and styling (CSS and possibly JavaScript files for interaction).
• Provides dependency injection points through attributes (items, groups, states, assignableResources) and callback functions (onAddingNewItem, onEditingItem, onItemStateChanged).
• Angular-Kanban Gantt Chart Integration Sample:
• A specialized demo application that shows how the Kanban component can be integrated alongside a Gantt Chart.
• Contains additional scripts to manage data and UI for Gantt charts.
• External Dependencies:
• AngularJS framework (referenced by the inclusion of angular.js and angular-mocks.js in both components).
• Other potential third-party libraries as indicated by NuGet, Bower, and Node installation scripts.
Relationships and Interactions
• The ds-kanban-board directive interacts with the data models for items, groups, states, and resources.
• Callbacks (e.g., onEditingItem) provide a hook between user actions on the Kanban board and the business logic implemented in the hosting application.
• The sample project (Gantt Chart integration) demonstrates interactivity between two distinct UI components – the Kanban board and Gantt chart – which might exchange data or synchronize state changes.
• Data flows from Angular controllers to the Kanban directive which then renders the UI via its underlying templates (HTML files).
Architectural Patterns and Design Principles
• Component-Based Architecture: The Kanban board is built as a self-contained AngularJS directive that encapsulates its templates, styling, and behavior.
• Separation of Concerns: Presentation (HTML/CSS) is separated from business logic (event callbacks and TypeScript code).
• Modular Organization: By keeping the library and sample applications in separate directories, the project highlights both the reusable library and how to integrate it in consumer applications.