KEMBAR78
Twitter bootstrap force.com site and responsive design | PPTX
Combining Customer
  Portals, Force.com
Sites, Visualforce, Twitt
    er Bootstrap and
 Responsive Design!
About Me
• Steven Herod
• Working with Salesforce since
  2010
• @sherod on Twitter
• http://limitexception.herod.net
What was the problem?
• Needed to accept online credit
  applications for car loans
• Leverage their Existing Salesforce
  Organization.
• Required support of Mobile Phone/Tablet
  and Desktop browsers.
Components
                      Force.com Site +
                       Service Portal


Responsive Design with
• Twitter Bootstrap
• jQuery




                 Visualforce + Fieldsets
What is Responsive Design?




http://johnpolacek.github.com/scrolldeck.js/decks/responsive/
What is Twitter Bootstrap?
And the Salesforce bits
• High Volume Customer Portal
  – Salesforce license / Security model
• Force.com Site
  – Custom login and user interface
• Visualforce
  – Fieldsets
  – Custom Controllers
Deep Dive
Responding to different displays




    Desktop




                         iPad
              iPhone
Setting up the page
Handling the Resize


                       Twitter Bootstrap CSS classes +
                       jQuery to react to changes




<div class="callimg hidden-phone hidden-tablet">
      <apex:image
url="{!URLFOR($Resource.LCPStaticRsc, 'lcp/img/img_call.png')}"
alt="" width="224" height="35" />
     </div>
Using Fieldsets
• “A field set is a grouping of fields”
• Allows us to package the fields into a
  configurable group and then refer to that
  group within the VF page without
  referencing every field individually.
• Also allows us to mark if its mandatory..
Fields sets on the page
                      Visualforce Page



                                Page Block


                                  Fieldset


                                  Fieldset




                                Page Block


                                  Fieldset


                                  Fieldset




                                Page Block


                                  Fieldset


                                  Fieldset




                                Page Block


                                  Fieldset


                                  Fieldset
Field set per section




Order of fields and required driven from
Fieldset definition in configuration
Displaying the Fieldsets
Help and Type changes UI
Setting up the help/input field
Javascript for Currency/Help
          popover
Error handling


                                                                     Twitter Bootstrap
                                                                     CSS classes




             <apex:messages styleClass="alert alert-error" />

j$('input.error,select.error').parents('.control-group').addClass('error');
Questions?

Twitter bootstrap force.com site and responsive design

  • 1.
    Combining Customer Portals, Force.com Sites, Visualforce, Twitt er Bootstrap and Responsive Design!
  • 2.
    About Me • StevenHerod • Working with Salesforce since 2010 • @sherod on Twitter • http://limitexception.herod.net
  • 3.
    What was theproblem? • Needed to accept online credit applications for car loans • Leverage their Existing Salesforce Organization. • Required support of Mobile Phone/Tablet and Desktop browsers.
  • 4.
    Components Force.com Site + Service Portal Responsive Design with • Twitter Bootstrap • jQuery Visualforce + Fieldsets
  • 5.
    What is ResponsiveDesign? http://johnpolacek.github.com/scrolldeck.js/decks/responsive/
  • 6.
    What is TwitterBootstrap?
  • 7.
    And the Salesforcebits • High Volume Customer Portal – Salesforce license / Security model • Force.com Site – Custom login and user interface • Visualforce – Fieldsets – Custom Controllers
  • 8.
  • 9.
    Responding to differentdisplays Desktop iPad iPhone
  • 10.
  • 11.
    Handling the Resize Twitter Bootstrap CSS classes + jQuery to react to changes <div class="callimg hidden-phone hidden-tablet"> <apex:image url="{!URLFOR($Resource.LCPStaticRsc, 'lcp/img/img_call.png')}" alt="" width="224" height="35" /> </div>
  • 12.
    Using Fieldsets • “Afield set is a grouping of fields” • Allows us to package the fields into a configurable group and then refer to that group within the VF page without referencing every field individually. • Also allows us to mark if its mandatory..
  • 13.
    Fields sets onthe page Visualforce Page Page Block Fieldset Fieldset Page Block Fieldset Fieldset Page Block Fieldset Fieldset Page Block Fieldset Fieldset
  • 14.
    Field set persection Order of fields and required driven from Fieldset definition in configuration
  • 15.
  • 16.
    Help and Typechanges UI
  • 18.
    Setting up thehelp/input field
  • 19.
  • 20.
    Error handling Twitter Bootstrap CSS classes <apex:messages styleClass="alert alert-error" /> j$('input.error,select.error').parents('.control-group').addClass('error');
  • 21.