-
Apex design patterns
- 點閱:19
- 作者: Jitendra Zaa, Anshul Verma
- 出版社:Packt Publishing Ltd.
- 出版年:2016
- ISBN:9781782173656; 9781782173663
- 格式:EPUB 流式,PDF,JPG
Apex is an on-demand programming language providing a complete set of features for building business applications – including data models and objects to manage data. Apex being a proprietor programming language from Salesforce to be worked with multi tenant environment is a lot different than traditional OOPs languages like Java and C#. It acts as a workflow engine for managing collaboration of the data between users, a user interface model to handle forms and other interactions, and a SOAP API for programmatic access and integration.
Apex Design Patterns gives you an insight to several problematic situations that can arise while developing on Force.com platform and the usage of Design patterns to solve them. Packed with real life examples, it gives you a walkthrough from learning design patterns that Apex can offer us, to implementing the appropriate ones in your own application. Furthermore, we learn about the creational patterns that deal with object creation mechanism and structural patterns that helps to identify the relationship between entities. Also, the behavioural and concurrency patterns are put forward explaining the communication between objects and multi-threaded programming paradigm respectively. We later on, deal with the issues regarding structuring of classes, instantiating or how to give a dynamic behaviour at a runtime, with the help of anti-patterns. We learn the basic OOPs principal in polymorphic and modular way to enhance its capability. Also, best practices of writing Apex code are explained to differentiate between the implementation of appropriate patterns. This book will also explain some unique patterns that could be applied to get around governor limits.
By the end of this book, you will be a maestro in developing your applications on Force.com for Salesforce
- Preface
- Chapter 1 : An Introduction to Apex Design Pattern
- Innovation
- Design patterns and learning
- Object - Oriented Programming (OOP)
- OOPs in play
- An interface
- An abstract class
- Advantages of design patterns
- Design patterns and Apex
- Gang of Four (GoF)
- The SOLID principle
- Summary
- Chapter 2 : Creational Patterns
- Factory method pattern
- Abstract factory pattern
- The singleton pattern
- The builder pattern
- The prototype pattern
- Summary
- Chapter 3 : Structural Patterns
- The facade pattern
- The adapter pattern
- The bridge pattern
- The composite pattern
- The decorator pattern
- The flyweight pattern
- Summary
- Chapter 4 : Behavioral Patterns
- The chain of responsibility pattern
- The command pattern
- The interpreter pattern
- The iterator pattern
- The visitor pattern
- The memento pattern
- The observer pattern
- The state pattern
- The strategy pattern
- Summary
- Chapter 5 : Handling Concurrency in Apex
- Understanding concurrency issues
- Reproducing concurrency problems in Apex
- The active object pattern
- Summary
- Chapter 6 : Anti-patterns and Best Practices
- Over usage of formula fields
- Functional decomposition
- Ignoring the equals() and hashcode() methods while performing object comparison
- Circular dependencies
- The ignoring toString() method
- Avoid the God class
- Error hiding
- Hard-coding
- Magic strings and numbers
- Inheritance hell
- SOQL inside a loop
- DML inside a loop
- Summary
- Index