售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Force.com Enterprise Architecture
Table of Contents
Force.com Enterprise Architecture
Credits
Foreword
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Instant updates on new Packt books
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
Downloading the source 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 Apex and Visualforce
Extension packages
Introduction to AppExchange and listings
Installing and testing your package
Automating package installation
Becoming a Salesforce partner and benefits
Security review and benefits
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
Summary
2. Leveraging Platform Features
Packaging and upgradable components
Custom field – picklist values
Automating upgrades with the Salesforce Metadata API
Understanding the custom field features
Default field values
Encrypted fields
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 when naming objects and fields
Localization and translation
Localization
Translation
Building customizable user interfaces
Layouts
Visualforce
E-mail customization with e-mail templates
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
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
Execution context and security
Execution context transaction management
Apex governors and namespaces
The 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
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
The packaging code
Summary
5. Application Service Layer
Introducing the Service layer pattern
Implementation of design guidelines
Naming conventions
Bulkification
Defining and passing data
Considerations when using SObjects 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
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
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 selectSObjectsById method
Security
Ordering
Field Sets
Multi-Currency
Implementing the custom query logic
A basic custom Selector method
A custom Selector method with sub-select
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
Usage and reasons for the newInstance method
Writing tests and the Selector layer
Mocking Selectors
Step 1 – using the Application.Selector.newInstance approach
Step 2 – applying virtual and @TestVisible
Step 3 – creating a mock Selector class
Step 4 – writing a test with Application.Selector.setMock
Which type of Selector methods cannot be mocked?
Updating the FormulaForce package
Summary
8. User Interface
What devices should you target?
Leveraging the Salesforce standard UI
Overriding the standard Salesforce UI
Hybrid standard and Visualforce UIs
Custom Buttons and Related lists
Rendering the standard UI within a Visualforce page
Translation and localization
Client communication layers
Client communication options
API governors and availability
Database transaction scope and client calls
Visualforce
What can I do within a Visualforce page?
Executing the code on page load with the action attribute
Caching content with the cache and the expires attributes
Creating a Download button with the contentType attribute
Overriding the language of the page with the language attribute
HTML5 and the docType attribute
Offline Visualforce pages with the manifest attribute
Generating PDF content with the renderAs attribute
Visualforce SOQL, iterator limits, and the readOnly attribute
Field-level security
Page response time and components
Demonstrating a large component tree
Considerations for managing large component trees
Client-managed state versus server-managed state
Action methods versus JavaScript Remoting
Mixing the use of action methods and JavaScript Remoting
Applying JavaScript Remoting to the Service layer
Considerations for client-side logic and Service layer logic
When should I use JavaScript Remote Objects?
Client-side alternatives to Visualforce UI components
Salesforce Aura
Custom Publisher Actions
Creating websites
Mobile strategy
Custom Reporting and the Analytics API
Updating the FormulaForce package
Summary
9. 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 REST application APIs
Calling your REST application APIs
Versioning REST APIs
Is it worth versioning Apex REST APIs?
Alignment with Force.com extensibility features
Extending the application logic with Apex Interfaces
Summary
10. 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 results 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 the Salesforce APIs
Asynchronous execution contexts
General async design considerations
Running Apex in the asynchronous mode
@future
Batch Apex
Performance of Batch Apex jobs
Using external references in Apex DML
Volume testing
Summary
11. Source Control and Continuous Integration
Development workflow and infrastructure
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
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜