Learning Salesforce Development with Apex: Write, Run and Deploy Apex Code with Ease
- Length: 254 pages
- Edition: 1
- Language: English
- Publisher: BPB Publications
- Publication Date: 2020-08-10
- ISBN-10: 9389898188
- ISBN-13: 9789389898187
- Sales Rank: #171821 (See Top 100 Books)
Learn to harness the power of the Apex language to build Salesforce applications
Key Features
- Learn how to work with the Apex language
- Learn how to develop Apex Triggers
- Learn how to use SOQL and SOSL to retrieve data
- Learn how to write Object-Oriented Salesforce code
- Explore the best practices to deliver scalable and maintainable code
Description
This book covers the fundamentals of the Salesforce Apex programming language used by developers to build powerful applications in the cloud.
In this book, you will learn how to work with the Apex language to build scalable applications that can interact with and update data from your users. We cover the language from the ground up, introducing programming concepts such as variables and control statements alongside clear and concise examples to help you understand the key concepts and features. Platform-specific features such as Apex triggers, SOQL and SOSL are covered in detail to help ensure you deliver robust and scalable solutions. Nuances and best practices for development are discussed along with how to effectively test your code to ensure that you can deploy it to users with confidence. Object-oriented programming in Apex is also covered in-depth to ensure that you can develop dynamic solutions and build for the future. The book also discusses and shows developers how to integrate with third-party solutions using REST APIs in Apex.
By the end of the book, the reader will know how to start developing applications using Apex with confidence.
What will you learn
- Learn how to declare variables in Apex.
- Understand how to work with collections in Apex.
- Use different control statements within Apex to control program flow.
- Learn how to use the built-in tools to test in Apex.
- Understand how to make callouts to external applications and data sources.
Who this book is for
This book is intended for those starting out with Apex, whether existing Salesforce Admins or those joining the Salesforce ecosystem with little professional prior programming experience, such as students. The reader is expected to have some basic familiarity with Salesforce as a platform, although key concepts are reviewed.
Cover Page Title Page Copyright Page Dedication Page About the Author Acknowledgements Preface Errata Table of Contents 1. An Introduction to the Salesforce Platform Structure Objectives The birth of the cloud Multi-tenancy The Salesforce database Objects and fields Permissions and sharing From clicks to code Workflow Rules Process Builder Flow Choose the right tool at the right time Conclusion Questions 2. What is Apex? Structure Objectives A definition of Apex Strong and weak typing Object-oriented programming Apex and other languages Executing Apex Anonymous blocks Triggers Controllers - Visualforce, Lightning, and JavaScript Remoting Asynchronous Apex Web Services Email Services Saving and compiling Apex Governor Limits The Developer Console and debug logs Conclusion 3. Variables in Apex Structure Objectives Primitives Blob Boolean Date Datetime Decimal Double Id Integer Long Object String Time Nulls Constants sObject, sObjects, and sObject instances DML Insert Update Upsert Delete Undelete Merge Enums Conclusion Questions 4. Collections Structure Objectives The importance of collections Lists Sets Maps Conclusion Questions 5. Control Statements and Operators Structure Objectives Operators Comparison operators Equality == Inequality != Greater Than > Greater Than or Equal To >= Less Than < Less Than or Equal To Logical operators AND operator && OR operator Not operator ! (logical complement) Assignment operators Addition assignment += Subtraction assignment -= Multiplicative assignment *= Divisive assignment /= Action operators Addition operator + Subtraction operator - Multiplication operator * Division operator / Increment operator Decrement operator -- Unary Negation operator - The if and if-else statements Ternary-if Switch statements The do-while loops The while loop For loops Conclusion Questions 6. Apex Triggers Structure Objectives What is an Apex trigger? Triggers vs. Workflow/Process Builder Types of Apex Trigger The save order of execution When to use each trigger type Before insert After insert Before update After update Before delete After delete After undelete Trigger context variables Our first trigger Bulkification of triggers An un-bulkified trigger Bulkifying our trigger Bulkification for success Conclusion Questions 7. SOQL Structure Objectives What is SOQL? The Force.com Query Optimizer SOQL statement structure Executing SOQL in Apex Using binding variables Aggregate functions and grouping Aggregate functions Grouping An updated trigger example Querying relationships Data from parent records Data from child records Dynamic queries Conclusion Questions 8. SOSL Structure Objectives SOSL structure Conclusion Questions 9. Apex Classes Structure Objectives Defining an Apex class Global Public Private Defining variables Defining properties Why do we need properties? Defining methods Don’t Repeat Yourself (DRY) Class constructors this keyword Overloading methods Static methods, variables, and blocks final variables Inner classes Keeping code DRY Selection wrappers Deserialization A detailed example Conclusion Questions 10. Apex Class Inheritance Structure Objectives Interfaces Defining an interface Implementing an interface Abstract classes Abstract methods Virtual methods Virtual classes Updated trigger handler The super keyword Conclusion Questions 11. Testing Apex Structure Objectives What is unit testing? Code coverage Defining a Unit Test What happens in a test? Writing our test Exception handling and testing exceptions Standard exceptions Custom exceptions Creating test data Using @TestSetup Test.startTest and Test.stopTest Conclusion Questions 12. Callouts in Apex Structure Overview REST vs. SOAP A brief overview of REST Calling our webservice Defining our inner class Posting data to the site Testing web services StaticResourceCalloutMock Custom HttpCalloutMock implementation Security and authentication Conclusion Questions 13. Conclusion
Donate to keep this site alive
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.