-
Notifications
You must be signed in to change notification settings - Fork 499
Description
The Showoff codebase has outgrown its monolithic roots. It's time to redesign from the ground up. I plan to do this in several stages, so that we can iteratively build a solid new architecture but keep disruptions as minimal as possible.
Ping @gepandz for collaboration. Comments on this issue are invited.
We'll work in a "parallel" codebase, starting with only core features and porting things one at a time. This allows us to release and update both lines simultaneously and select at runtime.
I also plan on abstracting out optional subfeatures, with both server side plugins to the Ruby based compiler/server and viewer side as javascript plugins.
During the development of Showoff-ng, access to the new codebase will be gated by either a feature flag or by a small CLI wrapper utility. Initially, we'll do a bug-for-bug port, and then will start to improve the language as well*. We'll favor refactoring rather than writing new. As we generate each class/method, the unit/integration tests will be written before the implementation. (that shouldn't need to be said, but testability is one of the drivers for this, so I want to make sure that's the first thing we think of.)
Decisions to be made:
- Can we replace the js slide library while we're at it?
- Are we ready to revamp the web side as well? Maybe @marrero984 wants to get involved again.
- Let's take another look at markdown library support. Does it really make sense to continue to support everything under the sun?
- At minimum, let's consider switching to commonmarker by default
- Should we start the language redesign from the beginning too, rather than carrying it forward bug-for-bug?
Stage 1:
- Design the first iteration of the architecture
- Expected Ruby classes:
Showoff::ConfigShowoff::CompilerShowoff::Compiler::<components> # things like the forms generator, etcShowoff::PresentationShowoff::SlideShowoff::Server # just the webserverShowoff::Transport # the websockets control protocol
- Expected Ruby classes:
- Design the first iteration of the API
- VERSIONED!
- Should the presentation continue to be a single-page app, or should each slide be lazy loaded on demand? It would be easy enough for the server to support both.
- Should the forms be ported to use the standard websocket transport like everything else, or should most things be ported back to a RESTful API?
- Build the compiler
- This will be a command line tool that implements
showoff static - It just reads the presentation source and generates HTML on disk
- This will be a command line tool that implements
- Build the barebones webserver
- This will only serve the presentation. It will not include interactivity to begin with.
- Build the protocol transport layer
- This could probably use a better name!
- This does the interaction, like page following and presence detection
Stage 2:
- Design and build the development toolkit
- validate, info, new slide, new presentation, etc
- Design and build the publisher framework
- Build the presentation and publish to:
- GitHub pages
- Heroku
- ios/android mobile app
- Docker instance
- zip/tarball
- other?
- Build the presentation and publish to:
Stage 3:
- Feature parity and exhaustive testing
- Design language improvements
- if we do this right, it allows us to take better advantage of renderer features
- Merge codebases and release next-gen