Apex Design Patterns

Harness the power of Apex design patterns to build robust and scalable code architectures on the Force.com platform
Preview in Mapt

Apex Design Patterns

Jitendra Zaa, Anshul Verma

1 customer reviews
Harness the power of Apex design patterns to build robust and scalable code architectures on the Force.com platform
Mapt Subscription
FREE
$29.99/m after trial
eBook
$25.20
RRP $35.99
Save 29%
Print + eBook
$44.99
RRP $44.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$25.20
$44.99
$29.99 p/m after trial
RRP $35.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 14 Day Trial

Frequently bought together


Apex Design Patterns Book Cover
Apex Design Patterns
$ 35.99
$ 25.20
Force.com Enterprise Architecture - Second Edition Book Cover
Force.com Enterprise Architecture - Second Edition
$ 47.99
$ 33.60
Buy 2 for $35.00
Save $48.98
Add to Cart

Book Details

ISBN 139781782173656
Paperback256 pages

Book Description

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

Table of Contents

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

What You Will Learn

  • Apply OOPs principal in Apex to design a robust and efficient solution to address various facets to a business problem
  • Get to grips with the benefits and applicability of using different design patterns in Apex
  • Solve problems while instantiating, structuring and giving dynamic behavior to Apex classes
  • Understand the implementation of creational, structural, behavioral, concurrency and anti-patterns in your application
  • Follow the Apex best practices to resolve governor limit issues
  • Get clued up about the Inheritance, abstract classes, polymorphism in Apex to deal with the object mechanism
  • Master various design patterns and determine the best out of them
  • Explore the anti patterns that could not be applied to Apex and their appropriate solutions

Authors

Table of Contents

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

Book Details

ISBN 139781782173656
Paperback256 pages
Read More
From 1 reviews

Read More Reviews

Recommended for You

Force.com Enterprise Architecture - Second Edition Book Cover
Force.com Enterprise Architecture - Second Edition
$ 47.99
$ 33.60
Visualforce Development Cookbook - Second Edition Book Cover
Visualforce Development Cookbook - Second Edition
$ 39.99
$ 28.00
Learning Apex Programming Book Cover
Learning Apex Programming
$ 26.99
$ 18.90
Salesforce Platform App Builder Certification Handbook Book Cover
Salesforce Platform App Builder Certification Handbook
$ 35.99
$ 25.20
Mastering Salesforce CRM Administration Book Cover
Mastering Salesforce CRM Administration
$ 43.99
$ 30.80
Salesforce CRM - The Definitive Admin Handbook - Fourth Edition Book Cover
Salesforce CRM - The Definitive Admin Handbook - Fourth Edition
$ 47.99
$ 33.60