.NET framework essential Chapter 4

Chapter 3 主要是講各種語言的介紹與互相操作,大致都已經知道,沒什麼要紀錄的。
接著記 Chapter 4 的一些東西。

  • 只要在 .config 裡面使用 bindingRedirect,就可以重新導向相依的assembly到新版本的assembly。.config 裡的 attribute:runtime / assemblyBinding / dependentAssembly
  • Remoting object 的程式真的出乎意料地簡單,以前從沒研究過,有機會來試試效能,看看傳一堆物件或是 Dataset 的效能如何。
  • 有一個 Attribute 的簡單範例…
  • 支援 Transaction 的要件:
    1. 繼承 ServicedComponent
    2. 使用正確的 Transaction attribute

    接著就可用 System.EnterpriseServices.ContextUtil。此外最好也指定 ApplicationName、ApplicationActivation 等組件attribute。.NET 會在編譯時自動把組件加入 COM+ Service 裡,無須自己動手註冊。這邊還有 Object pooling、Role base、Message Queuing 的例子,很淺顯易懂。這部份在 Mono 裡都沒有被實作出來,主要是因為 COM+ 在 Linux 下沒有替代品的關係。

在 Banshee 1.0 裡使用 BooScript

有兩種方法:

  1. 執行 Banshee 時,加上 –run-scripts your_boo_scripts.boo 表示要執行指定的 boo script
  2. 將 boo script 檔案放在 ~/.config/banshee-1/boo-scripts/

如果你會 Boo 的話,基本上就不難幫 Banshee 增加功能。不過難就難在你必須要對 Banshee 的原始碼有一定程度的了解…除了看原始碼以外,也可以看看官方提供的 extension 怎麼寫…