Book Image

Salesforce Lightning Platform Enterprise Architecture - Third Edition

By : Andrew Fawcett
Book Image

Salesforce Lightning Platform Enterprise Architecture - Third Edition

By: Andrew Fawcett

Overview of this book

Salesforce Lightning provides a secure and scalable platform to build, deploy, customize, and upgrade applications. This book will take you through the architecture of building an application on the Lightning platform to help you understand its features and best practices, and ensure that your app keeps up with your customers’ increasing needs as well as the innovations on the platform. This book guides you in working with the popular aPaaS offering from Salesforce, the Lightning Platform. You’ll see how to build and ship enterprise-grade apps that not only leverage the platform's many productivity features, but also prepare your app to harness its extensibility and customization capabilities. You'll even get to grips with advanced application architectural design patterns such as Separation of Concerns, Unit Testing and Dependency Integration. You will learn to use Apex and JavaScript with Lightning Web Components, Platform Events, among others, with the help of a sample app illustrating patterns that will ensure your own applications endure and evolve with the platform. Finally, you will become familiar with using Salesforce DX to develop, publish, and monitor a sample app and experience standard application life cycle processes along with tools such as Jenkins to implement CI/CD. By the end of this book, you will have learned how to develop effective business apps and be ready to explore innovative ways to meet customer demands.
Table of Contents (17 chapters)

What this book covers

Chapter 1, Building and Publishing Your Application, gets your application out to your prospects and customers using packages, AppExchange, and subscriber's support.

Chapter 2, Leveraging Platform Features, ensures that your application is aligned with the platform features and uses them whenever possible, which is great for productivity when building your application, but—perhaps more importantly—it ensures that your customers are also able to extend and integrate with your application further.

Chapter 3, Application Storage, teaches you how to model your application's data to make effective use of storage space, which can make a big difference to your customer's ongoing costs and initial decision making when choosing your application.

Chapter 4, Apex Execution and Separation of Concerns, explains how the platform handles requests and at what point Apex code is invoked. It is important to understand how to design your code for maximum reuse and durability.

Chapter 5, Application Service Layer, focuses on understanding the real heart of your application: how to design it, make it durable, and future proof it around a rapidly evolving platform using Martin Fowler's Service pattern as a template.

Chapter 6, Application Domain Layer, aligns Apex code typically locked away in Apex Triggers into classes more aligned with the functional purpose and behavior of your objects, using object-orientated programming (OOP) to increase reuse and streamline code and leverage Martin Fowler's Domain pattern as a template.

Chapter 7, Application Selector Layer, leverages SOQL to make the most out of the query engine, which can make queries complex. Using Martin Fowler's Mapping pattern as a template, this chapter illustrates a means to encapsulate queries, making them more accessible and reusable, and making their results more predictable and robust across your code base.

Chapter 8, Building User Interfaces, covers the concerns of an enterprise application user interface with respect to translation, localization, and customization, as well as the pros and cons of the various UI options available in the platform.

Chapter 9, Using Interfaces with Lightning Framework, explains the architecture of this modern framework for delivering rich client-device agnostic user experiences, from a basic application through to using component methodology to extend Lightning Experience and Salesforce1 Mobile.

Chapter 10, Providing Integration and Extensibility, explains how enterprise-scale applications require you to carefully consider integration with existing applications and business needs while looking to the future by designing the application with extensibility in mind.

Chapter 11, Asynchronous Processing and Big Data Volumes, shows that designing an application that processes massive volumes of data, either interactively or asynchronously, requires consideration in understanding your customer's volume requirements and leverages the latest platform tools and features, such as understanding the query optimizer and when to create indexes.

Chapter 12, Unit Testing, explores the differences and benefits of unit testing versus system testing. This aims to help you understand how to apply dependency injection and mocking techniques to write unit tests that cover more code scenarios and run faster. You will also look at leveraging practical examples of using the Apex Stub API with the ApexMocks open source library and testing client logic with the Jest open source library.

Chapter 13, Source Control and Continuous Integration, shows that maintaining a consistent code base across applications of scale requires careful consideration of source control and a planned approach to integration as the application is developed and implemented.

Chapter 14, Integrating with External Services, explores how you and your customers can extend your application securely with services and data hosted outside of the Lightning Platform, using both code and configuration tools such as Flow.

Chapter 15, Adding AI with Einstein, explores services and features provided by Salesforce in order for you and your customers to add AI and machine learning capabilities to your application and its data.