Business logic in Force.com is developed in Apex, a programming language designed for the Force.com platform. Through Apex code, many platform features, such as the database and user interface, can be customized to meet the needs of individual users and companies.
This chapter introduces Apex as a language for writing business logic, specifically where it interacts with the Force.com database. It uses a combination of explanatory text and code snippets to introduce concepts and encourage experimentation. This approach assumes you’re already experienced in some other high-level, object-oriented programming language and would like to see for yourself how Apex is different.
The chapter consists of the following sections:
Introduction to Apex—Learn basic facts about Apex and how it differs from other programming languages.
Introducing the Force.com IDE—Take a brief tour of the Force.com IDE, a user interface for developing, debugging, and testing Apex code.
Apex language basics—Learn the building blocks of the Apex language, such as data types and loops.
Database integration in Apex—Incorporate the Force.com database into your Apex programs through queries, statements that modify data, and code executed automatically when data is changed.
Debugging Apex using Developer Console—With Developer Console, you can directly inspect the state of your Apex code as it runs.
Unit tests in Apex—Write tests for your code and run them in Developer Console.
Sample application—Walk through the implementation of a data validation rule for the Services Manager sample application.
3.16.50.60