Space Kitty Released!
This article was originally published on January 11, 2016 on The Capsule Cat Blog. For archive purposes, we moved it here!
Space Kitty is a Command Line Tool for Meteor with some bold opinions on how to structure your app. My goal with Space Kitty is to make developers lives easier by making common tasks very simple to do and providing the scaffolding to tackle harder tasks.
Space Kitty boils down to a Command Line Interface that let’s you generate projects, views, commands, collections, migrations, and more using simple commands.
Example of using it from the command line:
- npm install -g space-kitty
- kitty create MyApp
- kitty make:view Navigation
- kitty make:view Todo List
- kitty make:view Todo Item
- kitty make:migration PopulateTodoItems
What is Space Kitty?
Space Kitty is a NPM package that provides the
kitty command in the terminal. You can use Space Kitty to create a new project for you with scaffolding, packages, and some views all wired up for you, and you can also use it to create new views, commands, collections, methods, schemas, and more.
The approach with Space Kitty is to make it so that developers can get all of that boring scaffolding code out of the way. It does this by making some opinions on how Meteor software should be written. By default, it comes with React, SCSS, FlowRouter, Percolate Migrations, and a few other packages. It also takes the approach that React should have Data Containers, and that BEM SCSS should be used with React (we will make another blog post explaining this opinion in particular).
You don’t necessarily need to follow all of these opinions when using Space Kitty (for instance, you can turn the SCSS code generation off). But when you do follow these opinions, Space Kitty makes it very simple to accomplish common tasks.
What are the core opinions and principles that Space Kitty attempts to maintain?
1 Prototyping Should Be Easy
Meteor already makes prototyping easy, but Space Kitty aims to make it a little easier. The first way it makes your life easier is that when you make a new project, it will add core, commonly accepted packages, create a route file, generate a React view for you, wire up the app for you, and generate some folder scaffolding for you. You don’t have to think about what packages are being used, or how to organize your files. Space Kitty takes care of that for you.
2 Stop Writing Scaffolding
Space Kitty originally stemmed from me writing the same React scaffolding over and over again. I wrote a little tool to generate it for me. Every time I wrote the same thing twice (schemas, collections, views, route file), I threw it into the tool. It got to the point where I figured the tool could be used by the community and decided to make it an opinionated approach to Meteor.
3 Everything Should Be Testable
Space Kitty takes the approach that every line of code your write should be as testable as possible. Whether you end up actually writing tests or not is up to you, but when a new feature will be added to Space Kitty, the design approach is to make it testable. That is why Space Kitty also tries to implement and stay to date with the Meteor Guide and Mantra.
Why All the Opinions?
I come from a PHP world where I experienced a lot of the pains that are also plaguing Meteor. NPM vs Atmosphere? Well, PHP had PEAR vs Composer. Blaze vs React? The PHP community argues over Handlebars vs Blade vs Twig vs w/e other templating system.
In the PHP community, one thing I really liked was the work Taylor Otwell, creator of Laravel, was doing. Instead of arguing what tool was better, he just took the approach that tools should help developers. They should make the developers feel like they have super powers. The way he did this was he would take un-opinionated software, like gulp, and add some opinions on top of it to make it simplier to do common tasks, and throw it out there for the community to use.
He gets a lot of backlash for the approach, but developers actually use his software. And that is mainly because when you use it and adhere to his opinions, his opinions give you super powers. I hope that Space Kitty can take a similar approach with Meteor: slap some opinions on it and make developer’s lives easier.
Thanks for reading! If you liked this article, feel free to follow us on Twitter.