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
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.
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