Tuesday, November 28, 2006


Ever heard of POJOs? Plain Old Java Objects? That term got popularized in the Java world after the backlash against EJBs a few years ago. Enterprise JavaBeans were considered heavy-weight, cumbersome to write and maintain, and over-engineered. POJOs were a cry-out to return to the roots of Java development in applets and desktop apps when using plain objects and JavaBeans was the norm.

POROs is a term that my colleague Tyler Jennings coined today while we were pair-programming on our Rails project. It stands for Plain Old Ruby Objects. Tyler used the term to refer to a model object that is not created as a Rails ActiveRecord.

ActiveRecords are somehow equivalent to Entity Beans in Java 2 Enterprise Edition except they are much lighter, and do not put much burden on the developer. So, the use of the term POROs was not a backlash in any way against them. It was simply used for convenience to distinguish model objects that are written for long-term persistence (ActiveRecords) from plain model objects that do not extend the framework and may not necessarily require long-term persistence. Such objects may then follow Domain Driven Design patterns such as Value Object, Service, Aggregate, and Factory.

No comments: