From: Masao M. <mu...@hi...> - 2002-05-20 17:43:48
|
むとうです@ねむい...。 On Tue, 21 May 2002 00:58:08 +0900 TADA Tadashi <sh...@sp...> wrote: > ただただしです。 > まず、reader/writerは同一クラス。で、tdiary.conf内の@io_classにそ > のクラスを指定することで現在のHEADでも切り替え可能になっています。生 > 成はTDiaryクラスが行います。 (以下ざっくり略) えっとよくわかってないのと、全く論点がずれてるかもしれないんですが....。 私的には、毎日、パーサを変更できたらうれしいなぁと思います。 例えば、今日はhnfで、明日はRDで、昨日はtDiary標準で、みたいな感じです。 登録画面から選択できるようにしますが、通常はどれか1つをメインで使う はずですので、それはtdiary.confかなんかにデフォルト値として書くとか。 #どこにどのような形式で保存するかという意味でのReader/Writerはここでは #考慮してません。 日々の日記はその日記のパーサの情報を持つ(バージョン込み)と。 こうしておけば、例えば、パーサの形式が変わったりしても、以前の日記には 影響しないようにできますし、今までの日記はtDiaryデフォルトのパーサとしておけば 移行する必要が無くなるようにできる気がします。 そうなると、逆にParserとVisitorは常に対になるイメージかな。 Reader/Writerは特にParser/Visitorを知っている必要はなく、その日のデータ 自身が、どのParser/Visitorを使うのかを知っているという感じです。 そういうわけで、私のイメージでは、Reader/Writerはあくまでも何に(DBとかPStoreとか テキストファイルとか...)どのような(バイナリか、テキストか、XMLかPlain Textか...) 形式で保存・読み出しをするのかという機能を持たせるだけになります。 日記データの持ち方に工夫が必要になるかもしれませんが。 なんか変なこと書いてるかもしれません、ちょっと寝ぼけてます(^^;)。 それでは。 -- .:% Masao Mutoh<mu...@hi...> |