SlideShare ist ein Scribd-Unternehmen logo
1 von 15
CSS3 Animations &
Transitions with PhoneGap
        – Mark A R Smith 11/04/13
             @mark_a_r_smith
           mark@mymittens.co.uk
CSS3
•   Greatly improved set of tools for modern browsers

    –   Selectors
    –   Box Model
    –   Backgrounds and Borders
    –   Text Effects
    –   2D/3D Transformations
    –   Animations
    –   Multiple Column Layout
    –   User Interface

•   Hardware acceleration!!!
PhoneGap/Cordova
•   All platforms have a WebView (iOS/Android/Windows8/etc)

•   PhoneGap allows rendering to such a WebView with hooks to
    hardware (i.e. Compass, vibration, Camera)
What we want to do…
What we want to do…
What we want to do…
•   Build an app. to assist with remembering physio. exercises.

    – User Story 1: Display exercise to user
    – User Story 2: Display exercises to user via mobile
    …
    – User Story 3: Display specific exercises to user via mobile




                                      …let’s write some markup…
…but first some tools!
•   Android ADT bundle
     – http://developer.android.com/sdk/index.html

•   Applaud
     – http://www.mobiledevelopersolutions.com/home/start/startdet
       ails



•   (Sencha SDK/SenchaCMD)
     – http://www.sencha.com/products/sencha-cmd/download
     – http://www.sencha.com/products/touch/download/
Android ADT Bundle
•   Includes…
     – A code editor (eclipse) preconfigured with the Android
       Developer Tools (code highlighting, intelli-sense, build
       tools)
     – SDK tools. The engine to drive this stuff
     – Emulator (slow as shit – plug in!)
Applaud
•   Automates creation of PhoneGap project for Android

•   Quite out of date (uses PhoneGap 1.9, 2.6 is latest)

•   Can point to later API’s

•   Can include other API’s straight into project (Jquery, etc)

•   Makes creating a new app. completely painless
Sencha Touch
•   Just what I’m using (great application level JS engine)

•   You could use JQuery Mobile, or just straight HTML
Back to Physio.
•   Simple “Hello World”

•   User Story: Display exercise to user
     – Task 1: create HTML to display exercise 1
     – Task 2: display exercise 1 on mobile device




                              …now let’s really do some markup…
CSS3 Transitions
•   Doing nothing different, but does it with a cool animation
    effect.

    h1{
          font-size:26px;
          transition: font-size 5s;
    }

    h1:hover{
        font-size: 200px;
    }




                                      …now let’s do some markup…
CSS3 Animations
•   Two Step
     – Defining when animation happens and for how long
     – Defining animation itself

    h1{
          color:red;
          animation:myfirst 5s;
    }

    @keyframes myfirst              @keyframes myfirst
    {background:red                 {
                              OR    0% {color:red;}
    from {color:red}
                                    100% {color:yellow;}
    to {color:yellow;}              }
    }
                                      …now let’s do some markup…
Back to Physio.
•   Transfer to Mobile

•   User Story: Display exercises to user via mobile
     – Task 1: create menu system
     – Task 2: insert created exercises into menu




                                              …let’s wrap this up…
End Bit
•   CSS3 offers some really great performant abilities to your
    markup

•   I still forget my physio. Exercises




•   Questions???



•   Mark A R Smith MA BEng
     – mark@mymittens.co.uk

Weitere ähnliche Inhalte

Ähnlich wie CSS3 Animations & Transitions with PhoneGap

Win j svsphonegap-damyan-petev-mihail-mateev
Win j svsphonegap-damyan-petev-mihail-mateevWin j svsphonegap-damyan-petev-mihail-mateev
Win j svsphonegap-damyan-petev-mihail-mateev
Mihail Mateev
 

Ähnlich wie CSS3 Animations & Transitions with PhoneGap (20)

Make your animations perform well - Anna Migas - Codemotion Rome 2017
Make your animations perform well - Anna Migas - Codemotion Rome 2017Make your animations perform well - Anna Migas - Codemotion Rome 2017
Make your animations perform well - Anna Migas - Codemotion Rome 2017
 
Building a game engine with jQuery
Building a game engine with jQueryBuilding a game engine with jQuery
Building a game engine with jQuery
 
Js foo - Sept 8 upload
Js foo - Sept 8 uploadJs foo - Sept 8 upload
Js foo - Sept 8 upload
 
HTML5 Can't Do That
HTML5 Can't Do ThatHTML5 Can't Do That
HTML5 Can't Do That
 
TP_Webots_7mai2021.pdf
TP_Webots_7mai2021.pdfTP_Webots_7mai2021.pdf
TP_Webots_7mai2021.pdf
 
Win j svsphonegap-damyan-petev-mihail-mateev
Win j svsphonegap-damyan-petev-mihail-mateevWin j svsphonegap-damyan-petev-mihail-mateev
Win j svsphonegap-damyan-petev-mihail-mateev
 
Advanced #4 GPU & Animations
Advanced #4   GPU & AnimationsAdvanced #4   GPU & Animations
Advanced #4 GPU & Animations
 
Xtext, diagrams and ux
Xtext, diagrams and uxXtext, diagrams and ux
Xtext, diagrams and ux
 
Busy Developer's Guide to Windows 8 HTML/JavaScript Apps
Busy Developer's Guide to Windows 8 HTML/JavaScript AppsBusy Developer's Guide to Windows 8 HTML/JavaScript Apps
Busy Developer's Guide to Windows 8 HTML/JavaScript Apps
 
Good bye Massive View Controller!
Good bye Massive View Controller!Good bye Massive View Controller!
Good bye Massive View Controller!
 
APIs for modern web apps
APIs for modern web appsAPIs for modern web apps
APIs for modern web apps
 
Hacking to be performant
Hacking to be performantHacking to be performant
Hacking to be performant
 
Android design lecture #1
Android design   lecture #1Android design   lecture #1
Android design lecture #1
 
MVPWorkshop_CodeCamp 2023.pdf
MVPWorkshop_CodeCamp 2023.pdfMVPWorkshop_CodeCamp 2023.pdf
MVPWorkshop_CodeCamp 2023.pdf
 
Mobile native-hacks
Mobile native-hacksMobile native-hacks
Mobile native-hacks
 
Custom V CMS
Custom V CMSCustom V CMS
Custom V CMS
 
HalfStack London - Make Your Animations Perform Well
HalfStack London - Make Your Animations Perform Well HalfStack London - Make Your Animations Perform Well
HalfStack London - Make Your Animations Perform Well
 
Make Your Animations Perform Well - JS Conf Budapest 2017
Make Your Animations Perform Well - JS Conf Budapest 2017 Make Your Animations Perform Well - JS Conf Budapest 2017
Make Your Animations Perform Well - JS Conf Budapest 2017
 
multi platform mobile development using titanium
multi platform mobile development using titaniummulti platform mobile development using titanium
multi platform mobile development using titanium
 
Make your animations perform well
Make your animations perform wellMake your animations perform well
Make your animations perform well
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Kürzlich hochgeladen (20)

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 

CSS3 Animations & Transitions with PhoneGap

  • 1. CSS3 Animations & Transitions with PhoneGap – Mark A R Smith 11/04/13 @mark_a_r_smith mark@mymittens.co.uk
  • 2. CSS3 • Greatly improved set of tools for modern browsers – Selectors – Box Model – Backgrounds and Borders – Text Effects – 2D/3D Transformations – Animations – Multiple Column Layout – User Interface • Hardware acceleration!!!
  • 3. PhoneGap/Cordova • All platforms have a WebView (iOS/Android/Windows8/etc) • PhoneGap allows rendering to such a WebView with hooks to hardware (i.e. Compass, vibration, Camera)
  • 4. What we want to do…
  • 5. What we want to do…
  • 6. What we want to do… • Build an app. to assist with remembering physio. exercises. – User Story 1: Display exercise to user – User Story 2: Display exercises to user via mobile … – User Story 3: Display specific exercises to user via mobile …let’s write some markup…
  • 7. …but first some tools! • Android ADT bundle – http://developer.android.com/sdk/index.html • Applaud – http://www.mobiledevelopersolutions.com/home/start/startdet ails • (Sencha SDK/SenchaCMD) – http://www.sencha.com/products/sencha-cmd/download – http://www.sencha.com/products/touch/download/
  • 8. Android ADT Bundle • Includes… – A code editor (eclipse) preconfigured with the Android Developer Tools (code highlighting, intelli-sense, build tools) – SDK tools. The engine to drive this stuff – Emulator (slow as shit – plug in!)
  • 9. Applaud • Automates creation of PhoneGap project for Android • Quite out of date (uses PhoneGap 1.9, 2.6 is latest) • Can point to later API’s • Can include other API’s straight into project (Jquery, etc) • Makes creating a new app. completely painless
  • 10. Sencha Touch • Just what I’m using (great application level JS engine) • You could use JQuery Mobile, or just straight HTML
  • 11. Back to Physio. • Simple “Hello World” • User Story: Display exercise to user – Task 1: create HTML to display exercise 1 – Task 2: display exercise 1 on mobile device …now let’s really do some markup…
  • 12. CSS3 Transitions • Doing nothing different, but does it with a cool animation effect. h1{ font-size:26px; transition: font-size 5s; } h1:hover{ font-size: 200px; } …now let’s do some markup…
  • 13. CSS3 Animations • Two Step – Defining when animation happens and for how long – Defining animation itself h1{ color:red; animation:myfirst 5s; } @keyframes myfirst @keyframes myfirst {background:red { OR 0% {color:red;} from {color:red} 100% {color:yellow;} to {color:yellow;} } } …now let’s do some markup…
  • 14. Back to Physio. • Transfer to Mobile • User Story: Display exercises to user via mobile – Task 1: create menu system – Task 2: insert created exercises into menu …let’s wrap this up…
  • 15. End Bit • CSS3 offers some really great performant abilities to your markup • I still forget my physio. Exercises • Questions??? • Mark A R Smith MA BEng – mark@mymittens.co.uk