09 julia 开源移动开发框架

545 views
504 views

Published on

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

  • Be the first to like this

No Downloads
Views
Total views
545
On SlideShare
0
From Embeds
0
Number of Embeds
8
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

09 julia 开源移动开发框架

  1. 1. Javascript Java
  2. 2. Java/XML = Android• Java• Android Subclassing• XML
  3. 3. Java• 2.2 JIT• Eclipse• met/src/cc/miankong/julia/... cd ../../../ “ ”
  4. 4. Javascript••• GUI•• Chrome• Julia
  5. 5. Android• ViewGroup View?• Subclassing • Smalltalk subclassing • iOS subclassing
  6. 6. AndroidsetPositiveButton( android.R.string.ok, new AlertDialog.onClickListener() { public void onClick( DialogInterface d, int which) { ... }}) onClickListener Java
  7. 7. Julia Controllertouched: function(what) { if (what === “1”) { // ok } // cancel}
  8. 8. XML XML<?xml version=”1.0” encoding=”utf-8”?><shape xmlns:android=”http://schemas.android.com/apk/res/android”android:shape=”rectangle”> <gradient android:startColor=”#414141” android:centerColor=”#202020” android:endColor=”#080808” android:angle=”270” /></shape>
  9. 9. JuliaHTML5/CSS3 View <div class=”btn” data-touchable=”takePicture”> <label class=”cam-gradient”></label> </div>
  10. 10. Android ListView• Adapter• ListView
  11. 11. Model + Template <ul class="table">! ! {% for(var i=0; i < x.length; i++) { %}! ! <li data-touchable="pushProfileView"! ! ! data-user="{{ x[i].gid }}:{{ x[i].screenName }}">! ! ! {% if (x[i].profileImageUrl) { %}! ! ! ! <img src="{{ x[i].profileImageUrl }}">! ! ! {% } %}! ! ! <div><label>{{ x[i].screenName }}</label></div>! ! ! <span class="more"></span>! ! </li>! ! {% } %}</ul>
  12. 12. Model + Template JSP ModelView
  13. 13. RESTful Model URL + Converter refresh : function(postId, apiUrl) {! ! var url = apiUrl || (appNamespace.HOST + "/api/met/get"),! ! ! data = {id: postId};! ! this.oauthREST(url, data, function(self, response) {! ! ! self.patch(response);! ! ! self.set({x: response});! ! }, null);! }
  14. 14. Julia MVC• HTML5/CSS3 View• REST Model• JSP Template• Delegation
  15. 15. Julia SQLite jsi.sqlInsert( "keyvalue", { key:appNamespace.SNAP_HINT_DISPLAYED_KEY, value: "1" }, function(lastRow){});
  16. 16. Julia SQLite• Table•• HTML5 Web Worker Web Storage
  17. 17. Julia• JS Julia• Template• DOM Webkit Reflow/Layout• CSS3
  18. 18. Julia DOMNavigationViewView View DIV
  19. 19. • Python/Ruby/ Apache HttpClient•••
  20. 20. JuliaAPI JS http://www.miankong.cc/julia/

×