#99 Complex Partials

How do you handle partials which have differences depending on the action which is rendering them? Here’s three suggestions for this problem.

#99 Complex Partials

How do you handle partials which have differences depending on the action which is rendering them? Here’s three suggestions for this problem.

Highgroove Studios – Ruby on Rails Podcast

Derek Haynes and Andre Lewis on consulting and their side projects Scout and Placeshout.

Sponsor

Highgroove Studios – Ruby on Rails Podcast

Derek Haynes and Andre Lewis on consulting and their side projects Scout and Placeshout.

Sponsor

#98 Request Profiling

You can use profiling to determine where the performance bottlenecks are in specific Rails actions. Watch this episode for details.

#98 Request Profiling

You can use profiling to determine where the performance bottlenecks are in specific Rails actions. Watch this episode for details.

John Chaffee of BusyMac – Ruby on Rails Podcast

John Chaffee of BusyMac talks about how Rails helps their 2-man Mac development shop handle customer service easily. BusyMac received a MacWorld Best of Show award and recently passed the 10,000 sale mark.

Sponsor

John Chaffee of BusyMac – Ruby on Rails Podcast

John Chaffee of BusyMac talks about how Rails helps their 2-man Mac development shop handle customer service easily. BusyMac received a MacWorld Best of Show award and recently passed the 10,000 sale mark.

Sponsor

Ian Mcfarland of Pivotal Labs – Ruby on Rails Podcast

Ian Mcfarland of Pivotal Labs in San Francisco talks about their internal project management app, pair programming, and company culture.

Sponsor

Ian Mcfarland of Pivotal Labs – Ruby on Rails Podcast

Ian Mcfarland of Pivotal Labs in San Francisco talks about their internal project management app, pair programming, and company culture.

Sponsor

#97 Analyzing the Production Log

In order to improve performance of your Rails application you need to find the bottlenecks. A great starting point is your production log. In this episode you will see how to use RAWK to analyze your log file and determine which controller actions take up the most processing time.

#97 Analyzing the Production Log

In order to improve performance of your Rails application you need to find the bottlenecks. A great starting point is your production log. In this episode you will see how to use RAWK to analyze your log file and determine which controller actions take up the most processing time.

#96 Git on Rails

Git has been getting a lot of buzz lately, and for good reason. It’s an excellent SCM which in many ways is more simple and powerful than subversion. See how to set up a Rails project with Git in this episode.

#96 Git on Rails

Git has been getting a lot of buzz lately, and for good reason. It’s an excellent SCM which in many ways is more simple and powerful than subversion. See how to set up a Rails project with Git in this episode.

John Medina (Conclusion) – Ruby on Rails Podcast

We follow Part I with a discussion of the brain in relation to sleep and gender.
Somewhere, I remember a mailing list post where Why the Lucky Stiff claimed to have a dream and subsequently changed the implementation of Shoes. Does anyone have the link to that?

John Medina (Conclusion) – Ruby on Rails Podcast

We follow Part I with a discussion of the brain in relation to sleep and gender.
Somewhere, I remember a mailing list post where Why the Lucky Stiff claimed to have a dream and subsequently changed the implementation of Shoes. Does anyone have the link to that?

gemedit version 0.0.2 has been released!

A utility to view a gem’s source in your favorite editor

Changes:

0.0.2 2008-03-07

iPhone SDK – first 5 minutes.

Off course I couldn’t resist, I had to give it a try. The sdk is a whopping 2GB download and 5.6 Gb install. It installs all the developers tools, java, gcc4.2, WebObjects, the kitchen sink. Upon successful installation the system needs to be restarted.

Start XCode and select ‘New Project…’ from the File menu.
You can then select from 3 type of iPhone Applications

20080307_1_iphone_projects.gif

Let’s try the Cocoa Touch List and I name my test project TimeList.

This creates a standard XCode project:

20080307_2_XCodeProject.jpg

I clicked “Build and Go”…the application is compiled and linked after 20 seconds got an emulate iPhone with the TimeList app visible:

20080307_3_iPhoneHome.jpg

Clicking on it we get a pre-populated list of timezones which behaves just like an iPhone:

20080307_4_TimeList.jpg

Note the emulator application is called Aspen Simulator, it has a ‘Hardware’ menu that should allow to rotate the UI but that doesn’t seem to work. The emulator really feels like an iPhone, all the finger gestures can be done with the mouse and the UI behaves like an iPhone. Pretty cool.

Let’s look at the TimeListAppDelegate generated code:

//
// TimeListAppDelegate.m
// TimeList
//
// Created by Daniel Wanja on 3/7/08.
// Copyright MyCompanyName 2008. All rights reserved.
//

#import “TimeListAppDelegate.h”

@implementation TimeListAppDelegate

@synthesize window;
@synthesize tableView;

  • init {
    if (self = [super init]) {
    // Your initialization code here
    }
    return self;
    }

  • (void)applicationDidFinishLaunching:(UIApplication *)application {
    // Create window
    self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];

// Set up table view
tableView = [[UITableView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame] style:UITableViewStylePlain];
tableView.delegate = self;
tableView.dataSource = self;
// Show the window with table view
[window addSubview:tableView];
[window makeKeyAndVisible];
[tableView reloadData];
}

  • (void)dealloc {
    [tableView release];
    [window release];
    [super dealloc];
    }

  • (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
    }

  • (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return [[NSTimeZone knownTimeZoneNames] count];
    }

  • (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath withAvailableCell:(UITableViewCell *)availableCell {
    UISimpleTableViewCell *cell = nil;
    if (availableCell != nil) {
    cell = (UISimpleTableViewCell *)availableCell;
    } else {
    CGRect frame = CGRectMake(0, 0, 300, 44);
    cell = [[[UISimpleTableViewCell alloc] initWithFrame:frame] autorelease];
    }
    cell.text = [[NSTimeZone knownTimeZoneNames] objectAtIndex:[indexPath row]];
    return cell;
    }

@end

Looks like I have lots to read about before I can start changing that application. From what I can decipher once the application is initialized a UITableView is created and the delegate of the table view becomes the TimeListAppDelegate whish implements the numberOfRowsInSection and cellForRowAtIndexPath methods which uses the NSTimeZone knowTimeZonesNames as data source.

That was my first 5 minutes with the SDK. More to follow…now I have to go back to work 🙁 Next thing I will try out is the Interface Builder…stay tuned.

Enjoy!
Daniel.

#95 More on ActiveResource

See how to handle authentication and custom actions using ActiveResource in this episode.

#95 More on ActiveResource

See how to handle authentication and custom actions using ActiveResource in this episode.