1.13.2009

About PropertiesBag

最近都在忙有關MOSS的開發, 遇到一個狀況. 就是說當我開發一些SharePoint上面的應用程式時 當然會遇到要儲存資料的狀況. 一般來說 我們會把資料盡量放在SharePoint的List中. 但是如果是一些Configuration呢?

因為大部分是簡單的資料, 所以後來的做法是放到Web Site的PropertiesBag, 單純的Key Value Pair, 相對很方便.

不過後來就是因為這個所以有痛到, 因為系統有跑Content Deployment, 所以會把資料從開發環境送到正式環境. 是的, 正如你想像, PropertiesBag會蓋過去. 這下子就死定了.

所以這告訴我們, 當有Content Deployment時, 很多東西的處理上要改變一下.

 

Recently I am busy with some application development on SharePoint. Here is a usual case for the development, there always have some data have to stored, most of them are simple value, as configuration.

In the first, we stored it in SharePoint List or PropertiesBag.Seems good, right? Everything is good until deploy to another server farm. The propertiesBag will copy in content deployment! oh….My database connection, web site id…etc….

This is the lesson, we must change the view when we are utilize SharePoint content deployment