Jump to content

Plain old CLR object

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 68.184.198.186 (talk) at 00:58, 30 April 2015. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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 Cite error: A <ref> tag is missing the closing </ref> (see the help page). 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,<ref>See, for example, a reference to PONO in this whitepaper: [http://www.springframework.net/doc-latest/reference/pdf/spring-net-reference.pdf Spring Some benefits of POCO objects are:

  • Allows a simple storage mechanism for data, and simplifies serialization/passing data through layers.
  • Goes hand-in-hand with dependency injection, and the repository pattern.
  • Minimized 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


Template:Comput-lang-stub