<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" xml:lang="en-US">
  <title>Salesforce on Rails - All</title>
  <id>tag:salesforceonrails.com,2009:mephisto/</id>
  <generator version="0.8.0" uri="http://mephistoblog.com">Mephisto Drax</generator>
  
  <link href="http://salesforceonrails.com/" rel="alternate" type="text/html" />
  <updated>2009-03-16T20:16:53Z</updated>
  <link rel="self" href="http://feeds.feedburner.com/salesforceonrails" type="application/atom+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><entry xml:base="http://salesforceonrails.com/">
    <author>
      <name>Luigi Montanez</name>
    </author>
    <id>tag:salesforceonrails.com,2009-02-12:3207</id>
    <published>2009-02-12T05:32:00Z</published>
    <updated>2009-03-16T20:16:53Z</updated>
    <category term="Ruby" />
    <category term="passenger" />
    <category term="vmware" />
    <link href="http://feedproxy.google.com/~r/salesforceonrails/~3/9CuUw_h8nL0/accessing-passenger-sites-from-a-windows-vista-instance-in-vmware-fusion" rel="alternate" type="text/html" />
    <title>Accessing Passenger sites from a Windows Vista instance in VMware Fusion</title>
<content type="html">
            &lt;p&gt;This &lt;a href="http://www.robbyonrails.com/articles/2009/02/11/switch-to-passenger-mod_rails-in-development-on-osx-in-less-than-7-minutes-or-your-money-back"&gt;article by Robby Russell&lt;/a&gt; reminded me of a hopefully helpful post I’ve been meaning to write for a while. The problem is straightforward: You’ve got &lt;a href="http://modrails.com"&gt;Phusion Passenger&lt;/a&gt; set up on your Mac &lt;span class="caps"&gt;OS X&lt;/span&gt; Leopard (see Robby’s post for details). Your client called, and they say the site you just launched for them looks funky in Internet Explorer. Fun. So now, you want to access your local Passenger site living at &lt;a href="http://myapp.local"&gt;http://myapp.local&lt;/a&gt; from the copy of Windows Vista living in your &lt;a href="http://www.vmware.com/products/fusion/"&gt;VMware Fusion&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;There are two things you need to do in order to access your Passenger sites from Windows Vista via VMware Fusion:&lt;/p&gt;


	&lt;ol&gt;
	&lt;li&gt;Figure out what Vista thinks is your Mac’s IP address&lt;/li&gt;
		&lt;li&gt;Create entries in Vista’s /etc/hosts file (yes, Vista actually has one)&lt;/li&gt;
	&lt;/ol&gt;


	&lt;p&gt;So fire up VMware and Vista, and let’s begin:&lt;/p&gt;


	&lt;h3&gt;Determine Vista’s Gateway IP&lt;/h3&gt;


	&lt;p&gt;When running VMware Fusion, the virtualized OS (in our case Vista) refers to the host system (Mac &lt;span class="caps"&gt;OS X&lt;/span&gt; Leopard) as its IP Gateway and its &lt;span class="caps"&gt;DNS&lt;/span&gt;. So you want to figure out what that IP address is, and you’ll be able to access the Apache server running in Leopard. Determine the IP with the following steps:&lt;/p&gt;


	&lt;ol&gt;
	&lt;li&gt;Open the Control Panel, switch to Classic View, open Network and Sharing Center.&lt;/li&gt;
		&lt;li&gt;Click on Manage Network Connections in the sidebar.&lt;/li&gt;
		&lt;li&gt;Double click on the Local Area Connection, and click on the Details button.&lt;/li&gt;
		&lt;li&gt;Make note of the IPv4 Default Gateway – that’s your ticket to accessing your Passenger sites.&lt;/li&gt;
	&lt;/ol&gt;


	&lt;p&gt;&lt;a href="http://skitch.com/luigi/brc94/finding-the-gateway"&gt;&lt;img src="http://img.skitch.com/20090212-b55errgiwu63xx5ugkq49qxdga.preview.jpg" alt="Finding the Gateway" /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;h3&gt;Edit Vista’s /etc/hosts file&lt;/h3&gt;


	&lt;p&gt;I discovered this &lt;a href="http://maximumpcguides.com/windows-vista/edit-the-windows-vista-hosts-file/"&gt;handy link&lt;/a&gt;, which tells you all you want to know about Vista’s hosts file. In short, it works pretty much the same as any Unix /etc/hosts file. I followed the instructions to set up a shortcut on my Vista Desktop for quick access, and the screenshot of the Properties dialog for that shortcut is below:&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://skitch.com/luigi/brc9i/editing-the-hosts-file"&gt;&lt;img src="http://img.skitch.com/20090212-8m5129pifiqubdy94t1pn25b99.preview.jpg" alt="Editing the hosts file" /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;Now, just edit the file, creating an entry for each Passenger site:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;172.16.160.2 site1.local
172.16.160.2 site2.local
172.16.160.2 site3.local&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;With the file saved, you should be able to access your Passenger sites from a browser in Vista (no restart of anything needed).&lt;/p&gt;


	&lt;h3&gt;Multiple IEs&lt;/h3&gt;


	&lt;p&gt;Now for a bit of a bonus, I highly recommend installing &lt;a href="http://www.my-debugbar.com/wiki/IETester/HomePage"&gt;IETester&lt;/a&gt; in Vista. &lt;span class="caps"&gt;IE8&lt;/span&gt; beta 2, &lt;span class="caps"&gt;IE7&lt;/span&gt;, IE6 and &lt;span class="caps"&gt;IE5&lt;/span&gt;.5 will be at your fingertips.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;Find this helpful?&lt;/strong&gt; Please consider recommending me on &lt;a href="http://www.workingwithrails.com/person/13437-luigi-montanez"&gt;Working with Rails&lt;/a&gt;.&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/salesforceonrails/~4/9CuUw_h8nL0" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://salesforceonrails.com/2009/accessing-passenger-sites-from-a-windows-vista-instance-in-vmware-fusion</feedburner:origLink></entry>
  <entry xml:base="http://salesforceonrails.com/">
    <author>
      <name>Luigi Montanez</name>
    </author>
    <id>tag:salesforceonrails.com,2008-10-28:2545</id>
    <published>2008-10-28T00:20:00Z</published>
    <updated>2008-10-28T00:25:17Z</updated>
    <category term="Ruby" />
    <link href="http://feedproxy.google.com/~r/salesforceonrails/~3/jH63_bop1dg/announcing-merb-day-atlanta" rel="alternate" type="text/html" />
    <title>Announcing Merb Day Atlanta</title>
<content type="html">
            &lt;p&gt;It’s been a while since I last posted here (four months to be exact), but I wanted to share the news on a conference I’ve been organizing, &lt;a href="http://atlanta.merbday.com"&gt;Merb Day Atlanta&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;Registration has finally opened (much to my relief), and it should be a great event for Ruby developers looking to dive into the next great thing. Registration is a mere $65, and you’ll be learning from the best: &lt;a href="http://atlanta.merbday.com"&gt;Merb Day Atlanta&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;I don’t really do much Salesforce work these days, and doubt I will in the future, so I have an idea for a new blog. Less about specific technologies, more about the craftsmanship of software development. Stay tuned…&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/salesforceonrails/~4/jH63_bop1dg" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://salesforceonrails.com/2008/announcing-merb-day-atlanta</feedburner:origLink></entry>
  <entry xml:base="http://salesforceonrails.com/">
    <author>
      <name>Luigi Montanez</name>
    </author>
    <id>tag:salesforceonrails.com,2008-06-26:2210</id>
    <published>2008-06-26T15:32:00Z</published>
    <updated>2009-03-16T20:17:08Z</updated>
    <category term="Salesforce" />
    <category term="force.com ide" />
    <category term="metadata api" />
    <link href="http://feedproxy.google.com/~r/salesforceonrails/~3/1UFjEBtsfCY/custom-fields-on-standard-objects-in-the-force-com-ide" rel="alternate" type="text/html" />
    <title>Custom Fields on Standard Objects in the Force.com IDE</title>
<content type="html">
            &lt;p&gt;Browsing through the Force.com Discussion Boards while playing with the &lt;a href="http://wiki.apexdevnet.com/index.php/Force.com_IDE_Release_Notes#Summer_.2708_Developer_Preview"&gt;new version&lt;/a&gt; of the Force.com &lt;span class="caps"&gt;IDE&lt;/span&gt; (released June 19), the ever helpful JonP &lt;a href="http://community.salesforce.com/sforce/board/message?board.id=apex&amp;amp;#38;view=by_date_ascending&amp;amp;#38;message.id=5758#M5758"&gt;explained exactly how&lt;/a&gt; to generate a .object file on standard objects.&lt;/p&gt;


	&lt;p&gt;Fire up Eclipse, and in your Force.com project open up src/unpackaged/package.xml. Find the &lt;span class="caps"&gt;XML&lt;/span&gt; element with the name of “CustomObject” and add in some new subelements with the value of the standard object. It should look like this:&lt;/p&gt;



&lt;pre&gt;&lt;code&gt;&amp;lt;types&amp;gt;
    &amp;lt;members&amp;gt;*&amp;lt;/members&amp;gt;
    &amp;lt;name&amp;gt;CustomObject&amp;lt;/name&amp;gt;
    &amp;lt;members&amp;gt;Contact&amp;lt;/members&amp;gt;
    &amp;lt;members&amp;gt;Account&amp;lt;/members&amp;gt;
&amp;lt;/types&amp;gt;&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;Then, run the “Refresh from Server” functionality by right-clicking on src/objects and accessing the Force.com menu. Your standard objects should then appear.&lt;/p&gt;


	&lt;p&gt;Alternatively, if you’re paranoid about too many custom fields being editable (and quickly erasable) in the &lt;span class="caps"&gt;IDE&lt;/span&gt;, you can stick in an entirely new types element named CustomField that looks like this:&lt;/p&gt;



&lt;pre&gt;&lt;code&gt;&amp;lt;types&amp;gt;
    &amp;lt;members&amp;gt;Opportunity.SomeCustomField__c&amp;lt;/members&amp;gt;
    &amp;lt;name&amp;gt;CustomField&amp;lt;/name&amp;gt;
&amp;lt;/types&amp;gt;&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;Now, you’re able to use the power and speed of the &lt;span class="caps"&gt;IDE&lt;/span&gt; to create, edit, and deploy custom fields on your standard objects. It’s a great productivity win. A big thanks to JonP for explaining all this.&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/salesforceonrails/~4/1UFjEBtsfCY" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://salesforceonrails.com/2008/custom-fields-on-standard-objects-in-the-force-com-ide</feedburner:origLink></entry>
  <entry xml:base="http://salesforceonrails.com/">
    <author>
      <name>Luigi Montanez</name>
    </author>
    <id>tag:salesforceonrails.com,2008-06-20:2203</id>
    <published>2008-06-20T04:31:00Z</published>
    <updated>2009-03-16T20:17:24Z</updated>
    <category term="Ruby" />
    <category term="deployment" />
    <category term="virtualization" />
    <link href="http://feedproxy.google.com/~r/salesforceonrails/~3/AcrvXI-zWxc/engine-yard-express-a-production-slice-on-your-macbook-pro" rel="alternate" type="text/html" />
    <title>Engine Yard Express: A Production Slice on Your MacBook Pro</title>
<content type="html">
            &lt;p&gt;While computing moves more and more to the cloud, it’s interesting that Ruby web development best practices tend to go in the opposite direction, toward the workstation right in front of you. Running a local web server via ‘script/server’ (or my preferred method of ‘thin start’), hosting &lt;a href="http://salesforceonrails.com/2008/running-a-local-gem-documentation-server-on-mac-os-x"&gt;gem documentation locally&lt;/a&gt;, and using local git branches are all win/win practices because they’re far more efficient, and frankly, let you do some bonehead moves without your co-workers ever having to know.&lt;/p&gt;


	&lt;p&gt;So maybe deployments should be practiced locally as well. &lt;a href="http://brainspl.at/articles/2008/06/06/engine-yard-express"&gt;Ezra Z.&lt;/a&gt; has announced &lt;a href="http://express.engineyard.com/"&gt;Engine Yard Express&lt;/a&gt;, a VMware image that’s essentially an &lt;a href="http://engineyard.com"&gt;Engine Yard&lt;/a&gt; production slice. The idea is that you run the image via virtualization software on your workstation, so that you can get all the benefits of a virtual server without having to actually connect to one through the Tubes.&lt;/p&gt;


	&lt;p&gt;Yes, this really rocks. You’ll be able practice deployments on the plane!&lt;/p&gt;


	&lt;p&gt;So first, you’ll need to buy &lt;a href="http://www.vmware.com/products/fusion/"&gt;VMware Fusion&lt;/a&gt; for your Mac. I first purchased Parallels over a year ago, but VMware clearly kicks its ass. Clearly. It actually runs Windows without making the rest of your system unusable.&lt;/p&gt;


	&lt;p&gt;Next, &lt;a href="http://express.engineyard.com/"&gt;download the image&lt;/a&gt; and double-click on it. Before you even realize what happened, you’ll be presented with a ready, fully-functional slice just waiting for you like an obedient dog:&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://www.flickr.com/photos/luigimontanez/2558712685/" title="EY Express 0.1.1 by Luigi Montanez, on Flickr"&gt;&lt;img src="http://farm4.static.flickr.com/3170/2558712685_a426c59419.jpg" height="347" alt="EY Express 0.1.1" width="500" /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;You’ve been pleasantly provided with randomly generated passwords for the root and express users, and you’re even given the IP address it’s chosen.&lt;/p&gt;


	&lt;p&gt;Let’s create an alias for that address so we don’t have to memorize it. Open up /etc/hosts in your favorite text editor (requires sudo permission) and stick something like this in there:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;192.168.233.128 express.local&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Now, you should probably just leave your VMware window alone. Instead you’ll want to &lt;span class="caps"&gt;SSH&lt;/span&gt; into the slice as if you were logging into a remote server:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;$ ssh express@express.local&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Nice! A quick visit to &lt;a href="http://express.local:81"&gt;http://express.local:81&lt;/a&gt; gives you your Merb start page.&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://www.flickr.com/photos/luigimontanez/2559574162/" title="EY Express Merb by Luigi Montanez, on Flickr"&gt;&lt;img src="http://farm4.static.flickr.com/3153/2559574162_db7db125f3.jpg" height="500" alt="EY Express Merb" width="409" /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;Now, in your Capistrano scripts, you can use ‘express.local’ as the domain of your servers, and you’ll be able to practice deployments without ever connecting to a remote server. Bom chicka wa waa!&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/salesforceonrails/~4/AcrvXI-zWxc" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://salesforceonrails.com/2008/engine-yard-express-a-production-slice-on-your-macbook-pro</feedburner:origLink></entry>
  <entry xml:base="http://salesforceonrails.com/">
    <author>
      <name>Luigi Montanez</name>
    </author>
    <id>tag:salesforceonrails.com,2008-06-11:2184</id>
    <published>2008-06-11T03:49:00Z</published>
    <updated>2009-03-16T20:17:36Z</updated>
    <category term="Ruby" />
    <category term="gems" />
    <category term="rdoc" />
    <link href="http://feedproxy.google.com/~r/salesforceonrails/~3/hhD1GjnX_To/running-a-local-gem-documentation-server-on-mac-os-x" rel="alternate" type="text/html" />
    <title>Running a local gem documentation server on Mac OS X</title>
<content type="html">
            &lt;p&gt;When I first started playing around with Ruby on Rails, one of the things that struck me was how development was done completely locally. Instead of uploading or synchronizing your source code to a remote web server, you simply fired up a Ruby web server process on your local machine, and the development process seemed to flow more smoothly.&lt;/p&gt;


	&lt;p&gt;In that same vein, documentation for Ruby gems can be annoying to hunt down. You have to go to the gem’s web site, and hope that RDoc exists somewhere. Or, you can navigate to your gem’s local install directory and poke around in there. Too much work, and it could break your flow. Not anymore:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;$ gem server&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Now, just visit &lt;a href="http://localhost:8808"&gt;http://localhost:8808&lt;/a&gt;, and you’re good to go. That easy!&lt;/p&gt;


	&lt;p&gt;Also, you may find yourself missing RDoc on updated gems, so make sure to do this when it bothers you:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;$ sudo gem rdoc [--all|gem_name]&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Now, it would be great if the server just started automatically on boot up, with no need for a command line directive. In Mac &lt;span class="caps"&gt;OS X&lt;/span&gt; Leopard, the preferred way is to use &lt;a href="http://developer.apple.com/macosx/launchd.html"&gt;launchd/launchctl&lt;/a&gt;, which is about as obvious to the uninitiated as the rules of Cricket. Luckily, there’s &lt;a href="http://lingon.sourceforge.net/"&gt;Lingon&lt;/a&gt;, which wraps all that ugly &lt;span class="caps"&gt;XML&lt;/span&gt; in a nice &lt;span class="caps"&gt;GUI&lt;/span&gt;. Make a new entry that looks like this:&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://www.flickr.com/photos/luigimontanez/2569726390/" title="Lingon Gem Server by Luigi Montanez, on Flickr"&gt;&lt;img src="http://farm4.static.flickr.com/3002/2569726390_846e749a4b_o.png" height="632" alt="Lingon Gem Server" width="547" /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;Note the full path to the gem command, which I needed for the launch command to work. And that’s it. Full documentation to all your locally installed gems, available whenever you need them.&lt;/p&gt;


	&lt;p&gt;Special thanks to &lt;a href="http://www.danielfischer.com/2008/05/23/view-rdocs-for-all-local-gems-gem-server-to-the-rescue/"&gt;Daniel Fischer&lt;/a&gt; for the ‘gem server’ tip, and &lt;a href="http://workingwithrails.com/person/7942-brandon-beacher"&gt;Brandon Beacher&lt;/a&gt; for the tip on Lingon.&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/salesforceonrails/~4/hhD1GjnX_To" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://salesforceonrails.com/2008/running-a-local-gem-documentation-server-on-mac-os-x</feedburner:origLink></entry>
  <entry xml:base="http://salesforceonrails.com/">
    <author>
      <name>Luigi Montanez</name>
    </author>
    <id>tag:salesforceonrails.com,2008-05-08:2138</id>
    <published>2008-05-08T02:57:00Z</published>
    <updated>2008-05-12T15:48:55Z</updated>
    <category term="Salesforce" />
    <category term="visualforce" />
    <link href="http://feedproxy.google.com/~r/salesforceonrails/~3/bLMurCf4DcU/breaking-visualforce-to-be-released-in-june" rel="alternate" type="text/html" />
    <title>BREAKING: Visualforce to be released in June</title>
<content type="html">
            &lt;p&gt;Pardon the ridiculous headline, but I figured this was my one chance to use it.&lt;/p&gt;


	&lt;p&gt;At Dreamforce Europe today, the big announcement is that Visualforce is finally going to be generally available in Salesforce.com with the Summer ‘08 release.&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://www.flickr.com/photos/luigimontanez/2475284988/" title="Visualforce Launch by Luigi Montanez, on Flickr"&gt;&lt;img src="http://farm4.static.flickr.com/3265/2475284988_b649f7381a_o.png" height="122" alt="Visualforce Launch" width="558" /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;If you haven’t yet done so, register for the &lt;a href="http://wiki.apexdevnet.com/events/visualforce/registration.php"&gt;Developer Preview here&lt;/a&gt;.&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/salesforceonrails/~4/bLMurCf4DcU" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://salesforceonrails.com/2008/breaking-visualforce-to-be-released-in-june</feedburner:origLink></entry>
  <entry xml:base="http://salesforceonrails.com/">
    <author>
      <name>Luigi Montanez</name>
    </author>
    <id>tag:salesforceonrails.com,2008-04-26:1393</id>
    <published>2008-04-26T22:00:00Z</published>
    <updated>2008-04-26T22:08:50Z</updated>
    <category term="Salesforce" />
    <category term="apex" />
    <category term="guides" />
    <category term="visualforce" />
    <link href="http://feedproxy.google.com/~r/salesforceonrails/~3/3t-1jTTN0PE/essential-force-com-resources" rel="alternate" type="text/html" />
    <title>Essential Force.com Resources</title>
<content type="html">
            &lt;p&gt;Because the Force.com developer community is still very small, it’s important to make the most out of what Salesforce.com (the company) provides for us on the Web. The best site for all things Force.com is of course &lt;a href="http://developer.force.com"&gt;developer.force.com&lt;/a&gt;, with its invaluable &lt;a href="https://wiki.apexdevnet.com/index.php/Wiki"&gt;Wiki&lt;/a&gt; and &lt;a href="http://community.salesforce.com/sforce?category.id=developers"&gt;Discussion Boards&lt;/a&gt;. But sometimes dead-tree versions of knowledge can be helpful too.&lt;/p&gt;


	&lt;h3&gt;Ebooks&lt;/h3&gt;


	&lt;p&gt;&lt;span class="caps"&gt;SFDC&lt;/span&gt; has made available two free books, one is an introduction to the platfom and the other is a recipe-style book. If you’ve been to a Force.com event recently, chances are you received these as actual, bound books. Here are the &lt;span class="caps"&gt;PDF&lt;/span&gt; ebooks:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://wiki.apexdevnet.com/index.php/Creating_On-Demand_Applications:_An_Introduction_to_the_Force.com_Platform"&gt;Introduction to the Force.com Platform&lt;/a&gt; – Really a beginner’s guide, this book takes you on a feature tour of the Force.com platform, and goes over both administrative/declarative features as well as the more programmatic Apex and Visualforce capabilities.&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://wiki.apexdevnet.com/index.php/Members:Platform_Cookbook"&gt;Force.com Cookbook&lt;/a&gt; – I find myself flipping through this problem/solution recipe book often. It’s very helpful at producing those “Ah! So that’s how I’m supposed to do it!” moments.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h3&gt;The APIs&lt;/h3&gt;


	&lt;p&gt;The Force.com Application Programmer Interfaces (APIs) allow us developers to integrate our Salesforce instances with external web services, as well build in some powerful customization into those instances. I don’t print these out, but rather just keep the PDFs quickly accessible for fast keyword searching:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://www.salesforce.com/us/developer/docs/api/apex_api.pdf"&gt;Apex Web Services &lt;span class="caps"&gt;API&lt;/span&gt;&lt;/a&gt; – Covers the &lt;span class="caps"&gt;SOAP API&lt;/span&gt; in all its glory. I personally wish this was &lt;span class="caps"&gt;REST&lt;/span&gt;, but &lt;span class="caps"&gt;SOAP&lt;/span&gt; is better than everything but &lt;span class="caps"&gt;REST&lt;/span&gt;.&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.salesforce.com/us/developer/docs/api_meta/api_meta.pdf"&gt;Apex Metadata &lt;span class="caps"&gt;API&lt;/span&gt;&lt;/a&gt; – A newer &lt;span class="caps"&gt;API&lt;/span&gt;, the Metadata &lt;span class="caps"&gt;API&lt;/span&gt; allows us to define the structure (fields and relationships) of our custom objects via &lt;span class="caps"&gt;XML&lt;/span&gt; rather than via the declarative point-and-click interface. Unfortunately there’s no Metadata &lt;span class="caps"&gt;API&lt;/span&gt; available for standard objects (Contacts, Accounts, Opportunities) yet, but I expect that to change this year.&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.salesforce.com/us/developer/docs/ajax/apex_ajax.pdf"&gt;Apex &lt;span class="caps"&gt;AJAX&lt;/span&gt; Toolkit &lt;span class="caps"&gt;API&lt;/span&gt;&lt;/a&gt; – The &lt;span class="caps"&gt;AJAX&lt;/span&gt; Toolkit is primarily used with S-Controls, which are being phased out in favor of Visualforce. To be honest, the &lt;span class="caps"&gt;AJAX&lt;/span&gt; Toolkit has always seemed like a workaround hack to me, and hopefully the combination of Visualforce and Apex Code will render it obsolete.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h3&gt;The Developer Guides&lt;/h3&gt;


	&lt;p&gt;These are must-prints. As more thorough extensions to the ebooks above, these guides are the definitive resources for developing with Apex and Visualforce.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://www.salesforce.com/us/developer/docs/apexcode/salesforce_apex_language_reference.pdf"&gt;Apex Developer’s Guide&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.salesforce.com/us/developer/docs/pages/salesforce_pages_developers_guide.pdf"&gt;Visualforce Developer’s Guide&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h3&gt;Frequent Updates&lt;/h3&gt;


	&lt;p&gt;Both the APIs and Developer Guides are updated with every release (Spring, Summer, Winter), so make sure to grab the newest versions when you see your org being updated, and please do recycle the old versions if you print them out.&lt;/p&gt;


	&lt;p&gt;I suggest bookmarking this post, so you can quickly access these PDFs instead of browsing through the developer.force.com Wiki. Enjoy!&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/salesforceonrails/~4/3t-1jTTN0PE" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://salesforceonrails.com/2008/essential-force-com-resources</feedburner:origLink></entry>
  <entry xml:base="http://salesforceonrails.com/">
    <author>
      <name>Luigi Montanez</name>
    </author>
    <id>tag:salesforceonrails.com,2008-04-23:37</id>
    <published>2008-04-23T04:29:00Z</published>
    <updated>2008-04-23T04:30:20Z</updated>
    <category term="Salesforce" />
    <category term="apex" />
    <category term="cloud computing" />
    <category term="visualforce" />
    <link href="http://feedproxy.google.com/~r/salesforceonrails/~3/vQu42Tso0TY/tour-de-force-atlanta-recap" rel="alternate" type="text/html" />
    <title>Tour de Force Atlanta Recap</title>
<content type="html">
            &lt;p&gt;Two weeks ago, Salesforce.com’s &lt;a href="http://tour.force.com"&gt;Tour de Force&lt;/a&gt; rolled into Atlanta, the first stop in a multi-city tour. While I’m terribly late in producing the following recap, I’m sure you’ll find it in your heart to forgive me:&lt;/p&gt;


	&lt;h3&gt;The Opening Keynote&lt;/h3&gt;


	&lt;p&gt;The event was held at a hotel in downtown Atlanta, and the Expo area was packed when I got there about thirty minutes before the keynote was to begin. I’m continually amazed at how well-attended Salesforce events tend to be. Maybe it comes from never working in the enterprise, but I couldn’t believe how many people flew in from around the country to attend Dreamforce last September, and I was equally surprised at the turnout in Atlanta.&lt;/p&gt;


	&lt;p&gt;The keynote started at 10:00 AM sharp, and Polly Sumner, President of the Platform, was the first speaker. She spoke for what seemed to be over an hour, in what was a general overview of Salesforce.com and Force.com. As a developer, I got a bit antsy during her talk because it was completely review to me and I find Salesforce.com’s marketing slickness to be offputting, but I know that they had many potential customers in the audience.&lt;/p&gt;


	&lt;p&gt;After Sumner’s opening presentation, she invited up to the stage several partners to display impressive applications they’ve been working on. I won’t bore you with the details, but overall the demos were very impressive, many showing off the power of VisualForce. Then, an &lt;span class="caps"&gt;SFDC&lt;/span&gt; employee did a “Build an App in 15 Minutes” run through, which once again was review to me. It was at this time, sitting there for about 90 minutes, that I wished we had time for a break, and I assume others in the audience were suffering through it like I was.&lt;/p&gt;


	&lt;p&gt;Lastly, Nick Carr, the author of “The Big Switch”, came on and did a great talk on cloud computing. Carr even mentioned that he knew many in the audience were uncomfortable sitting there for so long, so he promised to go through the talk quickly. That was unfortunate, as he had some great things to say, and I really wished he could have gone on longer. His central thesis is that bandwidth and computing power is becoming a utility that we tap into on demand much like electricity or water has been. He made a compelling case, and I look forward to reading his book. By the time he was finished, the audience was sitting for over two hours, and we were, how to say, quite relieved to have a break.&lt;/p&gt;


	&lt;h3&gt;Developers’ Track: Apex Code Deep Dive and VisualForce Preview&lt;/h3&gt;


	&lt;p&gt;There were three tracks available for the afternoon session:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;Admins, Managers, and Analysts&lt;/li&gt;
		&lt;li&gt;Developers&lt;/li&gt;
		&lt;li&gt;Entrepeneurs and Vendors&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Upon entering the room for the Developers track, I was surprised at how few people were there. While I would estimate that 300 people were in the room for the morning keynote, only 25 or so were attending these Developers sessions. I’m not sure how many people were in the other two tracks, but the lower number more closely aligned with my expectations of how many Force.com developers are actually in the Atlanta area.&lt;/p&gt;


	&lt;p&gt;The first 75 minute session focused on Apex. It was largely a language overview with a little bit of demo, and it had some stuff for both newbies and more experienced Force.com developers. My ears perked up at the end, when upcoming features were discussed:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;Dynamic Apex&lt;/strong&gt; – Apex that acts more like the Partner &lt;span class="caps"&gt;WSDL&lt;/span&gt; for the &lt;span class="caps"&gt;SOAP API&lt;/span&gt;. It’s more loosely typed, and includes metadata methods.&lt;/li&gt;
		&lt;li&gt;&lt;strong&gt;Asynchronous Apex&lt;/strong&gt; – Asynchronous is actually a misnomer, as the more appropriate term for it is Queue-based. This means that Apex transactions can be put in a queue to be processed in the background as the rest of the application moves forward. I surmise that this will allow for looser Governor limits, but I’m not certain of that.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;The second 75 minute session featured VisualForce. I have yet to play with VisualForce (shame on me!), and so this talk was very, very interesting. Overall, I get the “Ah, this is the Right Way to do it” feeling that I first got with Ruby on Rails. However, I’ll have to try it out to see the limitations, as I’m sure there are quite a few. We closed with a demo of Salesforce wrapped in the the &lt;a href="http://code.google.com/p/iui/"&gt;iUI interface&lt;/a&gt;, which was really, really slick.&lt;/p&gt;


	&lt;h3&gt;Conclusion&lt;/h3&gt;


	&lt;p&gt;Overall, it was a day well spent. I loved the demos and the breakout sessions. My big gripe was with the length of the morning keynote. Yes, Salesforce.com is great at selling their product, but this day was supposed to be about developing with Force.com. More demos, more sessions, and less marketing!&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/salesforceonrails/~4/vQu42Tso0TY" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://salesforceonrails.com/2008/tour-de-force-atlanta-recap</feedburner:origLink></entry>
  <entry xml:base="http://salesforceonrails.com/">
    <author>
      <name>Luigi Montanez</name>
    </author>
    <id>tag:salesforceonrails.com,2008-04-12:22</id>
    <published>2008-04-12T14:10:00Z</published>
    <updated>2008-04-12T14:12:49Z</updated>
    <category term="Ruby" />
    <category term="gems" />
    <category term="textmate" />
    <link href="http://feedproxy.google.com/~r/salesforceonrails/~3/YrDiYFOxhuU/opening-gems-in-textmate" rel="alternate" type="text/html" />
    <title>Opening Gems in Textmate</title>
<content type="html">
            &lt;p&gt;Here’s a problem: you need to look at a gem’s source code to figure out something, but you need to figure out the path to your gems directory, find the gem in question, and then open it from there. What a pain. Luckily, &lt;a href="http://drnicutilities.rubyforge.org/svn/find_gem/trunk/website/index.txt"&gt;Dr. Nic&lt;/a&gt; has saved the day:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;$ sudo gem install find_gem
$ find_gem activerecord&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;This also comes with the wonderful command ‘edit_gem’. Make sure you have your environment &lt;span class="caps"&gt;EDITOR&lt;/span&gt; variable set in your .bash_login|.bash_profile|.bashrc:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;export EDITOR=&amp;quot;mate&amp;quot;&lt;/code&gt;&lt;/pre&gt;

Save the file and source it:
&lt;pre&gt;&lt;code&gt;$ source .bash_login (or .bash_profile or .bashrc)&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Now, “edit_gem activerecord” does what you think it should do. Nice little pieces of functionality like these really make the term “gem” so appropriate. Hat-tip to &lt;a href="http://effectif.com/2008/3/29/opening-ruby-gems-in-textmate"&gt;Graham Ashton&lt;/a&gt; for sparking my interest to find a solution.&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/salesforceonrails/~4/YrDiYFOxhuU" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://salesforceonrails.com/2008/opening-gems-in-textmate</feedburner:origLink></entry>
  <entry xml:base="http://salesforceonrails.com/">
    <author>
      <name>Luigi Montanez</name>
    </author>
    <id>tag:salesforceonrails.com,2008-04-09:18</id>
    <published>2008-04-09T18:38:00Z</published>
    <updated>2008-04-09T20:01:32Z</updated>
    <category term="Ruby" />
    <category term="thin" />
    <link href="http://feedproxy.google.com/~r/salesforceonrails/~3/ATFSW39onbM/presentation-on-thin" rel="alternate" type="text/html" />
    <title>Presentation on Thin</title>
<content type="html">
            &lt;p&gt;Tonight, I’ll be doing a Lightning Talk for the Atlanta Ruby Users Group on &lt;a href="http://code.macournoyer.com/thin/"&gt;Thin&lt;/a&gt;, a Ruby web server. Below are my slides, accompanied by several resources:&lt;/p&gt;


&lt;div&gt;&amp;lt;object height="355" width="425"&gt;&amp;lt;param /&gt;&amp;lt;param /&gt;&amp;lt;param /&gt;&amp;lt;embed src="http://static.slideshare.net/swf/ssplayer2.swf?doc=thin-1207766139353517-8" height="355" width="425"&gt;&amp;lt;/embed&gt;&amp;lt;/object&gt;&lt;div&gt;&lt;a href="http://www.slideshare.net/?src=embed"&gt;&lt;img src="http://static.slideshare.net/swf/logo_embd.png" alt="SlideShare" /&gt;&lt;/a&gt; | &lt;a href="http://www.slideshare.net/luigimontanez/thin-344581?src=embed" title="View 'Thin' on SlideShare"&gt;View&lt;/a&gt; | &lt;a href="http://www.slideshare.net/upload?src=embed"&gt;Upload your own&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;

	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://github.com/macournoyer/thin/tree/master"&gt;Thin on GitHub&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.garyharan.com/index.php/2008/02/21/rails-development-with-the-thin-web-server/"&gt;Rails Development with Thin&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://blog.ninjahideout.com/posts/busting-a-cap-in-yo-ass"&gt;Using Capistrano with Thin&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://github.com/macournoyer/thin/tree/master/example/thin.god"&gt;Using god with Thin&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.misuse.org/science/2008/04/07/thin-vs-mongrel-a-ruby-on-rails-performance-shootout/"&gt;Thin and Mongrel Performance Test&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Thin is in!&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/salesforceonrails/~4/ATFSW39onbM" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://salesforceonrails.com/2008/presentation-on-thin</feedburner:origLink></entry>
  <entry xml:base="http://salesforceonrails.com/">
    <author>
      <name>Luigi Montanez</name>
    </author>
    <id>tag:salesforceonrails.com,2008-04-08:17</id>
    <published>2008-04-08T02:30:00Z</published>
    <updated>2008-04-08T02:43:39Z</updated>
    <category term="Salesforce" />
    <category term="apex data loader" />
    <category term="force.com ide" />
    <link href="http://feedproxy.google.com/~r/salesforceonrails/~3/UDz9CxjwXp8/salesforce-tools-of-the-trade" rel="alternate" type="text/html" />
    <title>Salesforce Tools of the Trade</title>
<content type="html">
            &lt;p&gt;Salesforce.com is billed as Software-as-a-Service: a complete software experience contained in the web browser. While regular users will never have to leave the warm comfort of their browsers, the reality for administrators and developers is much different. We depend on several essential tools to wrangle our data. Luckily, all the following tools are downloadable for free, and versions are available for both Windows and Mac &lt;span class="caps"&gt;OS X&lt;/span&gt;.&lt;/p&gt;


	&lt;h3&gt;Apex Data Loader&lt;/h3&gt;


	&lt;p&gt;&lt;a href="https://na5.salesforce.com/dwnld/DataLoader/ApexDataLoader.exe"&gt;Windows Installer&lt;/a&gt; | &lt;a href="http://www.pocketsoap.com/weblog/2008/01/1800.html"&gt;Mac Installer&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;Originally called LexiLoader (the Mac application is still called this), the Data Loader is the most essential tool for getting data in and out of Salesforce. The Data Loader connects via the Force.com &lt;span class="caps"&gt;SOAP API&lt;/span&gt; and understands the ubiquitous format of &lt;span class="caps"&gt;CSV&lt;/span&gt; (comma-separated values). When exporting data out of Salesforce, you’ll need to use &lt;span class="caps"&gt;SOQL&lt;/span&gt;, Salesforce.com’s &lt;span class="caps"&gt;SQL&lt;/span&gt;-like language for querying your data. &lt;span class="caps"&gt;SOQL&lt;/span&gt; doesn’t work exactly like &lt;span class="caps"&gt;SQL&lt;/span&gt;, and at times can be maddeningly confusing. But have no fear, as we have help.&lt;/p&gt;


	&lt;h3&gt;Force.com Explorer&lt;/h3&gt;


	&lt;p&gt;&lt;a href="http://wiki.apexdevnet.com/index.php/Apex_Explorer"&gt;Windows Installer&lt;/a&gt; | &lt;a href="http://www.pocketsoap.com/osx/soqlx/"&gt;Mac Installer&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;The Explorer explores your data. With it, you can build and execute &lt;span class="caps"&gt;SOQL&lt;/span&gt; queries, view the results, and edit the data (one record at a time).&lt;/p&gt;


	&lt;p&gt;The Windows version includes a &lt;span class="caps"&gt;SOSL&lt;/span&gt; Tester, which let’s you play with results from &lt;span class="caps"&gt;SOSL&lt;/span&gt;, Salesforce.com’s search language.&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://wiki.apexdevnet.com/images/thumb/b/b4/Main_window.jpg/691px-Main_window.jpg" width="600px" /&gt;&lt;/p&gt;


	&lt;p&gt;The Mac &lt;span class="caps"&gt;OS X&lt;/span&gt; version, SOQLXplorer, doesn’t include &lt;span class="caps"&gt;SOSL&lt;/span&gt; support, but does include a nifty graphical view of your data schema:&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://www.pocketsoap.com/osx/soqlx/schema.png" width="600px" /&gt;&lt;/p&gt;


	&lt;p&gt;Let’s say that a city changes it’s name from Raritan to Edison (&lt;a href="http://en.wikipedia.org/wiki/Edison,_New_Jersey#Early_history"&gt;it’s happened before&lt;/a&gt;). So your workflow for updating contact data using the Data Loader and Explorer looks something like this:&lt;/p&gt;


	&lt;ol&gt;
	&lt;li&gt;Use the Explorer to figure out the correct &lt;span class="caps"&gt;SOQL&lt;/span&gt; query for all contacts in Raritan&lt;/li&gt;
		&lt;li&gt;Using the Data Loader and your cool query, export the data to a &lt;span class="caps"&gt;CSV&lt;/span&gt; file&lt;/li&gt;
		&lt;li&gt;Open the &lt;span class="caps"&gt;CSV&lt;/span&gt; file in Excel, and replace the City column with “Edison” &lt;/li&gt;
		&lt;li&gt;Fire up the Data Loader again and update the fields using with the new values in the &lt;span class="caps"&gt;CSV&lt;/span&gt;&lt;/li&gt;
	&lt;/ol&gt;


	&lt;p&gt;Three different applications, four steps. Whew! If only there was a tool that did all of that in one neat little package…&lt;/p&gt;


	&lt;h3&gt;Mass Update Anything&lt;/h3&gt;


	&lt;p&gt;&lt;a href="http://wiki.apexdevnet.com/index.php/Mass_Update_Anything"&gt;Windows/Mac Installation Instructions&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;Mass Update Anything, as the name implies, updates fields in bulk, based on a &lt;span class="caps"&gt;SOQL&lt;/span&gt; query. In addition, you can choose to delete fields in bulk as well. It’s a great little tool that does one job very well, and will save you from &lt;span class="caps"&gt;CSV&lt;/span&gt; hell.&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://wiki.apexdevnet.com/images/5/52/Massupdateanything.jpg" width="600px" /&gt;&lt;/p&gt;


	&lt;h3&gt;Force.com &lt;span class="caps"&gt;IDE&lt;/span&gt;&lt;/h3&gt;


	&lt;p&gt;&lt;a href="http://wiki.apexdevnet.com/index.php/Force.com_IDE"&gt;Windows/Mac Installation Instructions&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;Last but not least, the Force.com &lt;span class="caps"&gt;IDE&lt;/span&gt;, based on &lt;a href="http://eclipse.org"&gt;Eclipse&lt;/a&gt;, is essential if you’re going to write any custom code for Salesforce. It has more features than I could ever describe in one post, so your best bet is to just &lt;a href="http://wiki.apexdevnet.com/index.php/Force.com_IDE"&gt;visit the page&lt;/a&gt;. The &lt;span class="caps"&gt;IDE&lt;/span&gt; also includes an integrated Schema Browser (like the Force.com Explorer), and I’ve found myself using that rather than the stand-alone app.&lt;/p&gt;


	&lt;h3&gt;Summary&lt;/h3&gt;


	&lt;p&gt;So there you have it. The Data Loader loads data. The Explorer explores data. Mass Update Anything does what it says. And the &lt;span class="caps"&gt;IDE&lt;/span&gt; provides you with an integrated development environment for Apex Triggers and Classes, S-Controls, Visualforce, and Metadata. These are the tools you need to kick ass, so get ‘em and get started!&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/salesforceonrails/~4/UDz9CxjwXp8" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://salesforceonrails.com/2008/salesforce-tools-of-the-trade</feedburner:origLink></entry>
  <entry xml:base="http://salesforceonrails.com/">
    <author>
      <name>Luigi Montanez</name>
    </author>
    <id>tag:salesforceonrails.com,2008-04-07:10</id>
    <published>2008-04-07T04:30:00Z</published>
    <updated>2009-03-01T03:01:18Z</updated>
    <category term="Salesforce" />
    <category term="triggers" />
    <link href="http://feedproxy.google.com/~r/salesforceonrails/~3/tUlwaPS1JiM/setting-a-default-account-using-triggers" rel="alternate" type="text/html" />
    <title>Setting a Default Account Using Triggers</title>
<content type="html">
            &lt;p&gt;In Salesforce, every Contact record must be matched to an Account in order to be viewed by your entire organization. Unfortunately, users uploading in new Contacts via data import, or entering a new Contact manually, usually forget to enter in an Account field. Later, when other users search for that Contact, they won’t be able to find it, as Salesforce considers a Contact to be private (and thus not searchable), if it’s not linked to an Account.&lt;/p&gt;


	&lt;p&gt;Since the Account field on Contacts is standard, we can’t just modify it to make it a Required Field. Oddly, creating a Workflow to specify an Account when one doesn’t exist doesn’t work, for reasons that are a bit of a mystery to me. Enter Triggers: a programmatic way to take some action before or after a record is created, updated, or deleted.&lt;/p&gt;


	&lt;p&gt;First, create a generic Account that can function as a catch-all. I suggest “Individuals”. Then, use either the &lt;a href="http://www.salesforce.com/downloads/ApexTools/salesforce_ant.zip"&gt;Apex Deployment Tool&lt;/a&gt; or the &lt;a href="http://wiki.apexdevnet.com/index.php/Apex_Toolkit_for_Eclipse"&gt;Force.com Toolkit for Eclipse&lt;/a&gt; to create a new trigger (using those tools will be the subject of future posts).&lt;/p&gt;


&lt;pre&gt;&lt;code class="apex"&gt;trigger SetDefaultAccount on Contact (before insert) {
    For (Contact nc:Trigger.new) {
        If (nc.AccountId == NULL)
            nc.AccountId = [select Id from Account where Name = 'Individuals'].Id;
    }
}&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;The code basically says: “Before a new Contact is inserted and if it doesn’t have an Account Id, set the Id to the Account named ‘Individuals’.&lt;/p&gt;


	&lt;p&gt;In Eclipse, you’ll be prompted to provide some test coverage for the trigger before deploying:&lt;/p&gt;


&lt;pre&gt;&lt;code class="apex"&gt;public class testcontact {
    static testmethod void mytest1() {
        Contact c = new Contact(LastName='test lname');
        insert c;
    }
}&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Awesome! Now you’ll never have to worry about anyone in your organization forgetting to link a new Contact to an Account.&lt;/p&gt;


	&lt;p&gt;Hat-tip to Mike Rosa @ Salesforce.com for helping me out with this.&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/salesforceonrails/~4/tUlwaPS1JiM" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://salesforceonrails.com/2008/setting-a-default-account-using-triggers</feedburner:origLink></entry>
  <entry xml:base="http://salesforceonrails.com/">
    <author>
      <name>Luigi Montanez</name>
    </author>
    <id>tag:salesforceonrails.com,2008-03-29:7</id>
    <published>2008-03-29T00:30:00Z</published>
    <updated>2008-04-01T01:52:06Z</updated>
    <category term="Ruby" />
    <category term="scaling" />
    <link href="http://feedproxy.google.com/~r/salesforceonrails/~3/u_dsXo_vmDg/rails-scales" rel="alternate" type="text/html" />
    <title>Rails Scales</title>
<content type="html">
            &lt;p&gt;Over on the &lt;a href="http://highscalability.com"&gt;High Scalability Blog&lt;/a&gt;, a writeup on top 10 Facebook App &lt;a href="http://highscalability.com/friends-sale-architecture-300-million-page-view-month-facebook-ror-app"&gt;Friends for Sale&lt;/a&gt; details that two full-time Rails developers and one full-time &lt;span class="caps"&gt;DBA&lt;/span&gt; have, in three months, built an application that serves 200 requests &lt;em&gt;per second&lt;/em&gt;. Yowsers.&lt;/p&gt;


	&lt;p&gt;Much of the criticism of Ruby/Rails performance woes will simply go away this year, what with Ruby 1.9, &lt;a href="http://jruby.codehaus.org"&gt;JRuby&lt;/a&gt;, it’s companion &lt;a href="http://rubyforge.org/projects/glassfishgem"&gt;Glassfish&lt;/a&gt;, and &lt;a href="http://code.macournoyer.com/thin/"&gt;Thin&lt;/a&gt; popping up. Also, &lt;a href="http://merbivore.com"&gt;Merb&lt;/a&gt;, a framework by Rails &lt;a href="http://www.pragprog.com/titles/fr_deploy"&gt;deployment genius&lt;/a&gt; &lt;a href="http://brainspl.at"&gt;Ezra Z.&lt;/a&gt;, will likely inspire some performance enhancements to Rails itself.&lt;/p&gt;


	&lt;p&gt;I’ve always thought that not adopting a development framework just because it doesn’t scale is rather odd. Humans tend to always hold out that irrational hope that yes, some day they’ll be like those famous people on top, even though they’re completely screwing themselves in the present.&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/salesforceonrails/~4/u_dsXo_vmDg" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://salesforceonrails.com/2008/rails-scales</feedburner:origLink></entry>
  <entry xml:base="http://salesforceonrails.com/">
    <author>
      <name>Luigi Montanez</name>
    </author>
    <id>tag:salesforceonrails.com,2008-03-27:5</id>
    <published>2008-03-27T03:28:00Z</published>
    <updated>2008-04-01T01:52:20Z</updated>
    <category term="Ruby" />
    <category term="Salesforce" />
    <category term="meta" />
    <link href="http://feedproxy.google.com/~r/salesforceonrails/~3/E0R27wD9P4Y/welcome-to-the-jungle" rel="alternate" type="text/html" />
    <title>Welcome to the Jungle</title>
<content type="html">
            &lt;p&gt;Well, lucky you! You’ve stumbled upon this weird, strange corner of the Tubes. A place where the idealism of an elegant open source project meets the stone-cold reality of delivering quality software within tight deadlines to those who line your pockets. No, this is not just another Rails blog. This is a blog about building web software really fast, under ridiculous constraints, with a multitude of crap hurled your way, and finding joy in it. I don’t profess to have found that joy yet, but hopefully, in what should be a long, fulfilling journey, you and I, my dear reader, will. And I won’t ever use that many commas in a single sentence again. Promise.&lt;/p&gt;


	&lt;p&gt;Luckily, we have some excellent tools at our disposal. You’ve heard of &lt;a href="http://rubyonrails.org"&gt;Ruby on Rails&lt;/a&gt;, the high-flying web framework that everyone’s been writing about since 2005. It’s got that guy &lt;span class="caps"&gt;DHH&lt;/span&gt; who drops the F-bomb a lot and has a funny Danish accent.&lt;/p&gt;


	&lt;p&gt;The hippest nerds flock to it, because it’s a damn good way to built web applications. Ruby is, hands down, the nicest language to code in. Rails (and now &lt;a href="http://merbivore.com"&gt;Merb&lt;/a&gt;), were designed from the ground up to make the lives of web developers better. To make us happier. That’s an amazingly progressive goal, hippy-ish really, and it would have been laughed at by those &lt;span class="caps"&gt;IBM&lt;/span&gt; engineers of yore who wore thick-rimmed glasses out of utility and not out of fashion. But I’ll be damned if I ever code in &lt;span class="caps"&gt;PHP&lt;/span&gt; or Java again.&lt;/p&gt;


	&lt;p&gt;You may have heard of &lt;a href="http://www.salesforce.com"&gt;Salesforce.com&lt;/a&gt;, the enterprise &lt;span class="caps"&gt;CRM&lt;/span&gt; system used by Fortune 500s to Mom and Pop shops to everyone in between. In the past few years (as Rails has been gaining in popularity), Salesforce has become more than just a &lt;span class="caps"&gt;CRM&lt;/span&gt; (customer relationship management). Dubbed &lt;a href="http://force.com"&gt;Force.com&lt;/a&gt;, it’s become a nearly full-blown web application framework, but not in the same sense as Rails. Using Rails, we build web applications by firing up a text editor and coding in Ruby, &lt;span class="caps"&gt;HTML&lt;/span&gt;, CSS, and some Javascript. Using Force.com, we don’t build applications as much as customize the hell out of an existing one. Much is already built for us, but we then need to use a gaggle of technologies to tweak it just right to fit with our users’ needs.&lt;/p&gt;


	&lt;p&gt;Ruby on Rails and Force.com have a lot of differences. Rails is open-source, licensed under the &lt;span class="caps"&gt;MIT&lt;/span&gt; License. It’s free as in beer and free as in speech. Force.com is completely proprietary. Your users will have to subscribe in a per seat/per month arrangement. You host (or pay to someone to host) your own Rails apps, while Force.com apps are completely managed by Salesforce.com (the company). Philosophically, Force.com is a true enterprise framework, while the Rails Core team could care less about making it enterprise (and with good reason).&lt;/p&gt;


	&lt;p&gt;But the two have one striking similarity: they both help web developers build solid applications in ridiculous time. And let me make a bold claim: Force.com completely destroys Rails in development time. It’s not even close. A tool that takes me a day to build using Force.com would take at least a week (and probably two) if I were to use Rails.&lt;/p&gt;


	&lt;p&gt;I’ll let that sit with you, as I’ve said enough for now. In the coming days and weeks, I’ll be evaluating the pros and cons of each web framework, and sharing what I learn along the way. Neither is perfect, but both are pretty great. While there are many great Rails blogs out there, there is (to my knowledge), only &lt;a href="http://gokubi.com"&gt;one&lt;/a&gt; regularly updated Salesforce development blog, with another &lt;a href="http://www.warriorpoint.com/blog/"&gt;newer one&lt;/a&gt;. So, I hope to help fill that void. If this all tickles your pickle, consider &lt;a href="http://feeds.feedburner.com/salesforceonrails"&gt;subscribing to the feed&lt;/a&gt;.&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/salesforceonrails/~4/E0R27wD9P4Y" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://salesforceonrails.com/2008/welcome-to-the-jungle</feedburner:origLink></entry>
</feed>
