iPhone Sdk For Web Developers

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

1 comments

Comments 1 - 1 of 1 previous next Post a comment

Post a comment
Embed Video
Edit your comment Cancel

18 Favorites & 1 Group

iPhone Sdk For Web Developers - Presentation Transcript

  1. iPhone SDK for Web Application Developers Jason Grigsby • Mobile Portland • March 24, 2008 http://cloudfour.com • http://userfirstweb.com • http://twitter.com/grigs • jason@cloudfour.com
  2. Web Apps with the iPhone SDK Quick overview of web dev for the iPhone • • New features of Safari announced with SDK • Web development tools provided by SDK • Resources for more information
  3. iPhone = Basic Web Development w/ Tweaks • HTML, XHTML, CSS, Javascript • Avoid frames • No flash, java, xslt, plugins, mouse-over, hover styles, wml, file uploads & downloads • Need to consider speed of connection and processor
  4. Configuring the View Port <meta name = \"viewport\" content = \"width=device-width\" /> <meta name = \"viewport\" content = \"initial-scale = 2.3, user-scalable = no\" />
  5. Default Javascript Events Plus orientation and onorientationchange
  6. New Features with the SDK
  7. Javascript Enhancements — HTML 5 Spec getElementsByClassName var myDivs = document.getElementsByClassName(“myDivClass”); querySelector() var fooOrBar = document.querySelector(“#foo, #bar”); querySelectorAll() var errors = document.querySelectorAll(“span.error”);
  8. The Case for Using Native Selectors Source: http://webkit.org/blog/153/webkit-gets-native-getelementsbyclassname/
  9. iPhone Gestures • iPhone will support javascript access to gestures: • touchstart, touchmove, touchend, touchcancel • gesturestart, gesturechange, gestureend • Can determine the number of fingers being used, whether or not the user rotating or pinching the content. • Unfortunately, the documentation for these new features is incomplete.
  10. Native SVG 1.1 Support <?xml version=\"1.0\" standalone=\"no\"?> <!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\"> <svg width=\"100%\" height=\"100%\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"> <rect x=\"20\" y=\"20\" rx=\"20\" ry=\"20\" width=\"250\" height=\"100\" style=\"fill:red;stroke:black;stroke-width:5;opacity:0.5\"/> </svg> Use in IMG Tag: •Vector-based <img src=“logo.svg” /> •Rich graphics •Some animation Use in CSS: •Highly compressible background-image: url(“logo.svg”)
  11. CSS Effects: Transforms • Transformations applied before an elements is rendered. • Available in both 2d and 3d space. • Some options: • matrix • translate, translate3d -webkit-transform • rotate, rotate3d -webkit-transform-origin • scale, scale3d -webkit-perspective -webkit-transform-style • scale -webkit-backface-visibility
  12. CSS Effects: Transitions • Provides easy to use <head> animation in CSS <style type=\"text/css\" media=\"screen\"> div { • Transitions are implicit: You -webkit-transition-property: opacity; -webkit-transition-duration: 2s; define the start and end of } the transition, not the in div.fadeAway { between steps. opacity:0; } </style> • Animation is hardware </head> accelerated. <body> <div style=\"width:100px; height:100px; • Available properties background-color:blue;\" onclick=\"this.className = 'fadeAway'\"> • -webkit-transition-property Tap to fade </div> • -webkit-transition-duration • -webkit-transition-timing- function
  13. CSS Effects: Animation • Transitions are explicit: You define key frames for the animation. • Animation is hardware accelerated. • Available properties • -webkit-animation-name • -webkit-animation-duration • -webkit-animation-timing- function • -webkit-animation-iteration- count • -webkit-animation-direction • -webkit-animation-play-state • -webkit-animation-delay
  14. Offline Database SQLite db.transaction( function (transaction) { transaction.executeSql(\"UPDATE people set shirt=? where name=?;\", [ shirt, name ]); // array of values for the ? placeholders } );
  15. Full Screen Mode • Requires the user to add your web page to their home screen • Need to set apple-touch- icon.png • Add meta tag: <meta name=“apple-touch- fullscreen” content=“yes” /> • Any new windows will open
  16. Which SDK Features Can You Use Today? iPhone OS 1.1.4 Safari 3.1 iPhone OS 2.0 (beta) Default javascript JS enhancements Gestures Orientation SVG Full screen mode XHTML CSS effects CSS Offline database Viewport Currently on iPhones
  17. SDK Tools for Web Developers
  18. Dashcode
  19. iPhone Simulator (a.k.a. Aspen Simulator) • First real simulator. iPhoney doesn’t cut it. • It is called ASPEN Simulator. Don’t bother searching for the iPhone simulator. • /Developer/Platforms/ AspenSimulator.platform/Developer/ Applications/Aspen Simulator !! • Supports all iPhone specific options including eventually gestures (hold option)
  20. Resources • Apple Developer Center: http://developer.apple.com/iphone/ • iPhone Google Group: http://groups.google.com/group/iphonewebdev • Web Kit: http://webkit.org • iPhone Developer’s Wiki: http://www.kudit.com/wiki/ • DevPhone: http://devphone.com • iPhone Atlas: http://iphoneatlas.com • iPhone News Blog: http://iphonenewsblog.com
  21. Thank you for attending Mobile Portland. Next Meeting: April 28th Subscribe at http://mobileportland.com Join our Google Group: http://groups.google.com/ group/mobile-portland/

+ mobileportlandmobileportland, 2 years ago

custom

11506 views, 18 favs, 3 embeds more stats

Slides from Mobile Portland March 2008 introducing more

More info about this document

© All Rights Reserved

Go to text version

  • Total Views 11506
    • 11481 on SlideShare
    • 25 from embeds
  • Comments 1
  • Favorites 18
  • Downloads 305
Most viewed embeds
  • 20 views on http://mobileportland.com
  • 3 views on http://www.mobileportland.com
  • 2 views on http://slideshare.phreadz.com

more

All embeds
  • 20 views on http://mobileportland.com
  • 3 views on http://www.mobileportland.com
  • 2 views on http://slideshare.phreadz.com

less

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

Cancel
File a copyright complaint
Having problems? Go to our helpdesk?

Categories

Groups / Events