跳到主要內容

發表文章

軟體開發工程師的十大特質

軟體開發工程師的十大特質(上) 軟體開發工程師的十大特質(中) 軟體開發工程師的十大特質(下) 非常認同以上文章觀點,不過不知道這樣特質的工程師在台灣業界市場機制中是否真有價值。尤其是IT委外的紅海當中,工程師似乎不管能力,只有一個價錢,而且還越來越低,如果優秀的工程師不能令客戶出更多的錢,那麼有誰會願意努力成為優秀的工程師。 我也不瞭解,難道系統真的隨便一個人都可以作嗎?走了隨便找一個人都可以取代嗎?

MySql 5 中文問題

簡單心得: my.ini [mysqld] ...略 # The default character set that will be used when a new schema or table is # created and no character set is defined #default-character-set=latin1 default-character-set=utf8 注意:是utf8不是utf-8,寫錯將導致MySQL服務無法啟動。 每個table在設定欄位都要指定為utf-8(column charset, column collate) 此圖是MySQL Query Browser的設定畫面。 如果你原本已經設定了其他編碼,要改成utf8,文字內容可不會自行轉碼,你要自己想辦法將文字內容轉換再存進去。

How to Change policy owner with IRM SDK

1. use context object to register a document and the return value for document id. 2. use document id to load it's policy. 3. new a LimitList and set desired owner and set the LimitList to the document 4. change the document owner 5. save the document, that document now can only be opened by the desired owner.

BeanDefinitionStoreException with ClassFormatError

使用Spring過程中突然發生application server啟動即出現bean definition file parsing的以下錯誤: BeanDefinitionStoreException: Unexpected exception parsing XML doc ument from class path resource.. nested exception java.lang.ClassFormatError: Unknown constant tag 0 in class file com/sun/org/apache/xerces/internal.. 詳細檢查了數次都找不到xml哪裡有錯。 ClassFormatError這個錯誤很少見,似乎是JVM內Hotspot相關的錯誤,而且同時其他所有舊的project使用Spring原本可以正常執行的,現在都會產生這個錯誤。 研判可能是JVM出了什麼問題,重裝JDK1.5這個問題就消失了。

使用Spring的HibernateDAOSupport可能遇到的Lazy initialization問題

在專案中我們使用DAO這個pattern來封裝資料庫存取層,Hibernate Quickly (Manning)中建議我們可以繼承Spring所提供的HibernateDAOSupport來簡化DAO程式碼,這是很常見的作法。 原本method重複性很高的部份: public void create(Event event) throws DataAccessLayerException { try { startOperation(); session.save(event); tx.commit(); } catch (HibernateException e) { handleException(e); } finally { HibernateFactory.close(session); } } 可以被簡化為: public abstract class AbstractSpringDao extends HibernateDaoSupport{ public AbstractSpringDao() { } protected void saveOrUpdate(Object obj) { getHibernateTemplate().saveOrUpdate(obj); } protected void delete(Object obj) { getHibernateTemplate().delete(obj); } ... } 都透過Sprgin提供的HibernateTemplate幫我們作掉那些重複的開、關session, transaction動作。 以下擷取自Spring原始碼 package org.springframework.orm.hibernate3; ... public class HibernateTemplate extends HibernateAccessor implements HibernateOperations { ... public Object execute(HibernateCallback action) throws DataAccessException { Session session = (!this.a...

一個Web Application系統架構 (Spring + Struts + Hibernate)

近期使用這三套framework作系統,系統架構如下: 其中使用的Design Pattern: MVC: To separate core business model functionality from the presentation and control logic that uses this functionality. Such separation allows multiple views to share the same enterprise data model, which makes supporting multiple clients easier to implement, test, and maintain. Front Controller Use a controller as the initial point of contact for handling a request. The controller manages the handling of the request, including invoking security services such as authentication and authorization, delegating business processing, managing the choice of an appropriate view, handling errors, and managing the selection of content creation strategies. DAO(Data Access object) To abstract and encapsulate all access to the data source. The DAO manages the connection with the data source to obtain and store data. 如果同時運用這三個application framework,這樣的架構算是很常見。 Pros: 運用struts前端控制器(front controller)來集中管理頁面導引 Struts custom tag來強化 JSP的不足 用Sp...

Documentum E20-120 Content Management Foundations 考試心得

瞭解考試主題範圍 。因為相關的文件很多,如果要全部讀完才參加考試太過耗時。因為考試題目完全以官方所列的主題為主,連認證成績單上的得分率都以官方所列的主題作分類來評分。 [考試成績單] 所以考試主題作為準備的主軸會是比較有效率的方式,官方網站上可以抓到E20-120 Content Management Foundations Exam Exam Description。 [ExamDescription] 詳讀每個主題內容所描述的子題,以此準備可以確保不會漏掉任何一個方面。 [subTopics] 閱讀各項使用手冊 。單純只讀官方訓練教材只能給你一些基本概念,但是有些細節還是需要查手冊。以下是可能會需要參考的手冊清單 Content Server Fundamentals Content Server Administration Guide Content Server DQL Reference Manual Object Reference Manual Documentum Administrator User Guide 官方網站上的產品介紹 作筆記。 自行整理相關概念,可以幫助記憶。我是採用心智繪圖(Mind Map)來作筆記。 [DocumentumMindMap] 反覆作模擬試題來確定自己準備的狀況 。 EMC官方網站有模擬試題( 連結 )不過數量很少,只能算熱身瞭解一下題型。 dm_cram 有討論區與大量模擬試題的資源,還依照主題將模擬試題分類,所以你可以讀一個主題就練習該個主題的模擬試題,非常有利於複習。雖然模擬試題有許多複選題,不過實際考試的時候都是單選。 另外還有討論區可以與其他參加認證的人交流,這是我目前查到唯一的Documentum認證考試資源網站。 Documentum Content Mangement Foundations: EMC Proven Professional Certification Exam E20-120 Study Guide這本書的作者 Pawan Kumar也在這個論壇上活動,所以應該可以得到很正確的解答。 不過網站上的模擬試題有部份我覺得太刁鑽,如果真的查詢手冊找不到答案,我想應該可以忽略。