Skip to content

mrigsby/CatchingWire

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Catching 🔥 Wire

An Introduction to CBWire 4

Description of Session from IntoTheBox 2025:

We are continually bombarded with the latest and greatest new (or at least new to us) “thing” and constantly told we should integrate this or that right away! Keeping up with new technologies, modules, libraries, etc. can be a full-time job in itself.

In this session we will explore one of the “things” you may have heard tossed around, CBWire! We will go a little deeper than a typical “Elevator Pitch” and discuss what CBWire is, what it can do, and end with a live coding demonstration of how easy it is to integrate into an existing ColdBox application while building our first wire. We will end with a Q & A and hopefully gain a few more CBWire fans!

This repository contains the CBWire demos used for this presentation and more.

Setup of Demo

1. Environment Variables

Copy .env.example to .env in the root of the repository

There are not any environment variables that need to be changed when copying .env.example to .env, However there are a few optional values you might want to modify. Setting the DEMO_USER_* values will allow ColdBox to reset the primary demo user on every appinit

# Demo User (ID=1) Info (will be reset on appinit. Remove or set to blank to disable)
DEMO_USER_EMAIL=you@example.com
DEMO_USER_PASSWORD=password
DEMO_USER_FIRST_NAME=Jonathon 
DEMO_USER_LAST_NAME=Deauxville
DEMO_USER_TITLE=Baron

2. Start CommandBox and install ColdBox dependencies

Four commands to get going! Start CommandBox in the root of the repository, change into the wwwroot folder, install dependencies, and fire up the server!

box
cd wwwroot
install
server start

Troubleshooting Tips

  • If the server is having trouble finding the SQLite Database or JDBC driver when started up, you can put the absolute path for:
    • SQLite Database: DB_PATH environment variable in .env replacing the relative path of ./DB/catchingWire.db (Note: If you change the .env file make sure to restart commandbox to refresh the environment variables)
    • jars folder: server.json setting app.libDirs replacing the relative path of ./DB/jars/

Features of the demo

Side Note: this is a basic stack I like to start with on projects to get jump started and add or remove from there.

Other Stuff

JDBC SQLite Driver

Demo uses the sqlite-jdbc driver found here and is automatically added to the classpath of the server in the server.json configuration

SQLite Tools

A very useful, simple, and free tool for Mac users to interact directly with the SQLite DB is DB Browser for SQLite

Other Links and Resources

Great for all things CBWire

Fabulous examples of a multitude of CBWIRE features

CBWire uses Livewire.js and is essentially the CF port of Livewire. Once I was more familiar with CBWire it became easier to look through the livewire documentation and corelate the PHP parts to CBWIRE counterparts.

Livewire includes alpine.js out of the box and adds some great features when your ready to dive into it deeper

I have to give a shout out to Gary Stanton, the create of ColdThumbs. I don't know him but I love ColdThumbs. I have used this module many times and it is extremely helpful. I use it to create and cache thumbnail images on the fly. If you want to see it in action copy your profile image to /wwwroot/includes/images/profiles/1.jpg and reload the page.

used for all the code syntax highlighting at the bottom of each CBWire demo page.

The open source admin dashboard & control panel theme used in this demo

Acknowledgments

Grant Copley, for all his hard work on CBWire.

Caleb Porzio, the creator of Livewire, Alpine.js and more.

Ortus Solutions, the creators of all things BOX!

About

Catching Wire Demos

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages