thoughts to blog

  • Archive
  • RSS

Clever Algorithms

A FREE pdf describing 45 different artificial intelligence algorithms in Ruby. Great read!

    • #development
    • #ruby
  • 1 year ago
  • 3
  • Comments
  • Permalink
  • Share
    Tweet

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?

    • #development
    • #ruby
    • #rails
    • #thoughts
  • 2 years ago
  • 4
  • Comments
  • Permalink
  • Share
    Tweet

About

Avatar I'm a Ruby developer that loves to play with science, math, and gadgets. Previously, I was part of a startup called drop.io, acquired by Facebook. I live in Fort Worth, TX with my wife, 2 dogs, and baby boy. I'm a foodie, a gamer, and a self proclaimed scientist.

Find me on...

  • whoisjake on Forrst
  • @gooberdlx on Twitter
  • Facebook Profile
  • whoisjake on Youtube
  • whoisjake on Flickr
  • gooberdlx on Pinboard
  • whoisjake on Last.fm
  • whoisjake on Rdio
  • gooberdlx on Foursquare
  • My Skype Info
  • Linkedin Profile
  • whoisjake on github
  • Xbox Live Profile
  • RSS
  • Random
  • Archive
  • Mobile

2012 Copyright Jacob Good. Effector Theme by Carlo Franco.

Powered by Tumblr