Find your content:

Search form

You are here

Is there a defacto 3rd party utilities library for Apex such as Apache Commons is for Java?


I have been developing in Java for some time and have grown accustom to using third party libraries such as Apache Commons for some of the more mundane functions needed in most applications (e.g., Commons Lang's StingUtils class).

I've found this and then there's the developerforce code share of course, and possibly apps on the app exchange (didn't see any except apex-lang).

Is there a defacto 3rd party apex library such as Apache Commons is for Java that people here use? Or, is everyone creating their own...consultants, perhaps having a "library" of their own code to copy and paste into client orgs at the start of their projects/contracts.

Attribution to: Peter Knolle

Possible Suggestion/Solution #1

As Apex have so many limitations and is extremely limited comparing to the other languages in most of the projects I was participating some Utils class with methods needed to manipulate strings or dates was always sufficient for our needs.

In terms of frameworks/tools which are constantly updated I believe that Apex Enterprise Patterns by Financial Force is actually a good resource. You can also check their other github for libraries connected to Http callouts or for playing with MDAPI

Attribution to: user1974566

Possible Suggestion/Solution #2

Apex-lang is about as close to a Java-style library as you can get. Contains several string, database, and collection utilities that mimmick Java functionality. Be aware though, some stuff including Comparing and Sorting collections is out of date with the advent of the Comparable interface in Apex.

In addition to apex-lang, and like you suggest, I typically create or reuse static helper methods throughout my projects. Static helper methods are very convenient for reusing code in Chatter functionality, DML handling, Exception handling, Unit testing, etc.

Attribution to: James Loghry

Possible Suggestion/Solution #3

About the closest thing to Apex libraries is the ' Labs' apps on the AppExchange that are open-source packages.

They're a good source for some specific code. However, they're not typically distributed as library code.

Also,'s Github contains a good set of SDKs and code-source files for linking into SFDC from a variety of languages and platforms.

Attribution to: jordan.baucke

Possible Suggestion/Solution #4

awesome-salesforce is a curated list of Salesforce resources:

What is Awesome Salesforce

Awesome is awesome project started by Sindre Sorhus who is most popular person on Github. He created a project to list down coolest of links bookmarked in your machines and organized them together by compiling them at one place. Later, this projects caught fire and developers community around the world started writing awesome pages (dedicated to their favorite technology).

A Note on Repo AWSomeness

Each repo listed meets at least one of the following requirements:

  • Community-authored repo with 100+ stars
  • Community-vouched repo with 100 stars

Attribution to: identigral

Possible Suggestion/Solution #5

I like this set of utilities using kind of Functional Programming inspired by Lodash and Ramda.js

For example for creating queries chaining methods

List<Contact> contacts =
new Query('Contact').
lookup('AccountId', '001O000001HMWZVIA5').

There are tons of others repositories at

Attribution to: ElkCor
This content is remixed from stackoverflow or stackexchange. Please visit

My Block Status

My Block Content