Skip to content

2.0.0

Latest
Compare
Choose a tag to compare
@jyoungblood jyoungblood released this 01 Oct 20:12

THE BITCH IS BACK

I'd given up on this toolkit for a while. I figured it was time to focus on other projects and spend some time in other ecosystems. I learned a lot, made new friends, got tons of new ideas, but never found QUITE the right set of tools for my ideal workflow.

No matter what I was doing, my mind just kept coming back to STEREO. I'm completely obsessed with the idea of this toolkit and literally can't stop thinking about it...so I've decided to return with version 2.0!

It's really amazing how much the world has changed since I started putting this thing together way back in 2010. Things that were immensely difficult at the time are trivially easy these days. And PHP is apparently cool now? Fronted tech has evolved to the point where I can reliably get what I want from the libraries without much frustration, and the same goes for build tooling.

As chaotic as it seems at times, we're in the halcyon days of web development. I'm truly thankful for the years and years of hard work invested in developing the underlying frameworks, libraries, and utilities by people who are A LOT smarter than me.

And I'm thankful that any of us can use this knowledge freely and largely without restriction for our own purposes.

What a great time to be alive. I love open source <3

Lots of big changes in this version, too many to list here, but these are the highlights:

  • Now built on Slim!

  • Now using Blade templates with the wonderful BladeOne library. Views are cacheable now, too.

  • Also using TailwindCSS and Alpine.js

  • We've got our own rendering package now...it's the classic stereo render_template() functionality designed to work with Slim's response interface.

  • Un-bundled all the old abstraction utilities (db, cookie, request, etc) into their own external libraries. They're now the VPHP packages. The same functionality is still available, but the syntax is a little more modernized. Check their readmes for more info:

  • Wired in $_ENV variables with phpdotenv, shoutouts to Vance!

  • Added middleware and a DI container, pretty easy to implement thanks to Slim.

  • New & improved application architecture:

    • Implemented "front controller" pattern, all public assets are in a "public" directory (which is set as web root on deployment)
    • Settings.php is there but it's different now (part of the container)
    • No more "controllers" directory, all the backend structure is in the "app" directory, and most custom logic goes (initially) in the "routes" directory.
    • Oh btw the routes are automatically included, just add a file in the "routes" directory and it works. No need to link anything. Incredible.
    • I need to write a blog post or something about this...I've put a lot of thought into it and really want to go in-depth about how this is supposed to work and how I arrived at these conclusions. Some of it seems very counter-intuitive but I promise it makes sense.
  • Added a couple scripts for facilitating local development workflows (a long-time dream of mine)

    • You can run composer start to run just the PHP server or npm run dev to run the PHP server and the Tailwind watcher script concurrently. NICE!
    • Planning on adding Vite in the future, so the build process will change but the npm run dev interface will stay the same.
  • And my favorite part: really nice error templates!

    • A general purpose template and a dedicated 404 version. The general template gives detailed errors and stack traces in the local dev environment, but just shows simple error codes and names in production.
    • They're both entirely customizable 👍
    • And they look really nice by default 👍 👍

A special word of thanks to the authors of the libraries we're no longer using, especially: jQuery, Tachyons, Alto Router, and mustache.php / handlebars.php. We had a lot of fun and made a lot of money over the years. Couldn't have done it without you.

Thanks for watching, I hope you enjoy version 2.0! I'm really excited about this project and I've got some cool plans for the future.

Stick around and see what develops!