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 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 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 persistance (ActiveRecords) from plain model objects that do not extend the framework and may not necessarily require long-term persistance.

Tyler posted more details under his Blog post "Using OpenStruct for transient data models"

No comments: