Going through the Agile Web Development with Rails 4 book.
I'll log my thoughts as I go.
The first few chapters of this book gave a simple introduction to ruby and a quick look into rails and what it can do. I wrote about my thoughts on these chapters in a short post found over here: http://garrypolley.com/post/84381936563.
So far I am actually very impressed with the idea of convention over configuration. The book starts you off with a simple app called Depot. The goal for this app is to have buyers and sellers get and sell items. Right off the bat the power of rails was/is shown with some simple commands that created all the models, views, and controllers needed for the "products" that would be bought and sold. This somewhat small feature, is awesome. It made the normal mundane part of app creation super easy and simple. All that was needed was to actually style the page. Sane defaults is what Rails is built on and thus far I like it a lot.
Validation is a feature of almost every framework. Thus far I like how validation works with Rails. It doesn't seem too different than most other things I have worked with. However, I do really like the added 'negatives' to aide with readability in testing, (e.g. assert product.invalid?). So far I do miss some of the parenthesis I had in Python land. I think it adds to readability of code. However, it seems Ruby programmers do not use them, so I'll write Ruby without them 😦.
For the most part this chapter is fairly straight forward. You create a controller and view to display the products from the pervious chapters. The cool part is the ease of creating the controllers. I really like how easy it so to just do rails generate controller Store index. That small command generated all the boiler plate needed for getting a single list display of products. Just added the products to the page, and some HTML + CSS and it worked. Coolest bit learned here is that Rails really is helping reduce the work needed to create a workflow, which is huge for me. Coming from a Django background, that almost all has to be manually done. There is no nice command to create the boilerplate that most MVCs require for new pages.
The other cool part from this chapter is the introduction to some of the test helpers. I'm not sure how I feel about the assert_select, but it would be nice for making sure no one breaks your main page or template layouts. I am conflicted though because I despise selenium testing, so markup based tests don't set well with me.
Overall the last few chapters have shown me it's really easy and fast to get simple apps up and running with Rails. The concept of convention over configuration is making a lot more sense to me now. I find the ease of creating new workflows great. Couple that with the nice syntax additions of Rails and Ruby tests, when compared to Python, and I'm starting to like Rails a bit more than I used to like it.
This chapter showed some of the convention over configuration at work. As of right now the way rails handles sessions and how those sessions wire to controllers seems a bit too magical and forced at the same time. I like that it's easy to have a concern that helps manage session objects. However, I do not like that I have to give the effort to specify the objects I'll modify in session. This is a nice feature for easily seeing what's going on though, so the value add to readability may be worth the manual effort. The standard boilerplate that pops out is still really awesome for getting stuff done quickly. rails generate scaffold Cart and rails generate scaffold LineItems # some more options is awesome. Makes it so much easier than I'm used to for creating the relationships and default controllers/views I know I want anyway. Hopefully this book covers session management and how rails does it in more depth later.
Overall still very happy with this Rails exploration. Excited to see what else this book holds.