Plain Old CLR Object

"POCO" redirects here. For other uses, see Poco (disambiguation).

Plain Old CLR Object or POCO is a play on the term POJO, from the Java EE programming world (which was coined by Martin Fowler in 2000 [1]), and POTS Plain old telephone service, from the analog telephone world, and is used by developers targeting the Common Language Runtime of the .NET Framework. Simply put, a POCO does not have any dependency on an external framework.

Similar to the Java context, the term is used to identify an object as a simple object, as opposed to the complicated, specialized objects that frameworks like ORM systems usually generate. Another way to put it is that POCOs are objects unencumbered with inheritance or attributes needed for specific frameworks [2] and are persistence ignorant objects. In .NET terms, the word is most often used in the programmatic sense, to differentiate a non-serviced component (see MTS) from a "standard object". It can also be used in a tongue-in-cheek manner, referencing the perceived complexity and invasiveness of Java-based programming frameworks such as the legacy EJB2.

POCO is often incorrectly expanded to Plain Old C# Object, but POCOs can be created with any language targeting the CLR. An alternative acronym sometimes used is PONO,[3] for Plain Old .NET Object.

Some benefits of POCO objects are:

See also

References

  1. See anecdote here: http://www.martinfowler.com/bliki/POJO.html
  2. See, for example, this MSDN article: Data Contracts - POCO Support
  3. See, for example, a reference to PONO in this whitepaper: Spring.net Reference Documentation
This article is issued from Wikipedia - version of the 5/20/2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.