More Related Content
Similar to CategoLJについて (20)
More from Toshiaki Maki (20)
CategoLJについて
- 5. Categol CommonLisp版 つくってみたものの cl-buildが依存ライブラリをアップデートして動かん 導入の敷居が高すぎた。誰にもつかってもらえん 拡張性を高めるのが難しかった 各種DB対応 HTMLのテーマ変更 (cl-whoェ。。。) マルチスレッド系のバグ?でちょいちょいhunchentootがストプしてblogが落ちていた
- 16. DataAccess層を抽象化して拡張性を実現 (defprotocolDataAccess ;; entry (get-entry-by-id [this id]) (get-entries-by-page [this page count]) (get-entries-only-id-title [this count]) (get-total-entry-count [this]) (get-categorized-entries-by-page [this category page count]) (get-categorized-entry-count [this category]) (insert-entry [this entry]) (update-entry [this entry]) (delete-entry [this entry]) (get-all-category-list [this]) ;; user (auth-user [this user])) このAPIを実装すれば 誰でも好きなDBへの対応ができる
- 17. 設定ファイル(config.clj) {:theme "default", :title "CategoLJ", :port 8944, ;; MirageDataAccess :daccess {:ns am.ik.categolj.daccess.mirage.daccess, :params { ;; MySQL ;; :db {:classname "com.mysql.jdbc.Driver" ;; :subprotocol "mysql" ;; :subname "//localhost/categolj" ;; :user "root" ;; :password ""} ;; HSQLDB :db {:classname "org.hsqldb.jdbcDriver" :subprotocol "hsqldb" :subname "mem:categolj" :user "sa" :password ""} }}, } ここ見て動的に作成
- 18. MongoDB用設定 ;; Mongodb :daccess {:ns am.ik.categolj.daccess.mongodb.daccess :params { :db "categolj" :host "localhost“ :port 27017}}
- 19. Cassandra用の設定 ;; Cassandra :daccess {:ns am.ik.categolj.daccess.cassandra.daccess :params { :keyspace "categolj" :host "localhost" :port 9160}} 鋭意対応中
- 21. おわり まだ動けばいいやレベル 開発者絶賛募集中 試していじってプルリクエスト! $ git clone git://github.com/making/categolj.git $ leindeps $ leinjavac $ lein run server Accsess http://localhost:8944