Showing posts with label future method. Show all posts
Showing posts with label future method. Show all posts

Wednesday, 17 October 2018

Topics to study for Development Lifecycle and Deployment Designer exam


As I started the System Architect journey, I found some topics to be more vital in succeeding the exam. Even though there may be a lot on the certification on Trailmix already, but here are some that I would particularly like to mention:

Components of Governance Framework:

Three elements of a responsive and adaptable framework for governance

1 - Center of Excellence:

A few stakeholders from different functional groups work together to ensure that changes support business goals and follow IT best practices and processes. Teams that can be part of COE: 


COE


2- Release Management:

Set up a release schedule and defining criteria for major versus minor releases.
Releases typically fall into one of the following categories: Daily, Minor, Major

Daily: Bug fixes and simple changes that do not require formal release management, including reports, dashboards, list views, email templates, and user administration.

Minor: Changes with limited impact, such as a new workflow rule or trigger impacting a single business process. These releases typically require testing, but limited training and change management, and are delivered within a few weeks.

Major: Changes with significant impact, including configuration and code changes with one or more dependencies

release

3- Design Standards: 

Its important to have design standards for the following keys areas: Coding, Testing, Integration, Handling Large data Volumes and Documentation.

Some examples of design standards include:
  • Standard naming conventions
  • Consistently using the Description field
  • Bulkified code
  • Standard methods for deprecating classes and fields
  • Consistent data architecture across all projects

Metadata API:

Here are some key points. You can find all details here
  • Use Metadata API to retrieve, deploy, create, update or delete customization information, such as custom object definitions and page layouts, for your organization.
  • List of Components which are not supported in Metadata API. Details here 
  • You can deploy or retrieve up to 10,000 files at once and the maximum size of the deployed or retrieved .zip file is 39 MB.
  • The size and complexity of the metadata components affect the deployment time. 

Sandbox License and Storage by Type:

You can create different sandbox environments for your org, depending on your needs for storage, copy configuration, and frequency of refresh. Details here

sandbox


Application Lifecycle Management:

Salesforce provides various development tools and processes to meet the needs of customers. This module introduces the application lifecycle management (ALM) process and the three development models. Details here
  1. Change set development
  2. Org development
  3. Package development
applicationlifecyle


Useful links:

Effective Change Management

Change Set  Development Model

Force.com IDE Basic

Governance Basics

I hope this information is useful for getting you through the exam. Feel free to comment below if you require further details. Good luck on the exam! 

Thursday, 3 May 2012

Future Methods in Salesforce

Future annotation is used to identify methods that are executed asynchronously. When you specify future, the method executes when Salesforce has available resources.

For example, you can use the future annotation when making an asynchronous Web service callout to an external service. Without the annotation, the Web service callout is made from the same thread that is executing the Apex code, and no additional processing can occur until the callout is complete (synchronous processing).

 global class MyFutureClass {  
 @future   
   public static void myMethod() {  
     EmailClass.SendEmailNotification();  
     //do callout, other long running code  
   }  
 }  
Email Class
 global class EmailClass{  
   WebService static void SendEmailNotification() {  
     //create a mail object to send a single email.  
     Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();  
     //set the email properties  
     mail.setToAddresses(new string[] {'wahib.idris@xyz.com'});  
     mail.setSenderDisplayName('SF.com Email Agent');  
     mail.setSubject('A new reminder');  
     mail.setHtmlBody('Password');  
     //send the email  
     Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail } );  
   }  
 }  

Points to Remember about future method :

  1. No more than 10 method calls per Apex invocation.
  2. The specified parameters must be primitive data types, arrays of primitive data types, or collections of   primitive data types.
  3. Methods with the future annotation cannot take sObjects or objects as arguments.
  4. Methods with the future annotation cannot be used in Visualforce controllers in either getMethodName or setMethodName methods, nor in the constructor.
  5. You cannot call a method annotated with future from a method that also has the future annotation. Nor can you call a trigger from an annotated method that calls another annotated method.
  6. @future(callout = true) means that the method has ability to invoke external web services.