Your SlideShare is downloading. ×
0
2012-04-21-ignite-offline-mobile-app-has-great-potential
2012-04-21-ignite-offline-mobile-app-has-great-potential
2012-04-21-ignite-offline-mobile-app-has-great-potential
2012-04-21-ignite-offline-mobile-app-has-great-potential
2012-04-21-ignite-offline-mobile-app-has-great-potential
2012-04-21-ignite-offline-mobile-app-has-great-potential
2012-04-21-ignite-offline-mobile-app-has-great-potential
2012-04-21-ignite-offline-mobile-app-has-great-potential
2012-04-21-ignite-offline-mobile-app-has-great-potential
2012-04-21-ignite-offline-mobile-app-has-great-potential
2012-04-21-ignite-offline-mobile-app-has-great-potential
2012-04-21-ignite-offline-mobile-app-has-great-potential
2012-04-21-ignite-offline-mobile-app-has-great-potential
2012-04-21-ignite-offline-mobile-app-has-great-potential
2012-04-21-ignite-offline-mobile-app-has-great-potential
2012-04-21-ignite-offline-mobile-app-has-great-potential
2012-04-21-ignite-offline-mobile-app-has-great-potential
2012-04-21-ignite-offline-mobile-app-has-great-potential
2012-04-21-ignite-offline-mobile-app-has-great-potential
2012-04-21-ignite-offline-mobile-app-has-great-potential
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

2012-04-21-ignite-offline-mobile-app-has-great-potential

1,375

Published on

Offline mobile app has great potential!

Offline mobile app has great potential!

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,375
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
20
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Gaps between asset pipeline and rack-offlineLets hack together!
  • 2. "Network operation did not complete in areasonable amount of time;please retry""... I lost data?"
  • 3. ConsCheap machine performanceSlow network speed
  • 4. Meet html5 cache manifestCACHE MANIFESTindex.htmlstylesheet.cssimages/masthead.pngscripts/misc.jsNETWORK:search.phplogin.php/apiFALLBACK:images/dynamic.php static_image.pnghttp://www.webreference.com/authoring/languages/html/HTML5-Application-Caching/index.html
  • 5. Meet rack-offlinehttps://github.com/wycats/rack-offlinehttp://railscasts.com/episodes/247-offline-apps-part-1http://railscasts.com/episodes/248-offline-apps-part-2
  • 6. http://localhost:3000/application.manifestCACHE MANIFEST#4470fbc3c8ac429d45368f5ad134fe7fee3f677f8d4994a5f04407f8104e5e2fassets/application.js Reflesh!assets/application.css404.html422.html500.htmlindex.html Detect! public/*NETWORK:/
  • 7. Meet jQuery-offlinejQuery.getJSON↓https://github.com/wycats/jquery-offlinejQuery.retrieveJSON
  • 8. Store serialized data to local storage.Send items background when networkrecover, if you write so.
  • 9. Meet after Rails3.1 & Asset Pipelinesprockets manifestapp/assets/javascripts/application.js//= require jquery//= require jquery_ujs//= require_tree .
  • 10. Result,Gap between rack-offline and assetpipeline!Keyword is sprockets.
  • 11. Paths> y Rails.application.config.assets.paths---- /Users/eifion/store/app/assets/images- /Users/eifion/store/app/assets/javascripts- /Users/eifion/store/app/assets/stylesheets- /Users/eifion/store/lib/assets/greeting.txt- /Users/eifion/store/vendor/assets/stylesheets- /Users/eifion/.rvm/gems/ruby-1.9.2-p180@railspre/gems/jquery-rails-1.0.13/vendor/assets/javascriptshttp://railscasts.com/episodes/279-understanding-the-asset-pipeline
  • 12. html5 cache manifestlist up all file names.rack-offline seek and write hash. public/*
  • 13. Enginestilt pre-processapp/assets/javascripts/application.js #=> assets/application.jsapp/assets/javascripts/items.js.coffee #=> assets/items.jsvendor/assets/javascripts/foo.js.erb #=> assets/foo.jsrubygems ;)
  • 14. My temporary solutionhttps://gist.github.com/2200162 files = Dir[ "#{root}/assets/**/*.{js,css,jpg,png,gif}"] files.each do |file| cache Pathname.new(file).relative_path_from(root) end
  • 15. question in rubyonrails-talkno response ;)Offline apps and Asset pipeline Problemin rails3.2https://groups.google.com/forum/#!msg/rubyonrails-talk/nxCASUbmGYc/mI3IPvG3sOwJ
  • 16. I should parse //= jquery and searchand get whether this is updated or not,dont I?Its too hard.I think using sprockets and tilt solves myproblem, dont I?I want example code.
  • 17. This is grunt and/or watchr and/orguards solution area?Or essentially offline app is client sidesolution?But asset pipeline is rails area, I think.
  • 18. Mobile app is fun!
  • 19. This is gap! Lets hack together!@sanemat

×