Salesforce Campus Tour - Developer Intro

Post on 01-Jul-2015

180 views 3 download

description

Salesforce Campus Tour - Developer Intro

Transcript of Salesforce Campus Tour - Developer Intro

Salesforce 2014 Campus Tour

James Ward @_JamesWard

Safe Harbor

Safe harbor statement under the Private Securities Litigation Reform Act of 1995: This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services. The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and any possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site. Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.

#CampusTour14

World’s most admired software company

#1 most admired in software

#7 best company to work for

2011 • 2012 • 2013 • 2014

World’s most innovative company

4TH YEAR IN A ROW!

*Source: IDC, Worldwide CRM Applications 2014-2018 Forecast and 2013 Vendor Shares, Doc #248875, June 2014

World’s #1 CRM company*

Image FPO

Celebrating 15 Years of Customer Success

1%

Time • Equity • Product

530,000+Hours Service

20,000Non-profit

organizations

$53M+

Grants

foundation

The Third Wave of Computing

SNA

Terminal

Mainframe LAN / WAN

Client

Server

LAN / WAN

Client

Server

customer transactions

connected things

LTE

Mobile

Cloud

“Third Wave” of Computing

BillionsThousands Millions Trillions

But Most Companies Are Disconnected From Customers

Service Agents

Salespeople

Your Company

Your Customers

Your Partners

Become a Customer Company

Analytics for the rest of us

Build mobile apps

faster

Sell, Service, Market & Engage

in a whole new way

Connect with your customers in a whole new way

Salesforce1: A New Customer Platform for the Future

Salesforce1 Platform APIs

Salesforce1 App

Salesforce1 Platform Services

Force.com Heroku1 ExactTarget Fuel

Build Amazing Apps and Connect Everything.

Build Innovative

Customer apps

Automate Processes

with Employee Apps

Connect

Everything

Branded social intranet built mobile first

Key business metrics customized for each ‘teammate”

Chatter collaboration for every department

Business users update content in real-time

Virgin America Connects Every Employee with a Social Intranet

Trunk Club Connects Customers & Employees with Mobile Apps

Customer facing mobile app built on Heroku

Employee mobile app built on Force.com for order fulfillment

Integrated sales, service & marketing built on the Salesforce Platform

Salesforce Academic Program

Demand is Growing Across Multiple Roles

Force.com Developer

Technical Architect

Solutions Architect

Principal Consultant

Business Analyst

Source: Hire On-Demand http://www.hireon-demand.com

60% 159% 90%of companies moving

to cloudDemand growth for all

Salesforce TalentDemand growth for

Salesforce Developers

Salary Average

Job Silicon Valley National

Force.com Data Analyst $95k $65k

Salesforce.com Administrators $100k $80k

Global Salesforce Administrators $120k $95k

Force.com Developers $125k $98k

Certified Force.com Developers $135k $115k

Sr. Force.com Developers $150k $125k

Force.com Architects $170k $140k

Force.com Solution Architects $200k $165k

Salesforce CRM Business Analysts $140k $110k

Salesforce CRM Program Managers $185k $135k

Salesforce Implementation Consultants $220k $175k

Source: Nelson Technologies, November 2013http://www.nelsontechnology.com

Salesforce Skills Earn Top Paying Jobs

Campus EventsInternships &

Recruiting CurriculumMentorship & Experience

Classroom speakers

Workshops

Hackathons

Business Competitions

University

Conferences

Student User Groups

Company visits/tours

Internship Program

Recruitment

Courseware

Curriculum

Student/Faculty

licenses

Training & certification

Capstone projects

Entrepreneurship

Research projects

Student Ambassadors

Academic Program Components

1 2 3Join Live Telecast onNovember 12, 2014

Compete in Salesforce1Challenge to win an Xbox

Attend a Campus Event

Salesforce Campus TourOct 24-Nov 14th

www.salesforcecampustour.com

Keep Learning With Trailheaddeveloper.salesforce.com/trailhead

Salesforce CertificationsKey Skills Preparation

• Manage users, data, and security• Maintain and customize Sales Cloud and Service Cloud

applications• Build reports, dashboards, and workflow

Administration Essentials for New Admins (ADM 201)

FREE Self-paced Training:• certifiedondemand.com

• Leverage advanced administration • Optimize and extend Sales Cloud and Service Cloud

applications• Design advanced reports, dashboards, and business

process automation

Administration Essentials for Experienced Admins (ADM-211)

FREE Self-paced Training:• Force.com Fundamentals Book

• Build custom applications using point-and-click • Design the data model, user interface, business logic,

and security for custom applications• Design reports, dashboards, and portals

Building Applications with Force.com and Visualforce (DEV401)

FREE Self-paced Training:• Udacity.com

• Develop custom applications using Apex & Visualforce• Manage the development lifecycle and environments• Write and execute comprehensive test plans

Apex and Visualforce Controllers (DEV501)

FREE Self-paced Training:• Introduction to Visualforce (YouTube)• www.sfdc99.com

Campus Ambassador Program

Coming Soon!

Salesforce FutureForce Program

salesforce.com/futureforce

Lets Build an App!

https://ccoenraets.github.io/salesforce-developer-fasttrack/

Two Approaches to Development

Visualforce PagesVisualforce Components

Apex ControllersApex Triggers

Metadata APIREST APIBulk API

Formula FieldsValidation Rules

Workflows and Approvals

Custom ObjectsCustom FieldsRelationships

Page LayoutsRecord Types

User Interface

Business Logic

Data Model

Declarative Approach Programmatic Approach

Creating the Data Model

Salesforce Objects

Similar to Tables (with more metadata)

Standard objects out-of-the-box

•Account, Contact, Opportunity, …

You can add custom fields to standard objects

•Rating__c, Twitter__c, …

You can create custom objects

• i.e. Speaker__c, Session__c, Hotel__c

Custom objects have standard fields

• Id, Owner, LastModifiedDate, LastModifiedBy, …

Rich Data Types

Auto Number Formula Roll-Up Summary Lookup Master-Detail Checkbox Currency Date

Picklist (multi select) Text Text Area Text Area (Long) Text Area (Rich) Text (Encrypted) URL

Date/Time

Email

Geolocation

Number

Percent

Phone

Picklist

Modeling One-to-Many Relationships

An expense has one expense report

An expense report has many expenses

Modeling Many-to-Many Relationships

A speaker can have many session assignments

A session can have many speaker assignments

Id

All objects are given an Id field

Globally unique Id is assigned at record creation

"Primary key" used to access records

Record Name

Human readable / logical identifier

Text or Auto Number ("Intro to Apex" or SP-00002)

Uniqueness not enforced

When you create an Object, you get…

A CRUD user interface

Instant Mobile App access (Salesforce1)

A REST API

Rich Metadata

Indexed search

Lab: Creating the Data Model

Creating the Application

What's an Application?

Group of tabs that provide easy access to related features Salesforce comes with standards apps

•Sales, Call Center, Marketing, …

You can create your own apps Tabs can be:

•Object pages, Visualforce pages, Canvas app

Page Layouts

Let you customize all aspects of the layout, related lists, …

Lab: Creating the Application

Writing Apex Classes

What is Apex?

Salesforce platform language

Cloud based compiling, debugging and unit testing

Object-oriented

Strongly typed

Classes and Interfaces

Similar to Java

Apex and Java

Same Primitive data types

Flow control (if, for, while, …)

Exception handling

Collections: Lists, Sets, …

Different Case insensitive

Single quote strings: 'Joe'

Id data type

Built-in support for data access

Apex Class

public class MortgageCalculator {

public Double amount { get; set; }

public Double rate { get; set; }

public Integer years { get; set; }

public Double calculateMonthlyPayment() {

Integer months = years * 12;

Double monthlyRate = rate / (12 * 100);

return amount * (monthlyRate/

(1 - Math.pow(1 + monthlyRate, -months)));

}

}

Development Tools

Developer Console

Force.com IDE (Eclipse Plugin)

Mavens Mate (Sublime Plugin)

Force CLI

Developer Console

Browser Based IDE

Create Classes, Triggers, Pages

Execute Apex Anonymously

Execute SOQL Queries

Run Unit Tests

Review Debug Logs

Accessing Data with SOQL and DML

SOQL

Salesforce Object Query language

Similar to SQL

Streamlined syntax to traverse object relationships

Built into Apex

SELECT Id, Name, Phone FROM Contact

SELECT Id, Name, Phone FROM Contact WHERE Phone <> null

SELECT Id, Name, Phone FROM Contact WHERE Phone <> null AND Name LIKE '%rose%'

SELECT Id, Name, Phone FROM Contact WHERE Phone <> null AND Name LIKE '%rose%' ORDER BY Name

SELECT Id, Name, Phone, Account.Name FROM Contact WHERE Phone <> null AND Name LIKE '%rose%' ORDER BY Name

SELECT Id, Name, Phone, Account.Name FROM Contact WHERE Phone <> null AND Name LIKE '%rose%' ORDER BY Name LIMIT 50

Executing SOQL in the Developer Console

Inlining SOQL in Apex

Integer i = [select count() from Session__c];

Inlining SOQL in Apex

String level = 'Advanced';

List<Session__c> sessions =

[SELECT Name, Level__c FROM Session__c

WHERE Level__c = :level];

Inlining SOQL in Apex

List<String> levels = new List<String>();

levels.add('Intermediate');

levels.add('Advanced');

List<Session__c> sessions =

[SELECT Name, Level__c FROM Session__c

WHERE Level__c IN :levels];

Inlining SOQL in Apex

for (Speaker__c s : [select email__c from Speaker__c])

{

System.debug(s.email__c);

}

insert

Session__c session = new Session__c();

session.name = 'Apex 101';

session.level__c = 'Beginner';

insert session;

insert

Session__c session = new Session__c(

name = 'Apex 201',

level__c = 'Intermediate'

);

insert session;

update

String oldName = 'Apex 101';

String newName = 'Apex for Beginners';

Session__c session = [SELECT Id, Name FROM Session__c

WHERE Name=:oldName];

session.name = newName;

update session;

delete

String name = 'Testing 501';

Session__c session =

SELECT Name FROM Session__c

WHERE Name=:name];

delete session;

Writing Triggers

Trigger

Apex code executed on database events

Before or after:

• Insert

•Update

•Delete

•Undelete

Before or After?

Before

•Update or validate values before they are saved to the database

•Example: Prevent double-booking of a speaker

After

•Need access to values set by the database (Id, lastUpdated, …)

•Example: Send speaker confirmation email

Bulk Mode

Trigger API designed to support bulk operations

•Data Import, Bulk API, etc.

Triggers work on bulk of records, not single records

Context variables provide access to data:

•Trigger.old and Trigger.new (List)

•Trigger.oldMap and Trigger.newMap (Map)

Example

Trigger on Account (after insert) {

for (Account account : Trigger.new) {

Case case = new Case();

case.Subject = 'Mail Welcome Kit';

case.Account.Id = account.Id;

insert case;

}

}

Writing Visualforce Pages

Model-View-Controller

ModelData + Rules

ControllerView-Modelinteractions

ViewUI code

Separation of concerns– No data access code in view

– No view code in controller

Benefits– Minimize impact of changes

– More reusable components

Model-View-Controller in Salesforce

View• Metadata• Standard Pages• Visualforce Pages• External apps

Controller• Standard Controllers• Controller Extensions• Custom Controllers

(all Apex)

Model• Metadata• Objects• Triggers (Apex)• Classes (Apex)

What's a Visualforce Page?

The View in MVC architecture

HTML page with tags executed at the server-side to generate dynamic content

Similar to JSP and ASP

Can leverage JavaScript and CSS libraries

Expression Language

Anything inside of {! } is evaluated as an expression

Same expression language as Formulas

Same global variables are available. For example:

• {!$User.FirstName} {!$User.LastName}

Example 1

<apex:page>

<h1>Hello, {!$User.FirstName}</h1>

</apex:page>

Example 2

<apex:page standardController="Contact">

<apex:form>

<apex:inputField value="{!contact.firstname}"/>

<apex:inputField value="{!contact.lastname}"/>

<apex:commandButton action="{!save}" value="Save"/>

</apex:form>

</apex:page>

Function in standard controller

Standard controller

object

Standard Controller

A standard controller is available for all objects

•You don't have to write it!

Provides standard CRUD operations

•Create, Update, Delete, Field Access, etc.

Can be extended with more capabilities (next module)

Uses id in URL to access object

Component Library

Presentation tags

– <apex:pageBlock title="My Account Contacts"> Fine grained data tags

•<apex:outputField value="{!contact.firstname}">

•<apex:inputField value="{!contact.firstname}">

Coarse grained data tags

•<apex:detail>

•<apex:pageBlockTable>

Action tags

•<apex:commandButton action="{!save}" >

Email Templates

Embedded in Page Layouts

Generate PDFs

Custom Tabs

Mobile Interfaces

Page Overrides

Where can I use Visualforce?

Writing Controller Extensions

Custom Controllers

Custom class written in Apex

Can override standard behavior

Can add new capabilities

Defining a Controller Extension

<apex:page standardController="Speaker__c" extensions="SpeakerCtrlExt">

Provides basic CRUD

Overrides standard actions and/or provide additional capabilities

Anatomy of a Controller Extension

public class SpeakerCtrlExt {

private final Speaker__c speaker;

private ApexPages.StandardController stdController;

public SpeakerCtrlExt (ApexPages.StandardController ctrl) {

this.stdController = ctrl;

this.speaker = (Speaker__c)ctrl.getRecord();

}

// method overrides

// custom methods

}

All done. Take a survey!

http://bit.ly/devdayutaustin