Wikipedia

Plain Old CLR Object

Also found in: Acronyms.

In software engineering, a plain old CLR object, or plain old class object (POCO) is a simple object created in the .NET Common Language Runtime (CLR) that is unencumbered by inheritance or attributes. This is often used in opposition to the complex or specialized objects that object-relational mapping frameworks often require.[1] In essence, a POCO does not have any dependency on an external framework.

Etymology

Plain Old CLR Object is a play on the term plain old Java object from the Java EE programming world, which was coined by Martin Fowler in 2000.[2] POCO is often expanded to plain old C# object, though POCOs can be created with any language targeting the CLR. An alternative acronym sometimes used is plain old .NET object.[3]

Benefits

Some benefits of POCOs are:

  • allows a simple storage mechanism for data, and simplifies serialization and passing data through layers;
  • goes hand-in-hand with dependency injection and the repository pattern;
  • minimised complexity and dependencies on other layers (higher layers only care about the POCOs, POCOs don't care about anything) which facilitates loose coupling;
  • increases testability through simplification.

See also

References

  1. ^ See, for example, this docs.microsoft.com article: POCO Support in WCF
  2. ^ See anecdote here: http://www.martinfowler.com/bliki/POJO.html
  3. ^ See, for example, a reference to PONO in this whitepaper: Spring.net Reference Documentation


This article is copied from an article on Wikipedia® - the free encyclopedia created and edited by its online user community. The text was not checked or edited by anyone on our staff. Although the vast majority of Wikipedia® encyclopedia articles provide accurate and timely information, please do not assume the accuracy of any particular article. This article is distributed under the terms of GNU Free Documentation License.

Copyright © 2003-2025 Farlex, Inc Disclaimer
All content on this website, including dictionary, thesaurus, literature, geography, and other reference data is for informational purposes only. This information should not be considered complete, up to date, and is not intended to be used in place of a visit, consultation, or advice of a legal, medical, or any other professional.