利用 JQUERY MOBILE 架
構產生跨平台的 APP
JQUERY MOBILE + THEMEROLLER + CODIQA +
ELECTRICPLUM + WEINRE




         divaka / 2012/05/28
專案說明
   電動車電池監控平台

   Web Based System
     需具備管理功能



   App
     監控資訊用
專案開始了..


反正網站都已
經做了, 客戶又
要求 APP, 不如
再花點時間做
給它吧 !
APP 開發環境

   開發人數:1

   開發架構:軟硬整合專案

   開發時間:未知 ~ 3個月
       專案涉及四個跨國團隊


   開發 Device:尚未採購,先用老闆的..
這…
專案 Demo
   Web
     http://124.9.6.27:8080/sbma/entrance.jsp



   APP
     http://124.9.6.27:8080/sbma/mobile/index.html
ELECTRICPLUM
HTTP://WWW.ELECTRICPLUM.COM/SIMULATOR.AS
PX



目前用起來最順手的 APP 模擬軟體
可自選 iOS Device
不過..
   跟實際 iOS Device 的設備還是不太一樣
   iOS Device
     Touch Behavior
     No Scrollbar

     Re-render Component



   所以還是搞台 iPad, iPhone 來比較實際一點..
JQUERY MOBILE
HTTP://JQUERYMOBILE.COM/


快速開發跨平台手機 APP 的工具
jQuery Mobile 簡介
   A unified, HTML5-based user interface system
    for all popular mobile device platforms, built on
    the rock-solid jQuery and jQuery UI foundation.
    Its lightweight code is built with progressive
    enhancement, and has a flexible, easily
    themeable design.
jQuery Mobile 優點
   jQuery 延伸, 學習成本較低
   免費, Open-Source, 輕量
   可與電腦共用程式碼
   不需開發者帳戶即可測試
   跨平台




   跨 Device (跨瀏覽器解析度)
       Responsive Design
Responsive Design

                    自動根據瀏覽的
                    Device 呈現最佳瀏
                    覽體驗
jQuery Mobile 缺點
   效率較原生 Code 差
     維護與效率的   Trade-off

   無法操作手機硬體
     此部份可靠   phoneGap 等架構補強

   必須連上網路
   較難商品化
     效適用於內容型 App
jQuery Mobile 案例
   http://www.jqmgallery.com/
jQuery UI Component
http://jquerymobile.com/test/
jQuery Mobile 相關資源

   官方
       Forum
       Blog
       Resources

   Tutorial
       jQuery Mobile Tutorial: Creating a Restaurant Picker Web App
       http://msdn.microsoft.com/zh-tw/hh875190

   文章
       使用 jQuery Mobile 与 HTML5 开发 Web App ——开发原则

   簡報
       jQuery Mobile
       Mobile Web & HTML5 Performance Optimization
JQUERY MOBILE
LET’S DO IT
http://kuro.tw/blog/2012/02/15/hello-jquery-
mobile-jquery-mobile-2
jQuery Mobile Let’s do it

   Download jQuery Mobile Library
     http://jquerymobile.com/download/


   或引入以下程式碼 (CDN)
       <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0.1/jquery.mobile-
        1.0.1.min.css" />
       <script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
       <script src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script>



   Download Basic Project (dropbox)
     https://www.dropbox.com/home/front_end_study/20
        12_05_28%20(%E4%B8%80)/divaka
Step1
   產生基本架構 (List-View)
     主要是用             data-role 來定義各種樣式

    <div data-role="page" id="page-01">

      <div data-role="header">
        <h1>My Title</h1>
      </div><!-- /header -->

      <div data-role="content">
      </div><!-- /content -->

      <div data-role="footer">
        <h4>Footer content</h4>
      </div><!-- /footer -->

    </div><!-- /page -->
Step2
   建立資料清單與標頭


    <div data-role="content">
      <ul data-role="listview">
         <li data-role="list-divider">Overview</li>
         <li>ITEM</li>
         <li>ITEM</li>
         <li>ITEM</li>
         <li>ITEM</li>
         <li>ITEM</li>
      </ul>
    </div><!-- /content -->
Step3
   建立圓弧群組分類


    <div data-role="content">
      <ul data-role="listview" data-inset="true">
         <li data-role="list-divider">Overview</li>
         <li>ITEM</li>
         <li>ITEM</li>
         <li>ITEM</li>
         <li>ITEM</li>
         <li>ITEM</li>
      </ul>
    </div><!-- /content -->
Step4
   多層清單 (Nested list)
     <ul>   是無序清單 , <ol> 是有序清單


     <div data-role="content">
              <ul data-role="listview" data-inset="true">
                        <li data-role="list-divider">Overview</li>
                        <li>ITEM A
                                  <ol>
                                            <li>A-1</li>
                                            <li>A-2</li>
                                            <li>A-3</li>
                                  </ol>
                        </li>
              </ul>
     </div><!-- /content -->
Step5
   加入圖片 (Thumbnails)
     在每個
        li 的一開始加上一個 <img> , jQuery Mobile
     就會自動把它放在最左邊當做縮圖。



     <li>
             <img src="icon/ADOBE - Photoshop_48x48-32.png" />
             <h1>Photoshop</h1>
             <p>Description</p>
     </li>
Step6
   加入 Split Button
    將   list 內的資料利用 <a> 標籤拆成兩組
     data-icon=“gear“ 是內建的 iconSet (參考這)




    <li>
            <a href="#" oncilck=“#">ITEM A</a>
            <a href="#" data-icon="gear"></a>
    </li>
Step7
           加入超連結 (HyperLink) 到另一頁
             Data-transition         是指定動畫方式 (樣式可參考這裡)

<li>
        <a href="#page-02">page2</a>
</li>


<div data-role="page" id="page-02">
          <div data-role="content">
                     <ul data-role="listview" data-inset="true" id="another">
                                <li data-role="list-divider">another View</li>
                                <li><a href=“page-01" data-transition="slidedown"> view2 </a> </li>
                     </ul>
          </div><!-- /content -->
</div>
小技巧
   覆蓋原本的 CSS
     打開   FireFox 查看該元素的 class 直接另寫 CSS
     定義


   隱藏工具列 & 網址列
     請參見以下討論串

     http://stackoverflow.com/questions/9798158/how-
     does-jquery-mobile-hide-mobile-safaris-
     addressbar
THEMEROLLER
HTTP://JQUERYUI.COM/THEMEROLLER/


快速建立客製化 jQuery Mobile UI Theme
簡介
   類似 jQuery UI 的 Mobile 版
   自訂 font, corner radius, header, toolbar, content 的 CSS
CODIQA
HTTP://WWW.CODIQA.COM/


視覺化編輯 jQuery Mobile-based APP
Let’s See
但是..
   編輯器 BUG 還很多

   自動產生的程式碼有點怪

   只用來產生最初的骨架用
     原本的   library 只有純 JS code
WEINRE
HTTP://PEOPLE.APACHE.ORG/~PMUELLR/WEINRE/


手機版瀏覽器的 FireBug (追蹤 Mobile
JavaScript)
DEMO
//下載 Library
http://nodejs.org/#download

//在目標網頁加入以下 script , 記得換 IP
<script src="http://localhost:8080/target/target-script-min.js#anonymous" ></script>


//執行 weinre server
cmd > node weinre

//開啟以下 IP,再點開要 debug 的 Browser APP
http://localhost:8080/client/#anonymous
//會看到以下畫面,代表連線成功
http://kuro.tw/sites/default/files/images/weinre-6.png
請參考以下文章
   [教學]Node.js 安裝教學. node.JS install

   使用 Weinre 遠端 Debug 你的手機版網頁
    (Mobile Web)
測試工具列表
   http://www.mobilexweb.com/emulators
FUTURE WORK
PhoneGap 使用 Web Code 操作手機底層硬
體

More Related Content

PPTX
JQuery Mobile 框架介紹與使用 20140713
PPTX
jQuery入門
PPTX
JQuery Mobile 框架介紹與使用
PPTX
jQuery 教學 ( 搭配 EZoApp )
PPTX
前端MVC之backbone
PPTX
Uliweb设计分享
PDF
Angular js 入門介紹
PDF
Laughing ..
JQuery Mobile 框架介紹與使用 20140713
jQuery入門
JQuery Mobile 框架介紹與使用
jQuery 教學 ( 搭配 EZoApp )
前端MVC之backbone
Uliweb设计分享
Angular js 入門介紹
Laughing ..

Viewers also liked (20)

PDF
Location Location Location
PPTX
Technologies and processes
PPTX
Jhonner rondon informatica tema vi
PPTX
前端工程與Rwd _ 中原大學資管系
PPTX
How to describe places
PPT
Orientazioa kontrol txartela
PPT
Discussing characters within thriller
PPTX
Troy Dunnahoe Case Study
DOC
Fotos de Articulos 1
PDF
God's ultimate purpose rom8 18 30
PDF
UC Berkeley
PPTX
Presentation web 2.0
DOC
Fotos Articulos 2
PPT
Audience Evaluation
PDF
Judgement or discernment 18 august 2013 csg
PPTX
True Submission
PDF
#4 kingdom blueprint
PPTX
Mobile ux
PPTX
Audience Research
PPT
致勝談領導八金律
Location Location Location
Technologies and processes
Jhonner rondon informatica tema vi
前端工程與Rwd _ 中原大學資管系
How to describe places
Orientazioa kontrol txartela
Discussing characters within thriller
Troy Dunnahoe Case Study
Fotos de Articulos 1
God's ultimate purpose rom8 18 30
UC Berkeley
Presentation web 2.0
Fotos Articulos 2
Audience Evaluation
Judgement or discernment 18 august 2013 csg
True Submission
#4 kingdom blueprint
Mobile ux
Audience Research
致勝談領導八金律
Ad

Similar to jQuery Mobile (20)

KEY
Developer也可以做出漂亮網站 - Twitter Bootstrap/JQuery Mobile簡介
PPTX
20150717 從網頁開發到android app行動應用開發 發佈版
PDF
iPhone/iPad APP Development Class 101
PDF
鼎鈞數位行銷App營運實務全攻略
PDF
Axure RP Prototyping Tool
PDF
Take Advantage of UIWebView for iOS Native App Developers
PPTX
移动Web开发框架jqm探讨
PDF
以HTML5和COIMOTION打造跨平台App
PPTX
Mobile Web(preview version)
PPT
Inspire dgt 網路技術分享_手機網頁的二三事_20110214
PDF
2014南部創新應用工具研討會 快速開發行動 app
PDF
ASP.NET MVC 4 新功能介紹(快速上手) -twMVC#4
PDF
twMVC#04 | ASP.NET MVC 4 新功能介紹(快速上手)
PDF
APP Developer Program
PPS
Flash UI - &#21830;&#26989;&#25033;&#29992;&#26696;&#20363;&#25506;&#35342;
PDF
20120516 axure rp prototype design outline
PDF
如何在有限資源下實現十年的後端服務演進
ODP
Mobile web開發架構與入門
PDF
Inspire dgt 網路技術分享_手機版網頁製作簡介_20111221
PPT
第一次 Mobile App 就上手
Developer也可以做出漂亮網站 - Twitter Bootstrap/JQuery Mobile簡介
20150717 從網頁開發到android app行動應用開發 發佈版
iPhone/iPad APP Development Class 101
鼎鈞數位行銷App營運實務全攻略
Axure RP Prototyping Tool
Take Advantage of UIWebView for iOS Native App Developers
移动Web开发框架jqm探讨
以HTML5和COIMOTION打造跨平台App
Mobile Web(preview version)
Inspire dgt 網路技術分享_手機網頁的二三事_20110214
2014南部創新應用工具研討會 快速開發行動 app
ASP.NET MVC 4 新功能介紹(快速上手) -twMVC#4
twMVC#04 | ASP.NET MVC 4 新功能介紹(快速上手)
APP Developer Program
Flash UI - &#21830;&#26989;&#25033;&#29992;&#26696;&#20363;&#25506;&#35342;
20120516 axure rp prototype design outline
如何在有限資源下實現十年的後端服務演進
Mobile web開發架構與入門
Inspire dgt 網路技術分享_手機版網頁製作簡介_20111221
第一次 Mobile App 就上手
Ad

More from 彭其捷 Jack (20)

PDF
[演講簡報] Mopcon - 巧用 UI & UX 工具,提升設計溝通品質(彭其捷)
PDF
2021/3/22 亞洲大學|數位人文與互動科技
PDF
帶你一窺資料視覺化的神奇與奧妙(彭其捷)
PDF
2021/1/7|交大資管人的斜槓旅程
PDF
2020/12 交通大學_資料視覺化與我們的生活|彭其捷
PDF
2020/11 PyData|人人都可以學會的資料視覺化(彭其捷)
PDF
2020/11 台大地理系|Tableau 資料視覺化與地圖製作
PDF
2020_11 (南湖高中)用資料視覺化說故事
PDF
2020/11 中華電信|科技藝術與互動技術(製作者:彭其捷)
PPTX
2020_11 台北市立大學 特教學系|講題:善用設計思考,引導團隊溝通共識
PPTX
【台科大設計所】聊聊設計與數據思維|彭其捷
PDF
2020/8/15 AI學校:如何推動組織的 AI 團隊文化?(講者:彭其捷)
PDF
2020/7/25 台灣人工智慧學校|講題:AI與資料視覺化
PPTX
成大電機|大數據與使用者經驗設計 Workshop|彭其捷
PPTX
中原資管系|資管人的數位素養|彭其捷
PPTX
2019/11/28 環境數據分析|以空污分析為例
PDF
2019_11_21 世新大學|資料視覺化課程
PDF
【人工智慧學校】2019/11/22 AI 與特徵工程:PM觀點(彭其捷)
PDF
2019/10/27 創造力年會|用設計思考,讓團隊更有創造力|彭其捷
PPTX
2019年9月 台北科技大學分享(談閱讀與寫作)
[演講簡報] Mopcon - 巧用 UI & UX 工具,提升設計溝通品質(彭其捷)
2021/3/22 亞洲大學|數位人文與互動科技
帶你一窺資料視覺化的神奇與奧妙(彭其捷)
2021/1/7|交大資管人的斜槓旅程
2020/12 交通大學_資料視覺化與我們的生活|彭其捷
2020/11 PyData|人人都可以學會的資料視覺化(彭其捷)
2020/11 台大地理系|Tableau 資料視覺化與地圖製作
2020_11 (南湖高中)用資料視覺化說故事
2020/11 中華電信|科技藝術與互動技術(製作者:彭其捷)
2020_11 台北市立大學 特教學系|講題:善用設計思考,引導團隊溝通共識
【台科大設計所】聊聊設計與數據思維|彭其捷
2020/8/15 AI學校:如何推動組織的 AI 團隊文化?(講者:彭其捷)
2020/7/25 台灣人工智慧學校|講題:AI與資料視覺化
成大電機|大數據與使用者經驗設計 Workshop|彭其捷
中原資管系|資管人的數位素養|彭其捷
2019/11/28 環境數據分析|以空污分析為例
2019_11_21 世新大學|資料視覺化課程
【人工智慧學校】2019/11/22 AI 與特徵工程:PM觀點(彭其捷)
2019/10/27 創造力年會|用設計思考,讓團隊更有創造力|彭其捷
2019年9月 台北科技大學分享(談閱讀與寫作)

jQuery Mobile

  • 1. 利用 JQUERY MOBILE 架 構產生跨平台的 APP JQUERY MOBILE + THEMEROLLER + CODIQA + ELECTRICPLUM + WEINRE divaka / 2012/05/28
  • 2. 專案說明  電動車電池監控平台  Web Based System  需具備管理功能  App  監控資訊用
  • 4. APP 開發環境  開發人數:1  開發架構:軟硬整合專案  開發時間:未知 ~ 3個月  專案涉及四個跨國團隊  開發 Device:尚未採購,先用老闆的..
  • 6. 專案 Demo  Web  http://124.9.6.27:8080/sbma/entrance.jsp  APP  http://124.9.6.27:8080/sbma/mobile/index.html
  • 9. 不過..  跟實際 iOS Device 的設備還是不太一樣  iOS Device  Touch Behavior  No Scrollbar  Re-render Component  所以還是搞台 iPad, iPhone 來比較實際一點..
  • 11. jQuery Mobile 簡介  A unified, HTML5-based user interface system for all popular mobile device platforms, built on the rock-solid jQuery and jQuery UI foundation. Its lightweight code is built with progressive enhancement, and has a flexible, easily themeable design.
  • 12. jQuery Mobile 優點  jQuery 延伸, 學習成本較低  免費, Open-Source, 輕量  可與電腦共用程式碼  不需開發者帳戶即可測試  跨平台  跨 Device (跨瀏覽器解析度)  Responsive Design
  • 13. Responsive Design 自動根據瀏覽的 Device 呈現最佳瀏 覽體驗
  • 14. jQuery Mobile 缺點  效率較原生 Code 差  維護與效率的 Trade-off  無法操作手機硬體  此部份可靠 phoneGap 等架構補強  必須連上網路  較難商品化  效適用於內容型 App
  • 15. jQuery Mobile 案例  http://www.jqmgallery.com/
  • 17. jQuery Mobile 相關資源  官方  Forum  Blog  Resources  Tutorial  jQuery Mobile Tutorial: Creating a Restaurant Picker Web App  http://msdn.microsoft.com/zh-tw/hh875190  文章  使用 jQuery Mobile 与 HTML5 开发 Web App ——开发原则  簡報  jQuery Mobile  Mobile Web & HTML5 Performance Optimization
  • 18. JQUERY MOBILE LET’S DO IT http://kuro.tw/blog/2012/02/15/hello-jquery- mobile-jquery-mobile-2
  • 19. jQuery Mobile Let’s do it  Download jQuery Mobile Library  http://jquerymobile.com/download/  或引入以下程式碼 (CDN)  <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0.1/jquery.mobile- 1.0.1.min.css" />  <script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>  <script src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script>  Download Basic Project (dropbox)  https://www.dropbox.com/home/front_end_study/20 12_05_28%20(%E4%B8%80)/divaka
  • 20. Step1  產生基本架構 (List-View)  主要是用 data-role 來定義各種樣式 <div data-role="page" id="page-01"> <div data-role="header"> <h1>My Title</h1> </div><!-- /header --> <div data-role="content"> </div><!-- /content --> <div data-role="footer"> <h4>Footer content</h4> </div><!-- /footer --> </div><!-- /page -->
  • 21. Step2  建立資料清單與標頭 <div data-role="content"> <ul data-role="listview"> <li data-role="list-divider">Overview</li> <li>ITEM</li> <li>ITEM</li> <li>ITEM</li> <li>ITEM</li> <li>ITEM</li> </ul> </div><!-- /content -->
  • 22. Step3  建立圓弧群組分類 <div data-role="content"> <ul data-role="listview" data-inset="true"> <li data-role="list-divider">Overview</li> <li>ITEM</li> <li>ITEM</li> <li>ITEM</li> <li>ITEM</li> <li>ITEM</li> </ul> </div><!-- /content -->
  • 23. Step4  多層清單 (Nested list)  <ul> 是無序清單 , <ol> 是有序清單 <div data-role="content"> <ul data-role="listview" data-inset="true"> <li data-role="list-divider">Overview</li> <li>ITEM A <ol> <li>A-1</li> <li>A-2</li> <li>A-3</li> </ol> </li> </ul> </div><!-- /content -->
  • 24. Step5  加入圖片 (Thumbnails)  在每個 li 的一開始加上一個 <img> , jQuery Mobile 就會自動把它放在最左邊當做縮圖。 <li> <img src="icon/ADOBE - Photoshop_48x48-32.png" /> <h1>Photoshop</h1> <p>Description</p> </li>
  • 25. Step6  加入 Split Button 將 list 內的資料利用 <a> 標籤拆成兩組  data-icon=“gear“ 是內建的 iconSet (參考這) <li> <a href="#" oncilck=“#">ITEM A</a> <a href="#" data-icon="gear"></a> </li>
  • 26. Step7  加入超連結 (HyperLink) 到另一頁  Data-transition 是指定動畫方式 (樣式可參考這裡) <li> <a href="#page-02">page2</a> </li> <div data-role="page" id="page-02"> <div data-role="content"> <ul data-role="listview" data-inset="true" id="another"> <li data-role="list-divider">another View</li> <li><a href=“page-01" data-transition="slidedown"> view2 </a> </li> </ul> </div><!-- /content --> </div>
  • 27. 小技巧  覆蓋原本的 CSS  打開 FireFox 查看該元素的 class 直接另寫 CSS 定義  隱藏工具列 & 網址列  請參見以下討論串  http://stackoverflow.com/questions/9798158/how- does-jquery-mobile-hide-mobile-safaris- addressbar
  • 29. 簡介  類似 jQuery UI 的 Mobile 版  自訂 font, corner radius, header, toolbar, content 的 CSS
  • 32. 但是..  編輯器 BUG 還很多  自動產生的程式碼有點怪  只用來產生最初的骨架用  原本的 library 只有純 JS code
  • 34. DEMO //下載 Library http://nodejs.org/#download //在目標網頁加入以下 script , 記得換 IP <script src="http://localhost:8080/target/target-script-min.js#anonymous" ></script> //執行 weinre server cmd > node weinre //開啟以下 IP,再點開要 debug 的 Browser APP http://localhost:8080/client/#anonymous //會看到以下畫面,代表連線成功 http://kuro.tw/sites/default/files/images/weinre-6.png
  • 35. 請參考以下文章  [教學]Node.js 安裝教學. node.JS install  使用 Weinre 遠端 Debug 你的手機版網頁 (Mobile Web)
  • 36. 測試工具列表  http://www.mobilexweb.com/emulators
  • 37. FUTURE WORK PhoneGap 使用 Web Code 操作手機底層硬 體