Sunday, March 13, 2011

Resources that helped me learn Force.com development





It has been five plus years now that I have been doing the majority of my development work on the Force.com platform. It has been a fun and sometimes frustrating journey to go from a self taught PHP developer who was at home with the LAMP stack to developing in the "cloud" with the Force.com platform. Since you can’t go to college to learn Salesforce's platform I thought I would take a minute to share with others the free resources that have helped me on many late nights as I hammered out some code for a client. This list is by no means exhaustive but it includes the main places I go when I need direction or when I need to sharpen my skills.

Salesforce.com generated content:

The first place I always turn to is the Salesforce.com generated content (most of which can be found at http://developer.force.com/). Hats off to the team at Salesforce for creating a killer platform and then taking the time to document it clearly. Weekly there are new webcasts about the platform and it seems like their documentation is updated with almost every release. If you are anything like me you don’t remember every bit of syntax...so I have the APEX, Visualforce, and API docs always bookmarked for quick reference.

They have also made available their "Dev 401 Building Applications" and "Dev 510 Apex and Visualforce" level classes on iTunes U so you can download over 15 hours of classroom teaching for free. If you are not familiar with iTunes U all you need is iTunes installed on your computer and you can download a bunch of very cool classes (Salesforce classes, Stanford iPhone dev classes, etc) for free. If you have the time these two courses are a great in-depth overview of development on the platform.

Lastly I will mention Dreamforce (even though it is not free… get your work to pay for it) the annual conference for Salesforce. There are tons of sessions you can attend to learn basic and advanced Force.com development. Plus you get to network, drink a lot of free beer and usually hear a good band.

The very active Force.com developer community:

From the developer evangelists to regular developers there are a number of very active and accessible people who are blogging, tweeting and making videos on how to work with the platform. Here is a short list of some of the blogs I have found most beneficial (I know there are many more out there...please email me if you know of some good ones!):

1. http://blog.sforce.com/ - This is the official blog that is maintained by Salesforce.com. A must-read to stay up-to-date on all things related to the platform.
2. http://gokubi.com/ - A blog written by Steve Andersen, a Solution Architect at the Salesforce.com foundation.
3. http://www.tehnrd.com/ - I love the style of writing on this one. Jason is also a great reference on how to use jQuery on the platform.
4. http://blog.jeffdouglas.com/ - Jeff is one of the co-authors of the Salesforce.com handbook and is always cranking out valuable content.
5. http://www.embracingthecloud.com/ - Written by Mike Leach at Facebook, this blog has in-depth entries on development on the platform.
6. http://wesnolte.com/ - The other co-author of the Salesforce.com handbook and a pretty smart chap.

I am a pretty late adopter to Twitter, joining only a couple of months ago. In that short time, a day has not gone by where I don’t learn about something new from the many people Tweeting about Salesforce. If you are not on Twitter join tomorrow and follow some of these people. Even if you don’t Tweet a thing, I guarantee you will learn a ton from the stream of consciousness out there. 

Two other areas to go for code samples are the Cookbook and the Code Share.

Force.com discussion boards:

In my opinion, the discussion boards on developer.force.com are the best place you can go to get accurate and quick advice when you are stuck on something. I have been on other boards where the tone of the experienced developers is arrogant and condescending. That is not that case with these boards. I remember when I was first starting out (and still today) asking pretty simple and basic questions with a little hesitation. Pretty much every time I have asked a question I have gotten a response from a fellow developer, evangelist or product manager that helps me figure out my issue. In the beginning this was the most important resource to me.

Developer challenges:

Over the past couple of years Salesforce has put on a number of developer challenges. These challenges have given me the freedom to be creative and create some stuff on the platform that no client would ever pay for. However, they have sharpened my skills and allowed me to think out of the box when it comes to the platform and what is possible on it. I regularly use code from my challenge entries when I deliver client work. I even have taken part in other companies challenges (PayPal) and written my entries on the Force.com platform. I would encourage everyone to take part in the challenges even if you have to work a couple nights to accomplish it. You learn a ton from them, meet fellow developers, and you might even win an Apple product. 

Banging my head against it:

Lastly, I am a self-taught guy. I do not have a Computer Science degree and have never taken a programming class. The only way I know how to get better at development is to do it, get frustrated, bang your head against some code for hours, and then finally figure it out. It is frustrating but when it clicks it is all good. Taking the time to get your hands dirty is probably the best way to learn the platform.

The Force.com platform is a great environment for a developer on these days and there is a mountain of resources out there to help you if you take the time to look for them. Hope this was of some value and would love to hear from you about all the resources I missed or simply don’t know about. Thanks!

Friday, August 6, 2010

Community Question Response: Partial Page Updates with Visualforce and APEX

I was reading the Salesforce developer boards the other day and ran across this question:
I have VF page which contains dropdown ,an execute button and Refresh button and a table. Upon selecting a value in the dropdown and click on execute button, at the back end a method will execute and update a value custom object field.
Upon Clicking the Refresh button i want to display the update value in the table of VF page.I am able to update the table but whole page is getting loaded.
I want to refresh only the table component part not the dropdown when I click refresh button.
Can anyone please help me achieve this"

Link to post: http://community.salesforce.com/t5/Visualforce-Development/Update-the-table-Contents-using-Partial-page-update-concept/td-p/197375

I thought would make this the first post in my attempt to answer Salesforce.com Community Questions in-depth on my blog.

Document.getElementById().innerHTML == Rerender:

When I made the jump from S-Controls to Apex/Visualforce one of the tags I missed the most was JavaScript’s document.getElementById().innerHTML. I loved making a query to the API and then retendering an area of the screen with some new data. It was “AJAX…Web 2.0…cutting edge” and my clients loved it. While JavaScript still has a place in Apex/Visualforce making calls these kind of calls with partial page updates are now replaced with a nifty Apex tag attribute…rerender.

The "rerender" attribute can be specified on a CommandButton and CommandLink (maybe more…check the Visualforce guide). All you do is enter in an Id of an element on the screen that you would like rerendered once the method associated with that button/link is complete.

A quick example:


<apex:commandButton action="{!doSomething}" rerender="idToRerender" value="Rerender"/>
<apex:outputPanel id="idToRerender"> SOME DATA RETURNED BY THE CONTROLLER</apex:outputPanel>




When you click the button it will invoke the “doSomething” method and then rerender the outputPanel with any changes made by the “doSomething” method

A complete example:

Page:

<apex:page controller="rerenderTest">
 
 
 <h1>Partial Page Refresh</h1>
 
 
 <apex:form >
  
  Put some text here: <apex:inputText value="{!showInRerender}" />
  
  <apex:commandButton action="{!doSomething}" rerender="idToRerender" value="Rerender"/>
 
 </apex:form>
 
 <apex:outputPanel id="idToRerender"> 
  {!showInRerenderModified} 
 </apex:outputPanel>

</apex:page>
Controller:

public with sharing class rerenderTest {

    public String showInRerender {get;set;}
    public String showInRerenderModified;
    
    public String getShowInRerenderModified(){

          return showInRerenderModified;

     }

     public void doSomething (){

        showInRerenderModified = 'Here is what you just typed: ' + showInRerender;

    } 

}

View working example here

You can call rerender on a number of Visualforce tags…again see the manual for a complete list. Hopefully this gives you a framework to answer your question and you can see how you could expand on this to include sObject updates, picklists, etc. to meet your specific use case.

Questions…comments…a better way to do it? I would love to hear from you!

Tuesday, March 2, 2010

PayPal and Force.com = GrantAChance.com

I wanted to put a quick post in here about an application I have built on the Force.com platform. It is a micro-grant site built on the Force.com platform that leverages the PayPal adaptive APIs. Currently a finalist in the PayPal developer challenge. Here is a write up Salesforce.com did about it:

http://blog.sforce.com/sforce/2010/03/a-microgrant-solution-built-on-forcecom-.html

Link to applicaiton:

http://www.grantachance.com

Wednesday, November 4, 2009

An interesting video on cloud computing 101...

Every had a client have their eye's glaze over when you mention the words "Cloud Computing" or all your data is in the "Cloud"? I stumbled upon this video today at CNN.com which does a good (and humorous)job of answering the question..."What is Cloud Computing?"

height="374">

Thursday, October 22, 2009

Summer Salesforce.com Developer Challenge: Taking Force.com to the next level…

This summer Salesforce.com threw down the gauntlet again and put on their second Cloud Developer Challenge. After our success with the last challenge we thought we would throw our hat in the ring and see what we could come up with. Our goal this time around was to use the Force.com platform (Sites, Visualforce, Apex, and Salesforce.com) to create an online application that displays the richness of the Force.com platform while looking nothing like a standard Salesforce.com app.

After some power brainstorming we decided that we would combine our love for Salesforce.com and endurance sports to create an online portal for users to set goals and track their workouts online. Our concept grew into an online tool that a person could use to set a goal, plan/enter their workouts, blog/twitter about their workouts and get real-time analytics of their progress towards that goal.

The result

The result of our effort was enduranceAthlete...an online application that is built on the Force.com platform and leverages some of the latest Cloud and Web 2.0 best practices. You can log in to our application to demo it:

http://workout-developer-edition.na7.force.com/SiteLogin

Below are some of the highlights of enduranceAthlete...

Data model and User Interface are built all on the Force.com platform:



Calendar that leverages jQuery to display workouts:




Integration with Active.com API to pull in information on local races:




Integration with major social networks Twitter and Blogger:





Integration with Google Analytics:





Salesforce.com honors us with a win!

We are very pleased to announce that Salesforce.com selected us as one of the three winners for the Summer Developer Challenge of which there were over 1,000 applications. Full article…

Conclusion

It is clear that with the addition of Sites that Salesforce has taken the Force.com platform to the next level. enduranceAthlete is a great example of how you can really create any online application using their platform…the sky is now the limit. I feel like we can finally say to our clients that “We can do anything on Salesforce.com”.

Thursday, October 1, 2009

Well it was good enough...

The announced the winners for the second Salesforce.com developer challenge and it turns out my entry was good enough to be in the top three...so I finally get an Apple product.

To be honest I am very honored...there were a ton of very cool apps built that I saw (I thought both the gaming sites were particularly well done). Here is a link to the announcement and the other sites that were mentioned:

Salesforce.com Announcements

Thanks again to Salesforce for the fun challenge!

Wednesday, September 2, 2009

Developer Challenge Entry Done!

So after hours of late nights (thanks to my wife taking the kids) I have completed my submission for the Developer Challenge this summer.

Endurance Athlete: A cloud based application to help you train for your next big race.




Here is a link to the site:

https://workout-developer-edition.na7.force.com/