33 Folgen

Your Playbook for Ruby on Rails

Rails Coach DevChat.tv

    • Technologie

Your Playbook for Ruby on Rails

    Reboot

    Reboot

    Today, just a quick message outlining the future of Rails Coach.

    • 2 Min.
    032 RC CoffeeScript

    032 RC CoffeeScript

    CoffeeScript is a language written by Jeremy Ashkenas that compiles to Javascript. Its syntax is much more friendly than native JavaScript. Especially if you're used to languages like Ruby or Python.

    As or Rails 3.1, CoffeeScript is available by default and a coffeescript file is created in /app/assets/javascripts every time you run the scaffold generator.

    A few of my favorite features of the language are:

    I can ignore parenthesis (mostly), semi-colons, and curly braces
    Function notation
    Objects with nested notation
    Variable safety (not creating globals)
    Splats on lists
    Classes
    Always returns last expression
    String interpolation

    I don't like:

    Operator aliases

    Resources:

    CoffeeScript Webpage
    CoffeeScript Cookbook
    CoffeeScript Basics (video)
    CoffeeScript: The Cool Parts (video)

    • 7 Min.
    031 RC Generators

    031 RC Generators

    A generator is a way of creating code from the command line. Rails has several of these built in, including generators for models, controllers, tests, helpers, scaffold (models, views, and controllers that support Rails' RESTful routing), and much more.

    Generators are actually relatively simple. They are made up of two parts. The generator itself, and the generator's templates. In the Ruby on Rails source code there's an assets generator and the javascript template and stylesheet templates it uses.

    I've also created a model generator for my Sandra ORM. You can find it here.

    Understanding how models work, you can see how simple it is for the Rails Core Team to build in generators for other things like models, controllers, helpers, tests, assets, mailers, etc.

    To see the full list of generators available in a Rails application run `rails generate` or `rails g`.

    To create your own generators in your project, put them under /lib/generators or better yet, use the generator for generators like this: `rails generate generator widget` and you'll get a widget generator all set up for you in the /lib/generators folder that's ready for you to customize.

    • 5 Min.
    030 RC NoSQL

    030 RC NoSQL

    NoSQL is a terrible term for a collection of widely varied databases. You have key-value stores like Redis, Tokyo Cabinet, Memcached, etc. You also have document databases like couchDB and mongoDB. Finally you have column based systems like Cassandra. And still others like HBase.

    In a lot of cases, there are gems for these. I've used several of them such as the gems for managing Cassandra, couchDB, and mongoDB.

    • 9 Min.
    028 RC Backbone.js

    028 RC Backbone.js

    I've been using Backbone.js for a few weeks and really like the way it helps you manage your data on the client side. It's also a terrific way to keep your UI in sync when your data changes through Javascript events.

    • 7 Min.
    029 RC Ruby-doc.org

    029 RC Ruby-doc.org

    One of the most handy websites out there for people trying to find specific API's in Ruby is ruby-doc.org.

    From the main page, you can search or select your Ruby version.

    From the core page, you can narrow down the class or method you're looking for.

    From the std-lib page, you can read docs and see where different aspects of the programming language are implemented.

    On each class' page, you can find the specific functionality you need in the menu on the left.

    • 7 Min.

Top‑Podcasts in Technologie

Zuhörer haben auch Folgendes abonniert:

Mehr von DevChat.tv