Book Image

Learning Force.com Application Development

By : Chamil Madusanka
Book Image

Learning Force.com Application Development

By: Chamil Madusanka

Overview of this book

Table of Contents (21 chapters)
Learning Force.com Application Development
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Writing Apex code – object-oriented programming in Apex


As in most OOP languages, classes are templates through which objects are instantiated that contain attributes and methods. Class methods or attributes can be invoked by other Apex scripts within the same organization except methods that have the webservice keyword. The webservice methods are available externally to the organization. Classes are stored with the version of the API used to compile them. Classes have an isValid flag that is true if dependent metadata has not changed since compilation. Classes may contain one level of inner classes. Inner class is a way of organizing the classes (same as the package in Java).

Creating Apex code

Apex classes can be created and edited through the Setup menu of the organization and Force.com IDE and Developer Console. You can interact with Apex classes via the setup page by navigating to Setup | Develop | Apex Classes. You will see the following screenshot:

Landing page of Apex classes

You can...