An Entity of Type: Thing, from Named Graph: http://dbpedia.org, within Data Space: dbpedia.org

In computer science, the term Mock Trainwreck refers to the difficulty of mocking a deeply nested model structure. Mocking is the creation of mock objects which can be used to mimic the behavior of real objects, often because it is hard to test with the real objects. A trainwreck is multiple levels of method calls (called a chain), which each return objects upon which new methods can be called. Deeply nested models go against the Law of Demeter because the property's property must be accessed. The Law of Demeter, also known as the principle of least knowledge is a design guideline to promote loose coupling of data structures that are not closely related, and thus should probably not be coupled together. In addition, this level of coupling can be considered an inappropriate intimacy code sm

Property Value
dbo:abstract
  • In computer science, the term Mock Trainwreck refers to the difficulty of mocking a deeply nested model structure. Mocking is the creation of mock objects which can be used to mimic the behavior of real objects, often because it is hard to test with the real objects. A trainwreck is multiple levels of method calls (called a chain), which each return objects upon which new methods can be called. Deeply nested models go against the Law of Demeter because the property's property must be accessed. The Law of Demeter, also known as the principle of least knowledge is a design guideline to promote loose coupling of data structures that are not closely related, and thus should probably not be coupled together. In addition, this level of coupling can be considered an inappropriate intimacy code smell. Mock trainwrecks should be avoided when possible. This is because not only does it makes it harder to test the code which uses them, but also because they are harder to work with from a design standpoint. In addition, it increases the amount of information an object can access, due to its close relation with other parameters that are not related to its main functionality. (en)
dbo:wikiPageExternalLink
dbo:wikiPageID
  • 53083957 (xsd:integer)
dbo:wikiPageLength
  • 7591 (xsd:nonNegativeInteger)
dbo:wikiPageRevisionID
  • 931519177 (xsd:integer)
dbo:wikiPageWikiLink
dbp:wikiPageUsesTemplate
dcterms:subject
rdfs:comment
  • In computer science, the term Mock Trainwreck refers to the difficulty of mocking a deeply nested model structure. Mocking is the creation of mock objects which can be used to mimic the behavior of real objects, often because it is hard to test with the real objects. A trainwreck is multiple levels of method calls (called a chain), which each return objects upon which new methods can be called. Deeply nested models go against the Law of Demeter because the property's property must be accessed. The Law of Demeter, also known as the principle of least knowledge is a design guideline to promote loose coupling of data structures that are not closely related, and thus should probably not be coupled together. In addition, this level of coupling can be considered an inappropriate intimacy code sm (en)
rdfs:label
  • Mock trainwreck (en)
owl:sameAs
prov:wasDerivedFrom
foaf:isPrimaryTopicOf
is foaf:primaryTopic of
Powered by OpenLink Virtuoso    This material is Open Knowledge     W3C Semantic Web Technology     This material is Open Knowledge    Valid XHTML + RDFa
This content was extracted from Wikipedia and is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License