Apex

{{stub}}{{language|Apex}} {{language |exec=bytecode |site=http://developer.salesforce.com |gc=yes |parampass=value |safety=safe |express=explicit |compat=nominative |checking=static |strength=strong |tags=Apex, Salesforce, Visualforce |LCT=yes}} {{language programming paradigm|Object-oriented}} {{language programming paradigm|Imperative}} {{language programming paradigm|generic}} {{language programming paradigm|reflective}}[[runs on force.com| ]] The '''Apex''' programming language, developed by [[Salesforce.com]], is a the world's first on-demand programming language that provides a complete set of features for building business applications – including data models and objects to manage data, a workflow engine for managing collaboration of that data between users, a user interface model to handle forms and other interactions, and wide variety of API's for programmatic access and integration.

Apex Code extends the powerful and proven success of the Force.com platform by introducing the ability to write code that runs on salesforce.com servers. The language enables a new class of applications and features to be developed and deployed entirely on demand. These applications make existing Force.com apps “smarter” by providing the ability to capture business logic and rules – such as data validation – and make entirely new kinds of apps possible on demand – such as complex inventory checking and order fulfillment. Among the concepts behind Apex Code, two provide an especially good introduction to the language’s potential and implementation.

Some of the Apex features and functionality:

  • '''Hosted—Apex''' is saved, compiled, and executed on the server—the Force.com platform.
  • '''Automatically''' upgradeable—Because compiled code is stored as metadata in the platform, Apex is automatically upgraded as part of Salesforce releases.
  • '''Object oriented—Apex''' supports classes, interfaces, and inheritance.
  • '''Strongly typed—Apex''' validates references to objects at compile time.
  • '''Multitenant aware'''—Because Apex runs in a multitenant platform, it guards closely against runaway code by enforcing limits, which prevent code from monopolizing shared resources.
  • '''Integrated with the database'''—It is straightforward to access and manipulate records. Apex provides direct access to records and their fields, and provides statements and query languages to manipulate those records.
  • '''Data focused—Apex''' provides transactional access to the database, allowing you to roll back operations.
  • '''Easy to use—Apex''' is based on familiar Java idioms.
  • '''Easy to test—Apex''' provides built-in support for unit test creation, execution, and code coverage. Salesforce ensures that all custom Apex code works as expected by executing all unit tests prior to any platform upgrades.
  • '''Versioned—Custom''' Apex code can be saved against different versions of the API.

Useful Apex Programming links:

  • [http://developer.salesforce.com Salesforce Developers]

Tasks