My Three Favorite Developer Features in Salesforce’s Winter 2014 Release

With each release Salesforce gives us a solid list of improvements and enhancements, but there are always specific ones that stick out more than others.  Here are three that caught my eye for the Winter 2014 release..

1) Statement Limit Elimination
I have run into this one more than once and I like the approach that Salesforce took.  Basically there used to be a limit where you could only run so many lines of code in a transaction, but Salesforce removed that limit and added a new one so that you can only use so much CPU time within a transaction.  The new limit is 10 seconds and it does a great job of not taking into account database interactions and waiting for Apex callouts.  I used to run into ‘number of lines’ limit when I had a very complicated parsing sequence of actions that did not take very long to execute, but it just took a lot of lines of executed statements to complete.  This new change should make implementing those types of functions more consistent, while still protecting the infrastructure from endless loops.

2) Merge Option on the Database Class
Anything to make dealing with the merging of objects easier is wonderful.  The Merge DML option used to be available separately, but you always had to catch exceptions with how that was implemented.  Now with the database.Merge method you will be able to get back a Database.MergeResult object to figure out if anything went wrong.

3) Schema’s New describeSObjects Method
There have been ways to get at the metadata before by using getDescribe() method on the Schema.sObjectType token.  The improvement with the describeSObjects method is that it accepts a list of strings so the values in that list can be completely dynamic and more than one can be specified at a time.  This should allow for a lot more efficiency in certain use cases whey trying to lookup specific metadata values.

It is interesting that the code coverage information in Winter 2014 is now only available in the developer console.  I am glad to see the developer console is getting more features to take on this testing function.  It has always been a struggle to get a really good sense of code coverage across an Org through the various tools that are available.  Even simply running a test that will return a large debug log in Eclipse takes a long time.  Because of this performance issue with running tests I wrote a little VB.NET app a while ago that does the Apex test and then returns just the results to me and not the debug log.  Now I can get my results back quickly and if I want a debug log I can set one up through my browser within Salesforce itself.    I have also extended that VB.NET app to be able to pass in a csv file with all the classes that I want to test along with the associated test class or classes.  This then returns to me an accurate count of total lines and lines tested across all of the classes/triggers being tested.

On we go with Winter 2014!  What caught your eye in this release?

This entry was posted in Technology. Bookmark the permalink.