Hello Everyone, In this tutorial, I am going to describe the Apex programming language, which is used in Force.com platform.
After Completing this unit, you’ll be able to:
- Describe Apex programming language.
- Describe the key features of the Apex.
- Data types in Apex.
So let’s begin
Apex Programming language
Apex is a programming language developed by Salesforce.com. It's used Java-like syntax and acts like a database stored procedure. Being an object-oriented programming language it allows developers to execute flow and transaction control statements on Salesforce servers in conjunction with calls to the API. It provides a development platform for SaaS (software as a service) applications. Apex enables developers to add business logic for button clicks, updates of related records, and Visualforce pages.
Apex includes an API that developers can use to access user data on Salesforce.com. It hosted and run directly from Salesforce.com’s servers. So no installation necessary on a user’s local PC is because of this hosting.
Feature of Apex
- Saved, compiled and executed on the server-the Lightning Platform.
- It’s an objected oriented programming language that supports classes, interface, and inheritance.
- Apex is easy to use because it based on familiar Java idioms.
- Apex easy to test, provide built-in support for unit test creation, execution, and code coverage.
- Apex is strongly typed.
- Apex provides statement and query languages to manipulate database records.
- Apex versioned so the code can be saved different versions of the API.
- It provides transactional access to the database that allows you to roll back operations.
Apex Language highlights
There are some of the language constructs that Apex supports:
- Object and array notation.
- Conditional statements like if-then-else and control flow statements such as for and while loops).
- Classes, interfaces, properties, and collections (including arrays).
- Expressions, variables, and constants.
Like other object-oriented programming languages, Apex supports:
- Versioning support for the code.
- Apex is stored, compiled, and executed in the cloud that supports cloud development.
- Support query language to query data and database statement that make direct database calls.
- The access modifiers such as global and public.
- Transactions and Rollbacks.
Apex Datatypes
Apex supports the following data types.
- Primitive data type like Integer, Double, Long, Date, DateTime, String, ID, or Boolean.
- Collection data types like Lists, Sets, and Maps
- sObjects and List of sObjects
- Classes, Objects, and Interfaces.
- Typed list of values, known as an enum.
Development Tools
For writing apex following types of development tools:
Developer Console: In Salesforce user interface, open the Developer console under your name. It directly runs in the browser.
Force.com IDE plugin for Eclipse: Apex is also written on a client-side by using Force.com IDE plugin for Eclipse.
See also:
- Apex Trigger in Salesforce
- With Sharing and Without Sharing in Salesforce Ape
- Enum in Salesforce Apex
Conclusion:
Hope you like this tutorial, for any query or suggestions please feel free to comment.
Thank you.
0 Comments
Post a Comment