How Apex & Salesforce

Website Developer
7 min readMar 6, 2021

Upsides to knowing Apex

The importance of Apex?

Apex is part of a much bigger picture called Salesforce. Salesforce is a revolutionary company founded by Marc Benioff, Parker Harris, Dave Moellenhoff, and Frank Dominguez that provides CRM. A CRM is a Customer Relation Management tool. A Customer Relationship Management tool is software that collects data about a customer or a potential customer.

https://sfdctechie.wordpress.com/2018/10/20/apex-collections-for-admins-beginners/

They were the first company to make a CRM as a Software as a Service or SaaS for short. A SaaS is any service that is cloud-based that, so you do not have to download anything to use it. Before Salesforce companies like Origin and SAP made CRM’s that were downloaded to a local server which is called on-premise. However, Salesforce’s CRM worked using a browser so it did not take up any physical or storage space.

These big on-premise CRMs were also very clunky because they were made to fit as many companies as possible. This meant that they did not work for every company. Many times it meant that they did not work very well for small companies. So, Salesforce made sure to be simple and flexible so the companies using it could tailor it. This is where Apex comes in. Apex was designed to make Salesforce more flexible for the user. Apex lets third-party programmers tailor Salesforce to their needs.

Salesforce has become a multi-million dollar company and is now a giant company like Origin and SAP. In 2005 they understood that. So, they made App Exchange. It helps Salesforce users create apps and make them accessible to the public for free or through payment.

Who is Marc Benioff?

Marc Benioff formerly worked for a company called Oracle. Oracle is a company that sells a Database Management System or DBMS. By 26 Marc became the vice president of Oracle and became close friends with the founder Larry Ellison. Marc soon became tired of Oracle and was searching for something new.

On a vacation in Hawaii Marc came up with the idea of Salesforce. Soon after he left Oracle and founded Salesforce. Larry and Marc’s relationship remained good after this, Larry even invested 2 million dollars in the company. Soon Marc found out that Oracle was creating a competitor to Salesforce’s CRM. This created a lot of drama between the two and Marc even based marketing campaigns around it.

What is Force.com?

Force.com, now known as Lightning Platform, was the first Platform as a Service or PaaS for short. A PaaS is a cloud-based platform that lets you make any app or add-on. They enable you to do this without the need to make an infrastructure or storage system. This PaaS was a service that allowed third-party coders to make websites of their own that could integrate into Salesforce.

The language used on the Lightning Platform is in fact Apex. The Lightning Platform is very easy to use because of the fact that it is a low-code platform. A low-code platform is a platform that needs little to no code experience. It does this by using presets to help you build your website. The contrary would be having to code it all by yourself. They also allow you to code your website completely independently for a more versatile experience.

What is Visualforce?

Visualforce is a framework for Salesforce. A framework is a separate place where you build pieces of a bigger project. It allows you to test those pieces so you can see how the code is turning out. Visualforce is specifically for enhancing Salesforce on a very detailed level. It makes it very detailed and customized user interfaces that are put on to the Lightning Platform. It uses a mark-up language very similar to HTML. A mark-up language is a language that enables someone to make text italicize, bolden, etc. It uses server-side controllers.

Server-side controllers let you make basic database actions like making queries or saving. A controller is a set of directives that specify the effects when a coder changes the components in mark-up actions. For example when a coder clicks a link or a button. They also allow the information that needs to be given on a page. It also provides the ability to change the behavior of any element.

For example, it could ensure that an employee at a computer parts repair shop gets to orders in chronological order. It is very to use, so businesses wouldn’t have to hire an expensive coder in order to program it. They could hire a college graduate for a lot less because you would need a little experience to use Visualforce. Visualforce is very helpful because it helps shave off an employee’s time by making the CRM interface easier and efficient.

Why should I learn Apex?

There are a lot of upsides to knowing Apex and there are not very many downsides to it. First, Thousands of companies use Salesforce so knowing Salesforces’ language would get you a job almost anywhere. Many big companies like Spotify, Amazon Web Services, U.S. Bank, and Toyota use Salesforce today. Also, 82% of Apex coders feel needed in the workplace. Many Apex coders also believe that you do not need a degree to be successful in their line of work.

Another upside is that Apex is very similar to Java. If you know Java it should be easy to learn and vice versa. There are few downsides to Apex because of its current-day applications. The fact that Apex was made only for Salesforce means that it is not applicable anywhere else. This is unlike other languages like Python and Java.

What is App Exchange?

In 2005 Salesforce releases App Exchange. App Exchange is what many call iTunes or the eBay of business software. It allows third-party coders to build apps and give them to any Salesforce customers. This would make it easier for smaller businesses to personalize their CRM’s without even having to make their own code.

You can also charge for these premade packages on App Exchange. Now you can see apps for finance, human resources, enterprise resource planning, sales, customer service, IT and admin, marketing, etc. It also has a rating system and a tutorial video to help you get started.

What can you make using Lightning?

Using the Lightning Platform you make a bunch of stuff for your business. First, you can make a website for a corporate business that gives information to customers. These are the easiest to make but only consist of static pages. You could make a store locator or catalog, which collects or gives intelligence to the customer. You can make web and mobile apps easily.

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_intro_how_does_apex_work.htm

How does Apex work?

Apex is a strongly typed language. This means that it is by default more intuitive. This is because every variable such as an integer or a word has to be differentiated and treated as such. It is also object-oriented which means that the code puts variables and functions together as one piece. That piece is called an object, also variables can be referred to as properties and functions as methods.

For example, an object named “lamp” would have the properties of color, material, and size. The methods would be on and off. I have previously said that Apex is similar to Java. Why is that? Well, it comes down to syntax. First, what is syntax when it comes to coding? The syntax is the rules of how the words, symbols, and whitespace work and what the computer reads it as. Here is an example of Apex for loop:

for (init_stmt; exit_condition; increment_stmt) {code_block }

Salesforce is multitenant, it has many users at a time, Apex has governor limitations. Governor limitations are the way that the designers of Apex prevent people from hogging all the resources on a server. If your code executes over the governor limits then Apex will not let you run the code at all.

A governor limitation you have to abide by is the SOQL query limit. SOQL, or Salesforce Object Query Language, is used to look through a companies Salesforce database. It is very similar to SQL and it is typed in Apex. You use SOQL to get the data from an object or from several objects that are similar to each other. For example, count the number of records that meet a given criterion and give results as part of the query.

How do I learn Apex?

Salesforce has a free resource that teaches you Apex called Trailhead. Trailhead gives you challenges and even makes it competitive to help motivate you to progress. There are also other places to learn Apex.

As you may know, Youtube is a great resource to learn any code including Apex. MyTutorialRack, Parikshith M, and System Dot Debug are great Youtube channels for learning Apex. Other resources are TuturialsPoint and SF99. There are classes online that you can take as well, David Lius’ Apex Academy: Absolute Beginner’s Guide to Coding in Salesforce gets five stars with 513 reviews.

How popular is Apex?

Salesforce is only becoming more popular therefore is Apex is as well. In 2020 Salesforce gained more than ten thousand employees and in 2019 almost two million people used Trailhead to teach themselves Apex. Coding is very high in demand. Knowing the language of a very popular CRM will get you a job in many businesses.

For example, Amazon is paying senior Apex coders $130k-$160k. 88% of the Fortune 100 companies use Salesforce. In 2020 Salesforce was ranked number six in Fortune magazine’s top 100 companies to work for. Companies using Salesforce have seen a 36% increase in sales productivity. They have seen a 26% increase in deals, a 28% increase in sales, and a 38% in forecasting.

--

--