Entries RSS Comments RSS

Archive for the ‘jquery’ Category

Sinatra: The answer to my Ruby GUI problem

Monday, November 9th, 2009

Ruby and GUI’s have been on the forefront of my brain lately because I’ve been playing around with fun ways to program with Ruby. I am honestly bored of command line programs, and for good reason: the command line isn’t pretty enough for me. Since I’ve had problems installing Shoes and Hackety Hack on my version of Ubuntu, I asked one of my friends who uses Ruby frequently if there were other GUI options. There are options, but he referred to them as a bit of a mess to implement and pointed out that javascript and the web make for better uses of, what I would call, “fun Ruby.” Better yet, when you program for the web, everyone can use your program without worrying about what platform they are on.

So, I gave this a little thought. I started getting jealous and even a little frustrated at Python programmers and their connectedness with GUI’s and their pride in Python’s support for GUI’s. Apparently, Ruby has similar support, but it’s not nearly as widely embraced amongst Rubyists as it is in the Python community. (True? False? opinions?) Admittedly, I think I should have just learned visual basic and got my GUI fix 10 years ago. (I don’t particularly want to learn Python, and there are issues with it’s syntax that have turned me off pretty heavily.)

So, I have decided that the best course of action, given my new fixation on Sinatra, is to begin a jquery/javascript and Ruby project. Although I’ve been making websites for about 10 years, they have generally been informative, usually static, very low level applications of HTML, CSS, and bits and pieces of PHP. I have used javascript for fun little menus now and again, but honestly I’m a total copy/paster when it comes to js. I started recently on some javascript tutorials, but was then quickly reprimanded: SKIP TO JQUERY, says everyone. Unless you really wanna become a pro in javascript, it sounds like jquery is a nice shortcut to the overwhelming syntax (especially coming from Ruby!) and implementations of javascript. I can’t quite figure out a consistency of why and how something does what in javascript. But, if I can figure out what I want the code to do, I’m pretty sure I can figure out how to use jquery to get the job done. We’ll see.

I am going to begin working on a blog that is purely in javascript, using jquery, and also uses Sinatra. I’m going to use sqlite for the DB. Did I mention I have very little experience with DB’s, too? :) Okay, this project, honestly, seems a little over my head to me right now. But once complete, I think I will have experience with all of these pieces I need to make a pretty, fun, and useful application. Something every programmer craves– right?! :)

Updates to follow. Thanks to Julio for helping me come up with the idea on how to practice messing with all of the components I’m craving: Ruby, Sinatra, Javascript/Jquery, Sqlite, ERB, CSS… wee! This brings up another point about how multilingual and implementation exposure at the early stages of learning a programming language can be so incredibly integral to understanding how to best utilize a programming language like Ruby… but that’s for another post! Cheers!