Building the new AppExchange using Responsive Design

22
Building the new AppExchange using Responsive Design Pratima Nambiar, salesforce.com, Tech Lead, AppExchange Jochem Geerdink, salesforce.com, Product Designer, AppExchange

Transcript of Building the new AppExchange using Responsive Design

Page 1: Building the new AppExchange using Responsive Design

Building the new AppExchange

using Responsive Design

Pratima Nambiar, salesforce.com, Tech Lead, AppExchange

Jochem Geerdink, salesforce.com, Product Designer, AppExchange

Page 2: Building the new AppExchange using Responsive Design

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

intellectual property and other litigation, risks associated with 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-Q for the most recent fiscal quarter ended July 31, 2012. This

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.

Page 3: Building the new AppExchange using Responsive Design

Agenda

Background

Demo of responsive features of the new AppExchange

Responsive Web Design highlights

Integrating with Force.com

Page 4: Building the new AppExchange using Responsive Design

AppExchange

Page 5: Building the new AppExchange using Responsive Design

AppExchange Goes Mobile

Page 6: Building the new AppExchange using Responsive Design

Mobile Technologies Considered

Native app

Mobile version of the application

Web application using Responsive Web Design

Page 7: Building the new AppExchange using Responsive Design

Agenda

Background

Demo of responsive features of the new AppExchange

Responsive Web Design highlights

Integrating with Force.com

Page 8: Building the new AppExchange using Responsive Design

Agenda

Background

Demo of responsive features of the new AppExchange

Responsive Web Design highlights

Integrating with Force.com

Page 9: Building the new AppExchange using Responsive Design

Definition

Responsive Web Design (RWD) is an approach to web design

in which a site is crafted to provide an optimal viewing

experience—easy reading and navigation with a minimum of

resizing, panning, and scrolling—across a wide range of devices

(from desktop computer monitors to mobile phones).

In short: the site should be usable on all devices and should feel

optimized for all devices.

Page 10: Building the new AppExchange using Responsive Design

How to RWD?

Media queries!

Media queries allow the page to use different CSS styles based

on device capabilities.

For RWD, we will look at browser width.

Page 11: Building the new AppExchange using Responsive Design

Media queries code structure

@media screen and (max-width: 767px) {

}

@media screen and (min-width: 768px) and (max-width: 979px) {

}

@media screen and (min-width: 980px) {

}

Page 12: Building the new AppExchange using Responsive Design

RWD and Images

1. Use background images when possible.

2. How to create flexible or fluid images

3. Lazy load images for better page performance

Page 13: Building the new AppExchange using Responsive Design

Background Image Example: logo

<div class="df-logo">

<a href="#">AppExchange</a>

</div>

.df-logo a {

display: block;

text-indent: -9999px;

width: 223px;

height: 47px;

background: url(appex-logo.png) no-repeat 0 0;

}

/* S: Phone */

@media (max-width: 767px) {

.df-logo a { display: none; }

.df-logo {

width: 100px;

height: 21px;

margin-left: -50px;

position: absolute;

top: 5px;

left: 50%;

background: url(appex-logo-small.png) no-repeat 0 0;

}

}

Page 14: Building the new AppExchange using Responsive Design

How to Create Flexible or Fluid Images

<div class="df-tile">

<div class="tile-content">

<div class="tile-img tile-img-brand">

<img src="tile-01-280.png" />

</div>

</div>

</div>

.df-tile {

width: 240px;

height: 200px;

}

.df-tile .tile-img-brand {

padding: 10px;

}

.df-tile img {

border: 1px solid #999;

max-width: 100%;

width: auto; /* IE */

height: auto; /* IE */

}

Page 15: Building the new AppExchange using Responsive Design

Lazy Load Images for Better Page Performance

<div class="tile-img tile-img-brand">

<img src="p.gif" data-src="tile-01-280.png" class="desktop-img" />

</div>

Page 16: Building the new AppExchange using Responsive Design

Lazy Load Images for Better Page Performance

<span id="phone-test"></span>

<span id="small-test"></span>

<span id="large-test"></span>

#phone-test, #small-test, #large-test {

width: 1px;

height: 1px;

display: none;

}

/* S: Phone */

@media screen and (max-width: 767px) {

#phone-test { display: block; }

}

/* M: Portrait tablet */

@media screen and (min-width: 768px) and (max-width: 979px) {

#small-test { display: block; }

}

/* XL: Desktop */

@media screen and (min-width: 1220px) {

#large-test { display: block; }

}

Page 17: Building the new AppExchange using Responsive Design

Lazy Load Images for Better Page Performance

getCurrentSiteState = function() {

var state = 'medium';

if (jQuery('#phone-test').css('display') === 'block') { state = 'phone'; }

else if (jQuery('#small-test').css('display') === 'block') { state = 'small'; }

else if (jQuery('#large-test').css('display') === 'block') { state = 'large'; }

return state;

};

Page 18: Building the new AppExchange using Responsive Design

Lazy Load Images for Better Page Performance

<div class="tile-img tile-img-brand">

<img src="p.gif" data-src="tile-01-280.png" class="desktop-img" />

</div>

jQuery(document).ready(function() {

loadDesktopImages();

});

loadDesktopImages = function() {

if (getCurrentSiteState() !== 'phone') {

jQuery('img.desktop-img').each(function() {

jQuery(this).attr('src’, jQuery(this).attr('data-src'));

});

}

};

Page 19: Building the new AppExchange using Responsive Design

Agenda

Background

Demo of responsive features of the new AppExchange

Responsive Web Design highlights

Integrating with Force.com

Page 20: Building the new AppExchange using Responsive Design

Integrating with Force.com

Tile Example

Saved List Example

Page 21: Building the new AppExchange using Responsive Design

Pratima Nambiar

Tech Lead

AppExchange

Jochem Geerdink

Product Designer

AppExchange

Page 22: Building the new AppExchange using Responsive Design