POJO

簡單介紹

原名 : Plain Old Java Object,又稱 簡單 java 對象

即為沒有繼承任何類別沒有實作介面不具有特殊角色更沒有被其他侵入的 JAVA 對象。

更不是JavaBean 、EntityBean 等等。

Martin Fowler says

The term was coined while Rebecca Parsons, Josh MacKenzie and I were preparing for a talk at a conference in September 2000.

In the talk we were pointing out the many benefits of encoding business logic into regular java objects rather than using Entity Beans.

We wondered why people were so against using regular objects in their systems and concluded that it was because simple objects lacked a fancy name.

So we gave them one, and it's caught on very nicely.

參考資料

https://blog.csdn.net/chenchunlin526/article/details/69939337

Last updated

Was this helpful?