Home Page Icon
Home Page
Table of Contents for
Force.com Enterprise Architecture - Second Edition
Close
Force.com Enterprise Architecture - Second Edition
by Andrew Fawcett
Force.com Enterprise Architecture - Second Edition
Force.com Enterprise Architecture - Second Edition
Table of Contents
Force.com Enterprise Architecture - Second Edition
Credits
Foreword
About the Author
Acknowledgements
About the Reviewers
www.PacktPub.com
eBooks, discount offers, and more
Why subscribe?
Instant updates on new Packt books
Customer Feedback
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Deploying the source code
Downloading the color images of this book
Errata
Piracy
Questions
1. Building, Publishing, and Supporting Your Application
Required organizations
Introducing the book's sample application
Package types and benefits
Features and benefits of managed packages
Creating your first managed package
Setting your package namespace
Creating the package and assigning it to the namespace
Adding components to the package
Extension packages
Package dependencies and uploading
Uploading the release and beta packages
Optional package dependencies
Dynamic bindings
Extension packages
Becoming a Salesforce partner and benefits
Security review and benefits
Getting the best out of the Partner Community
Creating test and developer orgs via Environment Hub
Introduction to AppExchange and listings
Installing and testing your package
Automating package installation
Licensing
The Licenses tab and managing customer licenses
The Subscribers tab
The Subscriber Overview page
How licensing is enforced in the subscriber org
Providing support
Customer metrics
Trialforce and Test Drive
Distributing Salesforce Connected Apps
Summary
2. Leveraging Platform Features
Packaging and upgradable components
Custom field – picklist values
Global Picklists
Automating upgrades with the Salesforce Metadata API
Understanding the custom field features
Default field values
Encrypted fields
Special considerations for Platform Encryption
Lookup options, filters, and layouts
Rollup summaries and limits
Understanding the available security features
Functional security
Your code and security review considerations
Data security
Your code and security review considerations
Platform APIs
Considerations for working well with OK platforms APIs
Localization and translation
Localization
Translation
Building customizable user interfaces
Layouts
Visualforce
Lightning App Builder and Components
E-mail customization with e-mail templates
Process Builder, Workflow and Flow
Social features and mobile
Summary
3. Application Storage
Mapping out end user storage requirements
Understanding the different storage types
Data storage
Columns versus rows
Visualizing your object model
Considerations for configuration data
Custom Metadata Type storage
Custom Settings storage
File storage
Record identification, uniqueness, and auto numbering
Unique and external ID fields
Auto Number fields
Subscribers customizing the Auto Number Display Format
Record relationships
Reusing the existing Standard Objects
Importing and exporting data
Options for replicating and archiving data
External data sources
Summary
4. Apex Execution and Separation of Concerns
Execution contexts
Exploring execution contexts
Execution context and state
Platform Cache
Execution context and security
Execution context transaction management
Apex governors and namespaces
Namespaces and governor scope
Deterministic and non-deterministic governors
Key governors for Apex package developers
Where is Apex used?
Separation of Concerns
Apex code evolution
Separating concerns in Apex
Separation of concerns in Lightning Component JavaScript
Execution context logic versus application logic concerns
Improving incremental code reuse
Patterns of Enterprise Application Architecture
The Service layer
The Domain Model layer
The Data Mapper (Selector) layer
Introducing the FinancialForce.com Apex Commons library
Unit testing versus system testing
Packaging the code
Summary
5. Application Service Layer
Introducing the Service layer pattern
Implementation of design guidelines
Naming conventions
Bulkification
Sharing rules enforcement
Defining and passing data
Considerations when using SObject in the Service layer interface
Transaction management
Compound services
A quick guideline checklist
Handling DML with the Unit Of Work pattern
Without a Unit Of Work
With Unit Of Work
The Unit Of Work scope
Unit Of Work special considerations
Services calling services
Contract Driven Development
Testing the Service layer
Mocking the Service layer
Calling the Service layer
Updating the FormulaForce package
Summary
6. Application Domain Layer
Introducing the Domain layer pattern
Encapsulating an object's behavior in code
Interpreting the Domain layer in Force.com
Domain classes in Apex compared to other platforms
Implementation design guidelines
Naming conventions
Bulkification
Defining and passing data
Transaction management
Domain class template
Implementing Domain Trigger logic
Routing trigger events to Domain class methods
Enforcing object security
Default behavior
Overriding the default behavior
Apex Trigger event handling
Defaulting field values on insert
Validation on insert
Validation on update
Implementing custom Domain logic
Object-oriented programming
Creating a compliance application framework
An Apex interface example
Step 5 – defining a generic service
Step 6 – implementing the domain class interface
Step 7 – the domain class factory pattern
Step 8 – implementing a generic service
Step 9 – using the generic service from a generic controller
Generic Compliance Verification UI with Visualforce
Generic Compliance Verification UI with a Lightning Component
Summarizing compliance framework implementation
Testing the Domain layer
Unit testing
Test methods using DML and SOQL
Test methods using the Domain class methods
Calling the Domain layer
Service layer interactions
Domain layer interactions
Updating the FormulaForce package
Summary
7. Application Selector Layer
Introducing the Selector layer pattern
Implementing design guidelines
Naming conventions
Bulkification
Record order consistency
Querying fields consistently
The Selector class template
Implementing the standard query logic
Standard features of the Selector base class
Enforcing object and field security
Default behavior
Overriding the default behavior
Ordering
Field Sets
Multi-Currency
Implementing custom query logic
A basic custom Selector method
A custom Selector method with subselect
A custom Selector method with related fields
A custom Selector method with a custom data set
Combining Apex data types with SObject types
SOSL and Aggregate SOQL queries
Introducing the Selector factory
SelectorFactory methods
Writing tests and the Selector layer
Updating the FormulaForce package
Summary
8. User Interface
Which devices should you target?
Introducing Salesforce Standard UIs and Lightning
Why consider Visualforce over the Lightning Framework?
Leveraging the Salesforce standard UIs
Overriding standard Salesforce UI actions
Combining standard UIs with custom UIs
Embedding a custom UI in a standard UI
Embedding a standard UI in a custom UI
Extending the Salesforce standard UIs
Visualforce Pages
Lightning Components
Generating downloadable content
Generating printable content
Overriding the page language
Client server communication
Client communication options
API governors and availability
Database transaction scope and client calls
Offline support
Managing limits
Object and field-level security
Enforcing security in Visualforce
Managing performance and response times
Lightning tools to monitor size and response times
Visualforce Viewstate size
Considerations for managing large component trees
Using the Service layer and database access
Considerations for client-side logic and Service layer logic
When should I use JavaScript for database access?
Considerations for using JavaScript libraries
Custom Publisher Actions
Creating websites and communities
Mobile application strategy
Custom reporting and the Analytics API
Updating the FormulaForce package
Summary
9. Lightning
Building a basic Lightning user interface
Introduction to Lightning Design System
Building your first component
How does Lightning differ from other UI frameworks?
Lightning architecture
Containers
Introducing the Racing Overview Lightning app
Lightning Experience and Salesforce1
Components
Separation of concerns
Encapsulation during development
Component markup (.cmp)
Component controller (…Controller.js)
Component Helper (…Helper.js)
Component CSS (.css)
Component Render (…Renderer.js)
Component Design (.design) and Component SVG (.svg)
Component Documentation (.auradoc)
Enforcing encapsulation and security at runtime
Expressing behavior
Access Control
Methods, events and interfaces
Platform namespaces
Base components
Data services
Object-oriented programming
Object-Level and Field-Level security
FormulaForce Lightning Components
RaceStandings component
RaceCalendar component
RaceResults component
RaceSetup component
Making components customizable
Integrating with Lightning Experience
Using Components on Lightning Pages and Tabs
Lightning Out and Visualforce
Integrating with communities
Testing
Updating the FormulaForce package
Summary
10. Providing Integration and Extensibility
Reviewing your integration and extensibility needs
Defining the Developer X persona
Versioning
Versioning the API definition
Versioning application access through the Salesforce APIs
Versioning the API functionality
Translation and localization
Terminology and platform alignment
What are your application's integration needs?
Developer X calling your APIs on-platform
Developer X calling your APIs off-platform
SOAP versus REST
What are your applications extensibility needs?
Force.com platform APIs for integration
Application integration APIs
Providing Apex application APIs
Calling an application API from Apex
Modifying and depreciating the application API
Versioning Apex API definitions
Versioning Apex API behavior
Providing RESTful application APIs
Key aspects of being RESTful
What are your application resources?
Mapping HTTP methods
Providing Apex REST application APIs
Calling your Apex REST application APIs
Versioning Apex REST application APIs
Behavior versioning
Definition versioning
Exposing Lightning Components
Extending Process Builder and Visualflow
Versioning Invocable Methods
Alignment with Force.com extensibility features
Extending the application logic with Apex interfaces
Summary
11. Asynchronous Processing and Big Data Volumes
Creating test data for volume testing
Using the Apex script to create the Race Data object
Indexes, being selective, and query optimization
Standard and custom indexes
Ensuring queries leverage indexes
Factors affecting the use of indexes
Profiling queries
Skinny tables
Handling large result sets
Processing 50k maximum result sets in Apex
Processing unlimited result sets in Apex
Generating more Race Data
Leveraging Visualforce and the Apex read-only mode
Processing unlimited result sets using Salesforce APIs
Asynchronous execution contexts
General async design considerations
Running Apex in the asynchronous mode
@future
Queueables
Batch Apex
Performance of Batch Apex jobs
Using external references in Apex DML
Volume testing
Summary
12. Unit Testing
Comparing Unit testing and Integration Testing
Introducing Unit Testing
Dependency Injection, Mocking, and Unit Testing
Deciding what to test and what not to test for in a Unit test
Constructor Dependency Injection
Implementing Unit tests with CDI and Mocking
Other Dependency Injection approaches
Benefits of Dependency Injection Frameworks
Writing Unit Tests with the Apex Stub API
Implementing Mock classes using Test.StubProvider
Creating dynamic stubs for mocking classes
Mocking Examples with the Apex Stub API
Considerations when using the Apex Stub API
Using Apex Stub API with Mocking Frameworks
Understanding how ApexMocks works
ApexMocks Matchers
ApexMocks and Apex Enterprise Patterns
Unit Testing a Controller Method
Unit Testing a Service Method
Unit Testing a Domain method
Unit Testing a Selector Method
Summary
13. Source Control and Continuous Integration
Development workflow and infrastructure
Salesforce Developer Experience (DX)
Packaging org versus sandbox versus developer org
Creating and preparing your developer orgs
The developer workflow
Developing with Source Control
Populating your Source Control repository
The Ant build script to clean and build your application
Developing in developer orgs versus packaging orgs
Leveraging the Metadata API and Tooling APIs from Ant
Updating your Source Control repository
Browser-based development and Source Control
Desktop-based development and Source Control
Hooking up Continuous Integration
The Continuous Integration process
Updating the Ant build script for CI
Installing, configuring, and testing the Jenkins CI server
Exploring Jenkins and CI further
Releasing from Source Control
Automated regression testing
Summary
Index
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
Table of Contents
Next
Next Chapter
Force.com Enterprise Architecture - Second Edition
Force.com Enterprise Architecture - Second Edition
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset