View All Posts. MiCHiLU.com powered by Django ;-)

Start Presentation via s6 by amachang.


[Django][s6]: Google Gears

2007/12/12 翔泳社さんにて開催の Python Workshop the Edge 2007 でLTを発表させていただきました。資料を掲載します。当日は持ち時間ちょうどでしたので触れませんでしたがDjangoついての情報も載せています。

自己紹介

Django オンラインドキュメント和訳

http://michilu.com/django/doc-ja/index/

/static/media/20071212/djangoproject120x25.gif

Google Code

http://code.google.com/u/Takanao.Endoh/

Google Gears

http://gears.google.com/ http://code.google.com/p/google-gears/

/static/media/20071212/icon.png

Google Gears is

an open source browser extension that lets developers create web applications that can run offline.

Require

Features

LocalServer

/static/media/20071212/localserver.gif

Cache and serve application resources locally (HTML, JavaScript, images, etc.)

Database

/static/media/20071212/database.gif

Store data locally in a fully-searchable relational database (SQLite)

WorkerPool

/static/media/20071212/workerpool.gif

Run asynchronous Javascript to improve application responsiveness (threading)

DEMO

Django オンラインドキュメント和訳 http://michilu.com/django/doc-ja/index/

Sample Code

Django Views

def doc_index_json(request, target_dir, base_url, callback=None):
    result = dict()
    timestamp_dict = util.get_timestamp(target_dir, extension=".txt")
    for key, value in timestamp_dict.items():
        key = base_url % key[:key.rindex(".")]
        result[key] = dateformat.DateFormat(value).format("r")
    result = "[%s]" % simplejson.dumps(result)
    if callback:
        result = to_jsonp(callback, result)
    return HttpResponse(result, mimetype=mimetype("json"))

Django Views

詳しくは

http://michilu.googlecode.com /svn/trunk/doc/views.py

JavaScript

function updating (JSON) { count.reset();
    for (var key in JSON){
        if ( localServer.isCaptured(url) &&
            Date.parse(JSON[key]) <= Date.parse(
                localServer.getHeader(url, "Last-Modified"))) {
        } else { count.up();
            localServer.capture(url, function(){count.down();});
        };
    };
};

JavaScript

詳しくは

http://michilu.com/static/doc-ja/js/site.js

Google Gears Databese

SQL on JavaScript

Google Gears ORM

http://www.urielkatz.com/archive/tag/GearsORM/

with Django

Django Offline

http://code.google.com/p/django-offline/

><

ソースは まだ ないよ (はぁと)

Architecture

UI
 |
jQuery
 |
Switcher  <-- (Online) -->  Django  <-->  Database
 ^
 |
 +- (Online? Offline?) -->  Google Gears (Database)

Architecture

Architecture

via apexdevnet.com

まとめ

Google Gears は便利

Django なら

オフ ラインドキュメント和訳 」

があるよ!

by

ご清聴ありがとうございました

Extras

Django-ja 絶賛募集中!!!

和訳してくれる人も募集中!!!

Django-ja at lingr

http://www.lingr.com/room/django-ja

Django 紹介

MVC vs MVT, TESTツール付属, バッテリ付属, スケーラビリティ, SQLArchemy, Cache, クールなAdmin画面, Middleware, Generic Views

and more Google Code

Documents

The END

Sat, 15 Dec 2007 22:20:46 +0900 source edit
Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.1 Japan License.

Comments


View All Posts. MiCHiLU.com powered by Django ;-)