Rails....hmmm this is fun!

So, I recently started learning Rails, through Flatiron School. It's in the back half of their curriculum and I can see why people like it. It's magical!

What I like the most so far is that it does some of the building for you. If you want a new controller, just type rails generate controller [controller name]. Bam! New controller created! In Sinatra, you had to create the file, then type in the namespace, making sure that it inherited from the Application Controller. Rails does all of that for you. If you want a new model created..... its: rails generate model [model name] and Bam! It creates the model_name.rb file as well as a rake migration for you to create the table for the model. It's incredibly time saving!

I also like how Rails separates out their controller and routes. In Sinatra, they are together and you have to write your routes in your controller file. Not a big deal. In rails, you separate them. You have a routes.rb file that you type in. It makes it easier to figure out what you need to change if you want to rename all of your routes. In your controller file, in Rails, you just type what action it is performing, as in new, edit, index, etc. Then you put your logic inside those methods and rails takes care of the rest.


A side note, as I thought I would update on how my experience at Flatiron is going. I get asked that a lot when I mention in different facebook groups that I'm attending Flatiron's online program, Learn.co.

I am really enjoying it, even though it has taken me a lot longer than I anticipated it would take to get through the program. I thought it would take me 4 months, but instead, I'm in month 7 and I'm not done yet. I have 3 projects to finish but haven't gotten to the first one in the curriculum yet. You see, the way they do everything is they have Lessons and Labs. The lessons are either written or video (sometimes both) and the labs are for practicing what you have learned. Some of the labs are easy and some are hard. By hard, I mean I have to pull up previous labs to figure out what I missed in the curriculum or just to make sure I got the syntax right. I'm still looking forward to finishing the program and can't wait until I find a job as a developer. Not sure when that will be as Learn.co is completely self paced. It's hard to gauge how long it is going to take me to finish.

Comments

Popular Posts