Clever Algorithms
A FREE pdf describing 45 different artificial intelligence algorithms in Ruby. Great read!
Rails Routes
WARNING: Geek Post
In the Rails world, you have these things called resource routes…
http://api.rubyonrails.org/classes/ActionController/Resources.html
You can define how the url gets translated into which controller and action, based on REST principles, thin controllers, and fat data models.
Image, if you will, you see this in your routes file:
This already describes a lot about your application:
- There will be a /users path
- You will have a User model
- The user has a shopping cart, many favorites, a profile, and friends. Each with their own matching model.
Granted, I could have done this too:
But like I said, it describes a lot about the application your building…
Arguably enough to be able to generate: controllers, actions, views, models, and basic functional tests… The only thing it doesn’t describe is the fields you’re collecting about each object.
So my question becomes: If Rails is all about RESTful resources, why don’t we focus on simple generation of an application based on the routes.rb file. Since the HTTP Verb and the Resource URL are important and the routes.rb describes those two, why not start there?