Jason Thomas

I like to make stuff

January 16, 2016 @ 18:48

Diving in the deep end with Ruby on Rails

Now it turns out I'm going to learn Rails.

I have never really had any interest in using this framework until a friend gave me a crash course recently.

There is just so much you get for free in Rails, he said.

This is a big deal for a project I/we're doing.

The project is a database for refugee-friendly doctors, to help refugees in Sydney find doctors.

It has a range of other benefits, including teaching people to learn English. But the main benefit is to find where appropriate medical services are.

A run-down on the whole shebang is on DevPost

Originally I was planning to run the app on the client side. But, it makes more sense now to do the heavy lifting server side and send static pages to the client.

The prototype I made was good enough to pitch at the hackathon, and is currently here (I can't promise it will stay here).

The horrors of learning new frameworks

To learn Rails, I'm going to learn Ruby first.

I've just had some shockingly-bad experiences trying to learn frameworks without having learned the underlying languages first.

This happened when I tried to learn d3. Nearly lost interest before I decided to give JS a proper go. I did that on CodeAcademy. That's just a cracker website too, if you want to encourage people to learn to code, send them there.

The second bad experience trying to learn the framework before the language was with BeautifulSoup.

I wanted to scrape a website, but didn't understand much Python. That ended the same way, learning Python and then having success with scraping.

I'm not making that mistake again.

Rails - what is it?

Rails is a framework that works on the server-side. It's (in one way) similar to Flask in that it creates html on the back end to send to the front end.

I've written more on Flask - read about that here

Flask is actually really different in a lot of ways.

Flask is a micro framework, where you don't get much for free, but you can install python libs to help you out.

Rails, however, comes with a lot of things I need. Thanks Rails.

We already know that my app for refugees to find doctors is going to need a lot of different features.

So, it makes sense to use something that just does that stuff for us.

There is not as much configuration required with Rails, and the mantra is convention over configuration. Do things the Rails way.

Another benefit is Sydney has a big community of Rails developers, so I'm hoping I can get some help if I ask really nice.

Anyway, that's enough for one day, I'll come back with some thoughts when I've learned some Ruby, then some Rails.

JourneyBegins

log in