Skip to content

grantcopley/cbwire-examples

Repository files navigation

🚀 CBWIRE Examples

A comprehensive showcase of CBWIRE's reactive components for ColdBox applications

ColdBox CBWIRE License

DocumentationGitHubReport Bug


🎨 Screenshot

CBWIRE Examples Application

📖 Overview

CBWIRE Examples is an interactive demonstration application showcasing the full capabilities of CBWIRE, a modern reactive component framework for ColdBox applications. This repository provides hands-on examples that illustrate best practices and patterns for building dynamic, reactive user interfaces in CFML.

Whether you're new to CBWIRE or looking to master advanced techniques, these examples provide practical, real-world implementations you can learn from and adapt for your own projects.

✨ Features

This application demonstrates:

🎯 Getting Started

  • Data Properties - Managing component state and data
  • Passing Parameters - Component initialization and parameter handling
  • Actions - Event handling and method invocation
  • Computed Properties - Dynamic data derivation
  • Data Binding - Two-way data synchronization
  • JavaScript Listeners - Integration with JavaScript events
  • Query String - URL state management
  • Redirect - Navigation and routing patterns

📝 Forms

  • Text Input - Single-line text handling
  • Checkbox Input - Boolean and array selections
  • Radio Input - Exclusive option selection
  • Select Input - Dropdown menus
  • Multiselect Input - Multiple value selection
  • Submit Button - Form submission handling
  • Validation - Client and server-side validation patterns
  • File Upload - File handling and uploads
  • Modal - Dynamic modal dialogs

Template Directives

  • wire:model - Data binding directive
  • wire:click - Click event handling
  • wire:keydown - Keyboard event handling
  • wire:loading - Loading state management
  • wire:dirty - Change detection
  • wire:poll - Automatic polling
  • wire:init - Component initialization
  • Magic Actions - Special action modifiers

🔥 Advanced

  • S3 Dropdown - Cloud storage integration
  • Parse URI - URL parsing and manipulation
  • Nested Wires - Component composition
  • Headless CBWIRE - API-first patterns
  • Poll with Long Running Process - Async operation handling

🎨 Alpine.js Integration

  • Alpine x-data - Combining CBWIRE with Alpine.js

🛠️ Requirements

  • CommandBox 6.1 or higher
  • Modern web browser (Chrome, Firefox, Safari, Edge)

🚀 Quick Start

Installation

  1. Clone the repository

    git clone git@github.com:grantcopley/cbwire-examples.git
    cd cbwire-examples
  2. Install dependencies

    box install
  3. Start the server

    box server start --open

Your browser will automatically open to the application homepage once the server completes startup.

Alternative Installation

You can also use HTTPS for cloning:

git clone https://github.com/grantcopley/cbwire-examples.git

📚 Project Structure

cbwire-examples/
├── config/           # Application configuration
├── handlers/         # ColdBox event handlers
├── layouts/          # Application layouts
├── models/           # Business logic and services
├── views/            # View templates
├── wires/            # CBWIRE component examples
├── tests/            # Test specifications
└── box.json          # Dependency management

🎓 Learning Path

We recommend exploring the examples in the following order:

  1. Start with Getting Started examples to understand core concepts
  2. Progress to Forms to learn input handling and validation
  3. Explore Template Directives for advanced UI patterns
  4. Study Advanced examples for complex scenarios
  5. Review Alpine Integration for hybrid approaches

🤝 Contributing

Contributions are welcome! If you'd like to add new examples or improve existing ones:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-example)
  3. Commit your changes (git commit -m 'Add amazing example')
  4. Push to the branch (git push origin feature/amazing-example)
  5. Open a Pull Request

📖 Documentation

For comprehensive CBWIRE documentation, visit:

🐛 Issues & Support

Found a bug or have a question?

📝 License

This project is licensed under the Apache License 2.0. See the LICENSE file for details.

🙏 Acknowledgments

  • Ortus Solutions - For creating and maintaining CBWIRE and the ColdBox Platform
  • The ColdBox Community - For continuous feedback and contributions
  • Livewire - For inspiring reactive component patterns in web development

Built with ❤️ using CBWIRE and ColdBox

About

A place for all the CBWIRE examples.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •