Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CouchDB android - Dot Logging

CouchDB android - Dot Logging

CouchDB jp Relaxon at 2011/04/29.
Introduce couchdb-android application with libcouch-android.

Motokazu Nishimura

May 06, 2011
Tweet

More Decks by Motokazu Nishimura

Other Decks in Programming

Transcript

  1. ·ͣ͸, jquery.mobile + CouchDB • CouchDBΛAndroidͰىಈ • couahapp push http://<androidͷip>:5984/dots

    • ϒϥ΢βͰ http://<androidͷip>:5984/dots/_design/dotlgng/index.html jsonΛpost ࣌ؒΛkeyʹ͠ ͯviewΛ࡞੒ Dot Logging (github) : https://github.com/motokazu/Dot-Logging 2011೥5݄6೔༵ۚ೔
  2. ໰୊఺ • ͙͢ʹೖྗ͍ͨ͠ͷʹɺͨ·ʹCouchDB͕ʢউखʹʣऴ͍ྃͯ͠Δ • CouchDBΛىಈͯ͠.. ϒϥ΢βΛ։͍ͯ [ dot ] ͠ͳ͍ͱ͍͚ͳ͍

    CouchDB androidͷbeta͔Βৗற͠ͳ͘ͳͬͨ ΞϓϦ͔Βಈ͔ͯ͋͛͠Δඞཁ͕͋Δ 2011೥5݄6೔༵ۚ೔
  3. libcouch-android Λ࢖͏ • ΞϓϦέʔγϣϯͷىಈͱڞʹɺCouchDBΛ্ཱͪ͛ͯ͘ΕΔ • git clone https://github.com/couchone/libcouch-android.git • eclipseͰطଘͷσΟϨΫτϦ͔ΒϓϩδΣΫτΛ࡞੒ʢ্هͰcloneͨ͠σΟϨΫτϦΛࢦఆͯ͠׬ྃʣ

    • ৽نͰAndroid ProjectΛ࡞੒ • AndroidManifest.xml Λ։͖ɺҎԼΛ௥Ճ • Android ProjectͷϓϩύςΟΛ։͖ Android Λબ୒ libandroid-couchΛબ୒ • https://github.com/couchone/libcouch-android/raw/master/src/com/couchone/libcouch/ExampleCouchApp.javaΛsrcσΟϨΫτϦʹί ϐʔ • javaΛ։͖, bootStrapDatabaseͱ appToLaunch Λ couchapp ͷ໊લʹมߋ (͜͜Ͱ͸dotlgng) • couchapp push ༻ʢlibcouch-android͕উखʹpushͯ͘͠ΕΔʂ) ͷdesign json Λexport͢Δ (json໊͸ appToLaunchͱ߹ΘͤΔ) • exportͨ͠design JSON Λ assets σΟϨΫτϦʹೖΕͯɺAndroidΞϓϦΛ Run ͢Δɻ ࢀߟɿhttp://arandomurl.com/2011/02/13/developing-with-couchdb-on-android.html <uses-permission android:name="android.permission.INTERNET"></uses-permission> couchapp push --export > dotlgng.json 2011೥5݄6೔༵ۚ೔
  4. ·ͱΊ • CouchDB on Android ΞϓϦΛ࡞੒͢Δࡍʹ͸ɺlibcouch-androidͱ͍͏બ୒ ࢶ͕͋Δɻ • σβΠϯυΩϡϝϯτ͚ͩΛ࡞੒ͯ͠ɺandroidΞϓϦʹ૊ΈࠐΉ͜ͱͰ؆ ୯ʹ࡞੒Մೳ

    • ΞϓϦΛcouchappͰ։ൃ͍ͯ͠Ε͹ɺcouchapp push --export ͰͰ͖Δ • libcouch-androidΛ࢖͏৔߹͸ɺDB໊͕ಛ༗ʹͳΔͷͰ஫ҙ͢Δ͜ͱ • Կ౓΋ىಈ͢Δͱɺ΍͸Γి஑Λফ໣͢Δ 2011೥5݄6೔༵ۚ೔