In this post are trying to demonstrate the overview of apex programing language which is used to develop the application for salesforce. A small introduction:- Apex code is the first multitenant, on-demand programming language. It is compiled, stored, and run entirely on the Force.com platform.
What is Apex?
Apex code is the first multitenant, strongly typed, the object-oriented on-demand programming language which allows Coders to execute the flow and transaction control statements on Salesforce servers in concomitance
with calls to the API. Its syntax looks like java’s syntax and acts like database stored procedures. One of the best
features of the apex is that it is enabled salesforce developers to add business logic to most system events, including button clicks, related record updates, and pages.
Below mentioned are few capabilities of Apex
- DML calls to insert, update, and delete a record.
- Inline SOQL or SOSL statements for retrieving records.
- Looping control structures that help with bulk processing.
- A record locking syntax that prevents record update conflicts.
- Custom public API calls.
- Send and receive emails.
- Web services or XML request/response integrations.
- Warnings, and errors to prevent objects referenced by Apex from being modified.
Why we Use Apex?
It is easy to use, as we know from the above paragraph that its syntax is similar to java. So, it is based on
familiar Java idioms, for instance, variable and expression syntax, block and conditional statement, loop, object, and
array notation syntax.
Apex is the data-focused language it is designed to simultaneously thread multiple queries and DML statements into a single unit of work on a Salesforce server.
It also allows us to customize the pre-built applications according to complex business requirements.
It performs some logic where records need to be updated as in the case of triggers.
How Does Apex Work?
All Apex runs entirely on-demand on Salesforce’s Lightning platform. Developers write and save the Apexcode on the platform, and end-users trigger the execution of the code through the user interface. It is compiled, stored, and run entirely on the Lightning platform.
When a developer writes and saves Apex code to the platform, the platform’s application server first compiles the code into an obscure set of instructions that can be understood by the Apex runtime interpreter and then saves those instructions as metadata.
When an end-user triggers the execution of Apex, perhaps by clicking a button or reaching a visualforce page, the platform retrieves the compiled instructions from the application server metadata and passes them through the runtime interpreter before delivering the results. . The end-user sees no difference in execution time from standard platform requests.
Q. Can two users have the same profile?
Yes, two users have the same profile. In salesforce, one profile can be assigned to any number of users.
Q. Are virtualization and cloud computing the same thing?
No, both are not the same thing; In precise words, virtualization is technology whereas cloud computing is a methodology. To generate multiple simulated environments from a single piece of the underlying hardware. Cloud computing is a set of approaches to deliver data storage, computation power, infrastructure, etc. to on-demand users on a given network.
Q. How many times does Salesforce release updates every year?
Salesforce releases updates three times a year. They are called Spring, Summer, and Winter.