Mobile-Web Integration with Open Source Tools (2)

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.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    Mobile-Web Integration with Open Source Tools (2) - Presentation Transcript

    1. Mobile-Web Integration with Open Source Tools(2)
      • Mikimoto
      • CEO, Y.Tiger DIGITAL Inc.
      • Mikimoto 美樹本
      • 資深系統工程師、系統架構師、顧問
      • 過往專案經歷:族繁不及備載
      • 目前在玩 電子發票、國內外押匯、信用賒銷、 海運提單等金融系統
      • 專研軟體工程、系統分析
      • Server-Side Agenda
        • Server side skeleton
        • CSV Parser
        • Excel API
        • CakePHP Framework
        • Google Graph API
        • Demo
    2. Web Service’s NEXT STEP ?
    3.  
    4. Web Service
      • 已經廣泛被各界所使用
      • 有效減低系統複雜度、耦合度等問題
      • Cloud Computing ( 雲端運算 ) ?
    5. 其實 移動式裝置 才是 最需要 Cloud Computing 的對象 最需要 Cloud Computing 的對象 最需要 Cloud Computing 的對象
      • Server-Side 設計理念:
        • Client 端視為離線裝置
          • Shoot and forget
        • Interface
    6. Java CSV Parser
    7. String.split(regular express)
    8. But... 有規則就會有例外
    9. 資料中含有分隔字元 ( 貨幣 ...)
    10. 123,456.00 123.456,00
    11. xxxxxx, xxxxxx, "aaa,bbb,c "
    12. 分行字元 ?
    13. OpenCSV ( http://opencsv.sourceforge.net ) )
      • Read a CSV file
        • new CSVReader(FileReader, <quote>,<sp>,<skip line>)
        • String line = CSVReader.readNext();
        • List<String> list = CSVReader.readAll();
      • List<YourObject> list = CSVToBean.parse( ColumnPositionMappingStrategy, Reader );
      • 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();
      • Write a CSV file:
        • java.sql.ResultSet myResultSet = .... writer.writeAll(myResultSet, includeHeaders);
    14. Java Excel API ( http://jexcelapi.sourceforge.net / ) )
      • 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);
      • if (a1.getType() == CellType.LABEL) { LabelCell lc = (LabelCell) a1; stringa1 = lc.getString(); }
      • if (b2.getType() == CellType.NUMBER) { NumberCell nc = (NumberCell) b2; numberb2 = nc.getValue(); }
      • 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();
    15. 世事無絕對,對人要更好 ...
      • 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
        • Excel Bug:
          • From Lotus 1-2-3 當年為了市佔率
          • 1900 並不是閏年,但被當成閏年處理 ( 1900-1-1 ~ 1900-3-1, 會出現 1900-2-29 )
    16. CakePHP Framework ( http://cakephp.org / ) )
    17. 近似 RoR 的 PHP Framework PHP Framework
      • Model : post.php
      • Controller : posts_controller.php
      • Less than 10 lines code
      • It’s fucking working!! ( 感謝 Mat)
    18. 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
    19. 成果展示

    + Mikimoto ChuangMikimoto Chuang, 6 months ago

    custom

    544 views, 0 favs, 0 embeds more stats

    This is the first half of the talk given by Lukhnos more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 544
      • 544 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 19
    Most viewed embeds

    more

    All embeds

    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