Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13
Responsive Web Design
in Application Express using
HTML5 and CSS3
Shakeeb Rahman
@shakeeb
Principal Member of Technical Staff
Oracle Application Express #orclapex
Software Developer
Shakeeb Rahman
Intern at Oracle in 2006
Joined APEX team in 2009
Projects I have worked on
–
Oracle Store
–
APEX
–
Oracle Cloud
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Program Agenda
The Web Today
Mobile App vs Responsive App
Responsive Web Design
APEX 4.2 Features
Demos
Is Responsive Right for you?
4
10 Years Ago
Evolving Web Applications
Designed for Internet Explorer
Windows Desktop or Laptop
Maximum screen resolution of
1024x768
Table-Based
<font> Tag
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
5 Years Ago
Evolving Web Applications
Mobile becomes popular with
iPhone
Firefox is eating IE marketshare
Start Investigating Mobile
6
Today
Evolving Web Applications
Many Devices
Many Platforms
Many Screen sizes
Many Resolutions
Many Browsers
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Enterprise gone Mobile
Evolving Web Applications
Mobile is not just for personal use
Enterprises have embraced
mobile
Agility
Cost savings
Improve productivity
88
Symantec
2012 State of Mobility Survey
“71% of organizations are already using or
planning to use custom mobile applications”
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 10
Everyone is doing it. How can you?
12
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Dedicated Mobile Web Apps?
14
Dedicated Mobile Web app
•
Fast
•
Looks Native
•
Optimized for Mobile
•
Duplicate Code
•
Less Functionality
•
Not Optimized for
Tablets
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Dedicated Mobile Web Apps?
16
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Enterprise Application
The Business Requirement
Work on Desktop, Mobile, Tablets
Similar UI
Single Code Line
Same Developers
No New Technology
18
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Responsive Web Design
(RWD)
20
an approach to web design in which a designer
intends 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).
(Wikipedia)
Same HTML.
Same Application Logic.
22
24
26
28
30
32
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
How does it work?
34
CSS3 Media Queries
allowing you to define styles based on conditions such
as screen size or resolution
@media screen and (
min-width: 320px
) and (
max-width: 479px
) {...}
define multiple CSS media queries to target “cut off
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 36
Mobile Portrait
–
@media screen and (min-width: 320px) and (max-width: 479px)
Mobile Landscape
–
@media only screen and (min-width: 480px) and (max-width: 767px)
Mobile Portrait / Landscape
–
@media only screen and (max-width: 767px)
Tablet Portrait
–
@media only screen and (min-width: 768px) and (max-width: 959px)
Tablet Landscape
–
@media only screen and (min-width: 960px) and (max-width: 1024px)
CSS3 Responsive Utility Classes
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Grid Layout
38
Using a grid makes it easier to
align and lay out page
components
Media Queries can then easily
shift or reposition these
components
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Sounds technical.
Do I have to do this manually?
40
NO!
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
APEX 4.2 Support for Responsive Web Design
Grid Layout for
Regions and Items
Theme 25
42
Grid Layout
APEX 4.2 Support for Responsive Web Design
Declarative way to lay out regions
and items on a page
Possible to do complex layouts
without manual css overrides
Compatible with popular grid
frameworks such as twitter
bootstrap, 960 gs, etc.
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Fully Responsive Theme
APEX 4.2 Support for Responsive Web Design
Uses custom flexible grid up to
2560px wide
Mobile, Tablet, Desktop support
Icon Buttons
Retina Display Compatible
Modernizr
44
Fully Responsive Theme
APEX 4.2 Support for Responsive Web Design
SCSS Based
Respond.js for RWD in older IE
One Sprite (and one for Retina)
Icons
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Demo:
Convert Existing App to
Responsive App
46
Demo:
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Is Responsive Right for you?
Responsive
Full Experience
Single Code Line
Web UI
48
Mobile
Limited Utility
New Mobile Codeline
Pseudo Native UI
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Q & A
50
@shakeeb
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13