ものがたり(旧)

atsushieno.hatenablog.com に続く

Mono Summit Notes 2日目 (2007/11/29)

聞き取れる範囲だけ*1、ほとんどメモ書きのままだけど、とりあえず。

NUnit

  • 去年と同じネタ。unit testingの歴史。NUnitの歴史(2.2.4まで)。1.xはJUnitライク。2.0は.NETism (attribute, GUI)、2.1でMonoサポート、2.2で.NET 2.0サポート、2.2.4は2.4の一部を含むリリース。
  • 現在のバージョンは2.4.5, mono/monodevelopで使われているのは2.2.0。2.2系列の最終版は2.2.10。→古いぞゴルァ!
  • 2.4の機能: nunit.core.interfaes, wix-based windows installer, mono-2.0プロファイルサポート, AreEqual/AreNotEqual on array, CollectionAssert, FileAssert, flat list of test fixtures, merge tests across assemblies, テストの並列実行(デフォルトで無効)、アドインアーキテクチャ etc.
  • Assert.That(result, Is.EqualTo (123)) の話。自然言語(この場合英語)に近づけている。さらに、Assert.That(result, Contains.Item ("foo").IgnoringCase) とか。もっともコレはプログラミング言語依存なのだよね…というオチ。managed C++ではダメかも。
  • NUnit 2.4のデモ。今までのと同じ。
  • NUnitVSTSについて。目的は同じだが、VSTSはVS専用。VSTSプログラマー用というかテスター用でもある。NUnitの方が利用できるテストメソッドが多い(が、それは大した問題ではないだろう)。
  • NUnit 3.0の機能。extended testing platform (runner, engine, frameworks)

Mono on the Mac

kangaroo (Geoff)によるセッション。これはすげー。

  • Macサポートの歴史。
    • Cocoa# - .NET Bindings for Cocoa. 自動生成できないか? .NET的にするか、Cocoa的にするか? どうすればいいかね
    • MWF - win32イベントモデルをCarbonモデルに翻訳するのは難しい(ウィンドウがMWFウィンドウのものかどうかチェックする必要があったりとか)。クリッピングに関して独特の問題が多い(全部解決するのに半年くらい必要?)。64ビットドライバが必要か?(たぶんいらんのでは)
    • Gtk# - ImendioがGtk+ Quartzドライバを書いた。Gtk#は単にその上で動作するだけ。サードパーティのパッケージングはめんどくさい(Gtk+からパッケージングするか、とか)。
    • Objc# - 双方向のCLR<->ObjCブリッジ。今のところアカデミックプロジェクト
    • Dumbarton (imeem)
  • Community - Macコミュニティはとてもlocal, passionate, but does not contribute. 改善できるか。コミュニティは我々に何を求めているのか。(セッション外; ユーザーはたくさんいるがX11まで降りてくる開発者はあまりいない。Mono on Macはかなりトリッキーな位置にある)
  • デモ:
    • Objc# - System.EventHandlerをObjcコードで呼び出すサンプル(RCW/CCWみたいな感じ)
    • Cocoa# - interface builderを使ってcocoaでデザイン(cocoaGtk#的レイアウトもwinforms的レイアウトもサポート。2.0ではwinformsもrelative layoutをサポートするような…)。
    • Gtk# -(短い間にやっていて見逃した!)
    • MWF - まだsvnにも入っていない。Tetris。まだ問題はある。reflectorも動く。
  • two more things in this week:

最後の2つ、けっこうビックリなんですけど。

Q&Aはほとんど聞こえなくて逃してしまった。

どうでもいい話だけど、Geoffは「じぇふ」と発音するので、最初Jeffと聞き間違えてしもうた。一緒に昼飯を食って、その後IRCでどこにいたのかと訊いたら「おまいの横に座ってたぞ」…

DB4Objects

去年はJBだったが、今年はRodrigoによるセッション。

  • native object storage and persistence w/o serialization. no schema.
  • design decisions: easy development (xcopy, no separate DB installation), zero admin (hot backup, defrag, app-managed authorization)
  • native design: prog language is the standard, DB should be as transparent as possible, persistence should be of no concern
  • Create, Read, Uupdate, Delete:
    • create: using (IObjectContainer container = Db4oFactory.OpenFile ("foobar.odb") container.Set (new Sketch ("foobar"), 5);
    • read:
      • container.Query (delegate (Sketch s) { return s.Rating == 5; }); ... or ...
      • container.Qyery (s => s.Rating == 5);
      • Delegate.Method gives us the method behind it
      • Mono.Cecil gives the IL stream
      • Cecil.FlowAnalysis gives blocks with expressions
      • Expressions are translated to SODA
      • QueryByExample
      • Explicit Activation
      • Transparent Activation (IActivatable) : db4otool.exe -ta MyAss.dll ; bytecode enhancement (w/ cecil)
    • update: beware of the update death (depth issue)
    • delete: configurable cascading behavior, cancellable deletion
  • Development Process:
    • multiplatfom - mono/net_1_1/net_2_0/netcf_1/netcf_2/j2me/java1_1/java1_3/java5/net_3_5/android !
    • DontRelyonYourself - java code is automatically converted and beautified to C#.
    • agile, weekly iteration, test first
  • The future (7.0) - NQ and TA, LINQ to follow soon after, Transparent updates/deletes, Querying improvements
  • Q&A
    • Q: how about versioning compatibility? A: DB4O holds metadata. for runtime type, you take care. for renamed members, configuration. DB format is the same, so actually C# and Java can share the data (but very unlikely happen).
    • Q: benefit of DB4O over Linq to SQL? A: Linq requires DB. Linq to Entity requires mapping == annoyance.
    • Q: how about transactions? A: DB4O supports (transaction?) semantics. Transaction things are indeed different (for embedded environment / for server environment).

mono on embedded system

↑が終わってから、ほぼ終わってから参加したので、詳細は分からないが、openmoko, OLPC, Sansaといった、monoを組み込んでいる物件をいろいろ紹介していたようだ。前日の晩に「英語でプレゼンするのが難しいなら、ヒントでおれらが1単語ずつ教えるから、それを入れてみろよ」と言っていたのを、Everaldoが本当にやっていて笑えた。

Developing Desktop Applications with Moonlight

Stephaneによるセッション。最近moonlightチームに参加したばかりだけど、昔からf-spotハッカーだった人だ。

  • Moonlightは何であるか: drawing kit/rendering engine / 何でないか: widget kit ... but Contols would come soon
  • アドバンテージ: rich/animated widgets, bring web developers/app/fun on the desktop, RAD
  • SL 1.0 for desktop - no interaction w/ hosting app. JS only works in a browser. アニメーションや広告くらいにしか使えない
  • SL 1.1 : XAML + .NET interaction
  • デモ: Gtk.Moonlight.
  • how to develop 1.1 widgets: GtkSilverを使う。

GtkSilver s = new GtkSilver ();
s.Attach ((System.Windows.Controls.Canvas) sl_canvas);
// assume that canvas.InitializeFromXaml () is used

  • デモ: f-spot add-inとして、選択された画像をsurfaceみたいにいじるコードサンプル

Gaia Ajax Widgets

前半の間に休憩していて聞き逃した…が、基本的には↓にあるサンプルをソースコードを見ながら解説していたようだ。
http://ajaxwidgets.com/

*1:改めて強調しておきますが、ワタシは英会話が苦手ですw