Date post: | 12-Jun-2015 |
Category: |
Documents |
Upload: | salesforce-developers |
View: | 710 times |
Download: | 5 times |
Building the new AppExchange
using Responsive Design
Pratima Nambiar, salesforce.com, Tech Lead, AppExchange
Jochem Geerdink, salesforce.com, Product Designer, AppExchange
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.
Agenda
Background
Demo of responsive features of the new AppExchange
Responsive Web Design highlights
Integrating with Force.com
AppExchange
AppExchange Goes Mobile
Mobile Technologies Considered
Native app
Mobile version of the application
Web application using Responsive Web Design
Agenda
Background
Demo of responsive features of the new AppExchange
Responsive Web Design highlights
Integrating with Force.com
Agenda
Background
Demo of responsive features of the new AppExchange
Responsive Web Design highlights
Integrating with Force.com
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.
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.
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) {
…
}
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
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;
}
}
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 */
}
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>
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; }
}
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;
};
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'));
});
}
};
Agenda
Background
Demo of responsive features of the new AppExchange
Responsive Web Design highlights
Integrating with Force.com
Integrating with Force.com
Tile Example
Saved List Example
Pratima Nambiar
Tech Lead
AppExchange
Jochem Geerdink
Product Designer
AppExchange