a few new apps
I always lag behind Jon when it comes to trying out build tools or frameworks that are supposed to make my programming life easier. He tells me about cool new things he’s using, and I say “yeah, that looks cool, but I just want to be productive, so I’ll do things they way I’ve been doing them.” Then eventually I get a chance and I try out the cool thing and Jon was right, it’s totally great. That happened for me recently with Yeoman and Bower.
We do these knowledge bombs at work where we’ll give short presentations weekly to each other, sharing knowledge about our nerdy passions. We’ve had talks about using Git effectively, the e-pub format, how nonprofits operate, and how to test someone’s app by breaking it, to name a few. I gave one this past week about my new-found love for Yeoman and Bower, and I’ve put it up online for you to view: Create a New App Faster with Yeoman + Bower. It introduces Yeoman and Bower if you’re like me and you’re new to them.
What led me to finally try them was this tutorial by Jason Swett about setting up a Ruby on Rails API with an AngularJS front end. I used his approach to create the ridiculous evaluatjon.com (source code on Github), which started as a joke but then I bought the domain name and then I couldn’t just sit on it, so the app was born. The app lets you rate Jon in different dimensions using a ten-star rating system, as well as provide a comment explaining your rating.
After evaluatjon was done so quickly and with very little frustration setting things up, I created Palette Producer (source code on Github) because I had found PleaseJS and Random Color and wanted to use them. Again I used Yeoman and Bower to set it up. The app lets you generate pretty colors and copy their hex and RGB codes, as well as create color palettes and save them to ColourLovers. Palette Producer is simpler than evaluatjon in that it doesn’t have any server-side component, other than the dinky Rack server necessary to host it on Heroku. It’s a client-side app written with AngularJS.
Finally came SeasonSound, an AngularJS app with a Sinatra server. The app lets you grab your Last.fm scrobbling history by year and season, then turn that history into playlists. You can save the playlists on Spotify and Rdio, or download them in CSV or JSON format. I originally wanted to support Google Music and allow you to save your playlists there, but there’s no official Google Music API and I couldn’t hack something together using OAuth. I got OAuth working and granting permission to manage the user’s Google Music library, but then couldn’t successfully authenticate with any JSON AJAX requests using the OAuth access token. So Google Music support may have to wait until there’s an official, public API.
So in a week’s time, I made evaluatjon and Palette Producer, then over a weekend I made SeasonSound. I developed things quickly because I already knew AngularJS, sure, but getting started was much faster because of Yeoman and its generators. Commands like yo angular:service my_new_service --coffee
make it feel like I’m in a Rails app with its excellent rails generate
commands. Yeoman also produces a magical Gruntfile that compiles and minifies and watches and JSHints and tests and it’s beautiful. Bower made it easier for me to try out CSS and JavaScript libraries. bower install whatever --save
, try it out in the browser because Bower and Grunt already included the necessary files in my HTML for me, decide I don’t want the library after all, and it’s just a bower uninstall whatever --save
away from being removed from my project again. Super simple.