salesforce dev 501 Notes
Visualforce – know all of the components, how they are used and their attributes Controllers – know the differences between custom controllers and extensions and how they function Unit testing – how to write unit tests with proper test coverage Email services – there were surprisingly numerous questions regarding inbound and outbound email SOQL – you must know how to construct SOQL queries with and without related objects ### Salesforce Dev 501 Notes #### Visualforce Visualforce is a framework for building custom user interfaces on the Salesforce platform. It provides a robust set of components that developers can use to create dynamic and interactive pages. These components include: - **Standard Components**: These are pre-built UI elements like text boxes, buttons, picklists, etc., which can be easily customized using attributes. - **Layout Components**: Components like panels, tabs, and layouts help in structuring the page's layout and content. - **Custom Components**: Developers can create their own reusable components by extending the `Component` class or other existing components. - **Apex Components**: These are components that are directly tied to Apex classes and methods. Understanding how to use these components effectively is crucial for creating visually appealing and functional user interfaces. Attributes control various aspects of a component, such as its appearance, behavior, and data binding. For instance, the `<apex:inputText>` component has an attribute called `value` that binds to a property in the controller. ### Controllers Controllers are the backbone of any Visualforce application, handling business logic and managing data flow between the UI and the database. There are two types of controllers: - **Custom Controllers**: These are Apex classes that implement the `Controller` interface. They provide methods to manage the data displayed on a Visualforce page. - **Controller Extensions**: These extend the functionality of a custom controller. They inherit from the `ActionSupport` class and can override or add new methods to the base controller. Understanding the differences between these two is important for effective development. Custom controllers are used when you need complete control over the data retrieval and processing, while controller extensions provide a way to extend an existing controller without modifying its original code. ### Unit Testing Unit testing is a critical aspect of software development, ensuring that individual units of code (such as methods or classes) work as expected. In Salesforce, unit tests are written using the Apex programming language. Here are some key points about unit testing: - **Test Coverage**: To ensure code quality and maintainability, Salesforce requires a minimum test coverage threshold (typically 75%) for code to be deployed. - **Mock Data**: Creating mock data is essential for simulating different scenarios and edge cases during testing. - **Assertions**: Using assertions to check the expected outcome of operations helps catch errors early in the development process. - **Isolation**: Tests should run in isolation from each other to prevent unintended side effects. ### Email Services Email services in Salesforce allow organizations to send and receive emails programmatically. Key areas to understand include: - **Inbound Emails**: This involves receiving emails into Salesforce. Common use cases include processing customer support tickets or sales leads through email. - **Outbound Emails**: Sending emails from Salesforce can be done using various methods, including the `Messaging` class and templates. - **Email Templates**: Templates can be created using HTML and Visualforce tags, allowing for dynamic content generation based on data in the system. ### SOQL (Salesforce Object Query Language) SOQL is a proprietary query language used in Salesforce to retrieve and update data stored in Salesforce objects. Key concepts to master include: - **Basic Queries**: Simple SELECT statements to retrieve records. - **Joins**: Retrieving data from multiple related objects using JOIN clauses. - **Filtering**: Using WHERE clauses to filter records based on specific criteria. - **Sorting and Limiting**: ORDER BY and LIMIT clauses to sort and limit the number of records returned. - **Aggregation**: SUM, AVG, COUNT, etc., for performing calculations on data. Constructing efficient SOQL queries is crucial for optimizing performance and ensuring accurate data retrieval. ### Triggers Triggers are Apex code blocks that execute automatically before or after data manipulation operations (like insert, update, delete, or undelete). Important considerations include: - **Trigger Order of Execution**: Understanding the order in which triggers execute is crucial for avoiding unexpected behaviors. - **Governance Limits**: Triggers must be designed to handle large volumes of data within the execution limits imposed by Salesforce. - **Best Practices**: Avoiding common pitfalls like infinite loops or excessive DML operations ensures that triggers perform efficiently and reliably. ### Classes, Methods, and Annotations These are fundamental building blocks of Apex code. Key concepts include: - **Classes**: Define the structure and behavior of objects. - **Methods**: Functions within classes that perform specific tasks. - **Annotations**: Metadata used to configure Apex classes, methods, and triggers. Examples include `@RemoteAction` for remote actions and `@InvocableMethod` for Invocable Apex. ### Migration Tool The Force.com Migration Tool is a powerful utility for moving metadata between local directories and Salesforce environments. It supports files such as: - **Apex Classes**: Code files that define custom business logic. - **Triggers**: Files containing trigger logic. - **Visualforce Pages**: UI files that use the Visualforce markup language. - **Metadata XML Files**: Configuration files that describe the structure and properties of various components. The tool is particularly useful in scenarios where you need to automate the deployment of a large amount of setup changes, making it faster and more reliable than manual entry. ### Development Lifecycle Understanding the development lifecycle is essential for effective project management. Key features and tools include: - **Point-and-Click Setup Tools**: These enable users to customize Salesforce without coding, such as setting up fields, relationships, and workflows. - **Data Components**: Custom objects, fields, and relationships are central to storing and organizing data. - **Business Logic Components**: Formula fields, validation rules, workflow rules, and approval processes automate business processes. - **Security and Permission Settings**: Controlling access to data and features is crucial for maintaining data integrity and security. - **User Interface Components**: Tabs, page layouts, custom views, reports, and dashboards enhance usability and provide insights. - **Visualforce and Apex**: For developing complex applications that go beyond point-and-click customization. - **Force.com Sites**: For building external websites and portals. - **Salesforce Mobile**: For enabling mobile access to Salesforce data and functionality. - **The Web Services API**: For integrating Salesforce with external systems. - **The Bulk API**: For handling large data loads efficiently. - **The Force.com Migration Tool**: For automating metadata deployment across environments. By mastering these concepts and tools, developers can build robust, scalable, and secure applications on the Salesforce platform.
剩余41页未读,继续阅读
- styfwz2014-06-12这篇note上传于2011年,所以有些信息已经过时了,比如Sandbox的类型,调用apex的方式。现在的501考试在知识点上也有所补充,比如这边没有涵盖到的email service。但是这个note种仍有很多知识点细节对于我这样准备501考试的人很有帮助,是我平时所没有注意到的。建议把这篇note作为一个补充材料在考前复习的时候读,仍以Salesforce的文档为主
- 粉丝: 3
- 资源: 13
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助