How to Develop `iKnow Web App for iPhone' ANDO Yasushi http://d.hatena.ne.jp/technohippy
Agenda <ul><li>iPhone Web App </li></ul><ul><ul><li>Web app vs. native app </li></ul></ul><ul><ul><li>How to overcome the ...
iKnow Web App for iPhone
Pros and Cons: How I Learned to Stop Worrying  and Love the iPhone Web App <ul><li>Pros </li></ul><ul><ul><li>Easy to deve...
How to Overcome the Cons <ul><li>Safari is the Only Browser for iPhone </li></ul><ul><li>Libraries for iPhone Web App </li...
Use iKnow API <ul><li>def search_sentences(keyword) </li></ul><ul><li>call_api &quot;sentences/matching/#{keyword}&quot; <...
How to Use Sounds  on iPhone Web App <ul><li>/** IDEAL  **/ </li></ul><ul><li>iknow3g.replay = function(url) { </li></ul><...
How to Use Sounds  on iPhone Web App <ul><li><!-- READL --> </li></ul><ul><li><embed  </li></ul><ul><li>src=&quot;#{sound_...
Tips <ul><li>Autostart does not work </li></ul><ul><li>Remove generated embed tags </li></ul><ul><li>Use size attribute in...
Conclusion Let's develop iPhone Web App for iPhone
Upcoming SlideShare
Loading in …5
×

iKnow Web App for iPhone

2,470 views

Published on

Published in: Technology, News & Politics
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,470
On SlideShare
0
From Embeds
0
Number of Embeds
18
Actions
Shares
0
Downloads
11
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

iKnow Web App for iPhone

  1. 1. How to Develop `iKnow Web App for iPhone' ANDO Yasushi http://d.hatena.ne.jp/technohippy
  2. 2. Agenda <ul><li>iPhone Web App </li></ul><ul><ul><li>Web app vs. native app </li></ul></ul><ul><ul><li>How to overcome the cons of web app </li></ul></ul><ul><li>iKnow Web App for iPhone </li></ul><ul><ul><li>How to use sounds </li></ul></ul><ul><ul><li>Tips </li></ul></ul><ul><li>Conclusion </li></ul>
  3. 3. iKnow Web App for iPhone
  4. 4. Pros and Cons: How I Learned to Stop Worrying and Love the iPhone Web App <ul><li>Pros </li></ul><ul><ul><li>Easy to develop </li></ul></ul><ul><ul><li>Easy to start using </li></ul></ul><ul><ul><li>No check by Apple </li></ul></ul><ul><li>Cons </li></ul><ul><ul><li>Difficult to get money </li></ul></ul><ul><ul><li>Poor UI (cosmetics and performance) </li></ul></ul><ul><ul><li>Network dependent </li></ul></ul><ul><li>Why did I choose web app? </li></ul>
  5. 5. How to Overcome the Cons <ul><li>Safari is the Only Browser for iPhone </li></ul><ul><li>Libraries for iPhone Web App </li></ul><ul><ul><li>iUi </li></ul></ul><ul><ul><li>Universal iPhone UI Kit </li></ul></ul><ul><li>Ajax </li></ul><ul><li>Sqlite on Safari </li></ul><ul><li>Full screen mode for Safari </li></ul>
  6. 6. Use iKnow API <ul><li>def search_sentences(keyword) </li></ul><ul><li>call_api &quot;sentences/matching/#{keyword}&quot; </li></ul><ul><li>end </li></ul><ul><li>def call_api(api_type, result_key=nil, opts={}) </li></ul><ul><li>uri = &quot;#{API_URI_BASE}/#{api_type </li></ul><ul><li>}.json?api_key=#{API_KEY}&#{ </li></ul><ul><li>opts.to_a.map{|(k, v)| &quot;#{k}=#{v}&quot;}.join '&'}&quot; </li></ul><ul><li>hash = JSON.parse open(uri){|f| f.read} </li></ul><ul><li>result_key ? hash[result_key.to_s] : hash </li></ul><ul><li>end </li></ul>
  7. 7. How to Use Sounds on iPhone Web App <ul><li>/** IDEAL **/ </li></ul><ul><li>iknow3g.replay = function(url) { </li></ul><ul><li>var embed = document.createElement('embed'); </li></ul><ul><li>embed.setAttribute('src', url); </li></ul><ul><li>embed.setAttribute('hidden', true); </li></ul><ul><li>embed.setAttribute('autostart', true); </li></ul><ul><li>document.body.appendChild(embed); </li></ul><ul><li>setTimeout( </li></ul><ul><li>function(){document.body.removeChild(embed)}, </li></ul><ul><li>15000 </li></ul><ul><li>); </li></ul><ul><li>}; </li></ul>
  8. 8. How to Use Sounds on iPhone Web App <ul><li><!-- READL --> </li></ul><ul><li><embed </li></ul><ul><li>src=&quot;#{sound_url}&quot; </li></ul><ul><li>width=&quot;#{width}&quot; </li></ul><ul><li>height=&quot;#{height}&quot; </li></ul><ul><li>autostart=&quot;true&quot; /> </li></ul>
  9. 9. Tips <ul><li>Autostart does not work </li></ul><ul><li>Remove generated embed tags </li></ul><ul><li>Use size attribute in embed tag </li></ul>
  10. 10. Conclusion Let's develop iPhone Web App for iPhone

×