Tuesday, August 14, 2012

Static resources on Force.com

One of the interesting things I ran into today while making customer portal pages look like another external web-site using static resources


  •  use timestamp in the resource url
    • For example if you are using static resources in a zip file (one of the best practices for maintaining static resources) use timestamp in the URL  /resources/id/timestamp/<filepath>
If you don't use this method to access, you may see a delay in the resources getting reflected by Salesforce Content Delivery network.

The other idea may be to use Amazon CDN which would make the page load quicker

Sunday, August 12, 2012

One of my best Bike Rides


This Saturday Prthika and I were able stretch a bit to do a 26 mile bike ride along W & OD trail.  It was a refresher.  I've been doing 10-20 miles but this one was special.





Find more Bike Ride in Tysons Corner, VA

Sunday, February 26, 2012

Moving my website to Node.js, CoffeeScript and backbone.js

Earlier this week and sometime yesterday, I've been trying to get out of the day-to-day choro get some fresh air from the world of new frameworks and languages


Stumbled upon CoffeScript and Backbone.js.  As far as I can read, these offers great future in removing the clunkiness from programming languages and are truly grounded in DRY principles.  I'll plan to move my site on top these frameworks/languages and see how it goes. 

Self-Service portal isn’t available for new organizations.

In Spring'12 release notes, Self-Service portal is not available for new organizations.  I'm not sure how many organizations are using self-service portal.  But it is one of the least customizable features on Salesforce.com.  


What does this mean to the organizations?


1) The org. that were planning to use self-service portal can no longer use this free service from salesforce.  
2) Existing orgs. would eventually have to move to a chatter based solution if they are already using self-service or some kind of custom development on customer portal


One undesired thing from this outcome is that, Salesforce is effectively removing the freebie that it offered to its customers to create cases.  Web-to-case is there but it is truly not a self-service solution.  This also means driving users to use more chatter and in the end chatter licenses have to be purchased!


Sunday, January 22, 2012

Environment specific variables in SalesForce

If you are developing web-service callouts in development or sandbox and moving them to production, you have to manually change the properties of the out-bound webservices.  For example, you are developing a callout that updates the customer information to an external system when a new customer record is created in SalesForce in Sandbox.  After completing the testing of the callout, you would want to move your apex code to production org.  But, the end point, authentication details of the outbound service will be different than the one in test environments. 

Unfortunately, SalesForce doesn't provide the flexibility of configuration/property files that Java provides.  Luckily SalesForce now provides Custom Label functionality that can be used for this purpose.  
I normally define the endpoints, authentication details as custom labels in sandbox and production orgs.  The advantage is, 
  • the apex classes need not change from sandbox to production.  
  • The test cases run perfectly fine in sandbox and production orgs.  
  • When there is a change in environment specific property value, you need not create a change-set or migrate your code.  
  • Better Apex code development


To create custom labels
Setup->Create->Custom Labels

There are other way of externalizing the properties 

  • Create Properties__C object and store the properties.  The disadvantage of this approach is you are maintaining an object for properties and issuing SOQL queries to retrieve the properties.  
  • Using URLRewrite:  While this solves the purpose like the one mentioned above.  It involves find the parsing various formats of SalesForce's representation of the URLs, i.e.. different urls for internal users, portal users and sites users and you have to understand them
  • Page References:  Using page reference to get the url is limited by developing VF pages and would not address the purpose of this discussion
  • Get Organization ID:  Getting the org. id will also solve the purpose and you can determine based on the org. id which property to use.  But this can lead to issues when you have more than 2 orgs and also multiple outbound web-service environments

Monday, January 2, 2012

UMLet for UML diagrams

Last week, I was searching a free light weight UML software that I can use for doing some UML stuff for a design specification.  I found UMLet to be a cool tool that is easy to develop Activity, Component and Use Case Diagrams.  I can now do design and uml within minutes this tool.  Checkout at www.umlet.com.  


BTW, did I mention how painless it is use in eclipse too!!

Happy New Year 2012

Wishing you a very happy and prosperous 2012 ahead.  I got a chance to lay my hands on one of the best books I've read ever.  The title of the book is "I moved your cheese" by Deepak Malhotra.  This is a must read book if you have already read "Who moved my cheese" by Spencer Johnson.  

Deepak Malhotra brilliantly put forth the need to question the change which Spencer Johnson doesn't cover in the book.  I've loved reading WMMC in the last 9 years and everytime I read, find something new.  Now, I've IMYC an addition to WMMC. 

The best part I liked about the IMYC; it was short, to the point and the author did not dwell into what should the best steps to question change (Maze and Cheese).  Instead he used Max, Zed and Big to come up with their answers by looking at the maze.  Deepak Malhotra asked a series of questions that the reader can answer from their experiences and thoughts.  I would recommend as is a must read for every professional