Your SlideShare is downloading. ×
  • Like
Mobile-Web Integration with Open Source Tools (2)
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Mobile-Web Integration with Open Source Tools (2)

  • 871 views
Published

This is the first half of the talk given by Lukhnos and Mikimoto Chuang. They talk about how to use open source tools and libraries to integrate mobile client software with server-side services. Some …

This is the first half of the talk given by Lukhnos and Mikimoto Chuang. They talk about how to use open source tools and libraries to integrate mobile client software with server-side services. Some thoughts and best practices are given. The cast study is TapExpense, an iPhone expense tracker. Also featuring their experiences in tackling wacky wifi/3G connections and CSV/XLS formats.

The talk is given at OSDC.tw 2009 on April 19, 2009

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
871
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
26
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. Mobile-Web Integration with Open Source Tools(2)
    • Mikimoto
    • CEO, Y.Tiger DIGITAL Inc.
  • 2.
    • Mikimoto 美樹本
    • 資深系統工程師、系統架構師、顧問
    • 過往專案經歷:族繁不及備載
    • 目前在玩 電子發票、國內外押匯、信用賒銷、 海運提單等金融系統
    • 專研軟體工程、系統分析
  • 3.
    • Server-Side Agenda
      • Server side skeleton
      • CSV Parser
      • Excel API
      • CakePHP Framework
      • Google Graph API
      • Demo
  • 4. Web Service’s NEXT STEP ?
  • 5.  
  • 6. Web Service
    • 已經廣泛被各界所使用
    • 有效減低系統複雜度、耦合度等問題
    • Cloud Computing ( 雲端運算 ) ?
  • 7. 其實 移動式裝置 才是 最需要 Cloud Computing 的對象 最需要 Cloud Computing 的對象 最需要 Cloud Computing 的對象
  • 8.
    • Server-Side 設計理念:
      • Client 端視為離線裝置
        • Shoot and forget
      • Interface
  • 9. Java CSV Parser
  • 10. String.split(regular express)
  • 11. But... 有規則就會有例外
  • 12. 資料中含有分隔字元 ( 貨幣 ...)
  • 13. 123,456.00 123.456,00
  • 14. xxxxxx, xxxxxx, "aaa,bbb,c "
  • 15. 分行字元 ?
  • 16. OpenCSV ( http://opencsv.sourceforge.net ) )
  • 17.
    • Read a CSV file
      • new CSVReader(FileReader, <quote>,<sp>,<skip line>)
      • String line = CSVReader.readNext();
      • List<String> list = CSVReader.readAll();
  • 18.
    • List<YourObject> list = CSVToBean.parse( ColumnPositionMappingStrategy, Reader );
  • 19.
    • Write a CSV file:
      • CSVWriter writer = new CSVWriter( new FileWriter(&quot;yourfile.csv&quot;), ' ');
      • String[] entries = {&quot; first &quot;, &quot; second &quot;, &quot;third &quot;}
      • writer.writeNext(entries);
      • writer.close();
  • 20.
    • Write a CSV file:
      • java.sql.ResultSet myResultSet = .... writer.writeAll(myResultSet, includeHeaders);
  • 21. Java Excel API ( http://jexcelapi.sourceforge.net / ) )
  • 22.
    • workbook = Workbook.getWorkbook( new File(&quot;myfile.xls&quot;)); Sheet sheet = workbook.getSheet(0); Cell a1 = sheet.getCell(0,0); Cell b2 = sheet.getCell(1,1); Cell c2 = sheet.getCell(2,1);
  • 23.
    • if (a1.getType() == CellType.LABEL) { LabelCell lc = (LabelCell) a1; stringa1 = lc.getString(); }
    • if (b2.getType() == CellType.NUMBER) { NumberCell nc = (NumberCell) b2; numberb2 = nc.getValue(); }
  • 24.
    • workbook = Workbook.createWorkbook( new File(&quot;output.xls&quot;)); WritableSheet sheet = workbook. createSheet(&quot;First Sheet&quot;, 0);
    • Label label = new Label(0, 2, &quot;A label record&quot;); sheet.addCell(label); Number number = new Number(3, 4, 3.1459); sheet.addCell(number); workbook.write();
  • 25. 世事無絕對,對人要更好 ...
  • 26.
    • Excel TimeStamp
      • Excel PC 上序列值以 1900-1-1 為 1 ,每過一天加 1
      • Excel Mac 上序列值以 1904-1-1 為 1
      • 用 Mac 打開 PC 版本, Copy/Paste 不會出錯,自己打就會出錯
      • Unix 以 1970-1-1 00:00:00 UTC ,每一秒加 1
  • 27.
      • Excel Bug:
        • From Lotus 1-2-3 當年為了市佔率
        • 1900 並不是閏年,但被當成閏年處理 ( 1900-1-1 ~ 1900-3-1, 會出現 1900-2-29 )
  • 28. CakePHP Framework ( http://cakephp.org / ) )
  • 29. 近似 RoR 的 PHP Framework PHP Framework
  • 30.
    • Model : post.php
    • Controller : posts_controller.php
    • Less than 10 lines code
    • It’s fucking working!! ( 感謝 Mat)
  • 31. Google Graph API
    • http://code.google.com/intl/zh-TW/apis/chart/
    • http://code.google.com/intl/zh-TW/apis/chart/types.html
    • http://chart.apis.google.com/chart? cht=p3&chd=t:60,40&chs=250x100&chl=Hello| World
    • 實際 Demo
  • 32. 成果展示