Archive

Archive for November, 2009

New features for Java 7 . . . smells like Ruby

November 25th, 2009 john No comments

Here’s a blog post summarizing new features for Java 7:

http://code.joejag.com/2009/new-language-features-in-java-7/

The new features are:

  • Language support for collections (like Ruby . . . but apparently still no Hash literal — probably way too late to wedge that in)
  • Automatic resource management (like Ruby’s IO objects that yield a reference to a block . . . but looks far less general)
  • New type inference operator
  • Underscores in numeric literals (1_000_000) (like Ruby)
  • Strings in switch statements (like Ruby . . . but only for Strings, so no ‘case equals’ operator)
  • binary literals (like Ruby)
  • Simplified varargs
Categories: Ruby Tags:

Simple Form / Partial Example

November 8th, 2009 Jonathan No comments

Another completed project from the Sunday section.

This application makes use of the following:

  • form_for
  • Partials for DRYness
  • has_many :through where tables and foreign keys don’t match
  • collection_select drop downs
  • named_scope and default_scope

Click here to download the completed application.

Categories: Announcements Tags:

A “thank you” to Rails from Django

November 6th, 2009 john No comments

Interesting post from a Django-ist:

http://jacobian.org/writing/thank-you-rails/

Categories: Rails Tags:

Nice book chapter on REST

November 1st, 2009 john No comments

I think I’ve recommended this book before: Eldon Alameda’s Practical Rails Projects.

It has a sweet chapter on building a RESTful application, and shows very well how the controllers should be “rescoped” to work only on data that is appropriate. This “rescoping” is part of the requirements for Assignment 4 (requirement #5 about not letting users edit data “owned” by another user).

That chapter is a free download:

http://www.apress.com/book/view/1590597818

Categories: Announcements, Rails Tags: