Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Apex Design Patterns

You're reading from  Apex Design Patterns

Product type Book
Published in Apr 2016
Publisher
ISBN-13 9781782173656
Pages 256 pages
Edition 1st Edition
Languages
Authors (2):
Anshul Verma Anshul Verma
Profile icon Anshul Verma
Jitendra Zaa Jitendra Zaa
Profile icon Jitendra Zaa
View More author details

Avoid the God class


This is one of the very common issues in application development, where a class either has too many lines of code or knows too much about the application or plays too many roles in an application. This type of a class is known as the God class. For example, it is a best practice that triggers should not contain business logic, and therefore we create helper classes. Sometimes, we create utility classes as well. By the time the development phase of a project progresses, these classes become huge and are referred to by many other classes. In such situations, refactoring of code becomes very tough and may break other parts of the application. As expected, developers avoid changing anything that exists in the God class, and therefore these types of classes contain many lines of code, which may not be used anywhere.

Tip

If this class is used indirectly by any Apex scheduled jobs, then it is serialized, and further updating the class is restricted by the platform while a job...

lock icon The rest of the chapter is locked
arrow left Previous Chapter
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at ₹800/month. Cancel anytime}