{"id":1327,"date":"2014-04-30T12:01:31","date_gmt":"2014-04-30T11:01:31","guid":{"rendered":"https:\/\/www.entropywins.wtf\/blog\/?p=1327"},"modified":"2014-04-30T12:02:46","modified_gmt":"2014-04-30T11:02:46","slug":"wikibase-datamodel-entity-v2","status":"publish","type":"post","link":"https:\/\/www.entropywins.wtf\/blog\/2014\/04\/30\/wikibase-datamodel-entity-v2\/","title":{"rendered":"Wikibase DataModel: Entity v2"},"content":{"rendered":"<p>In <a href=\"https:\/\/www.entropywins.wtf\/blog\/2014\/04\/14\/wikibase-datamodel-0-7-3-released\/\">a recent blog post<\/a> I introduced the new Term classes introduced in <a href=\"https:\/\/github.com\/wmde\/WikibaseDataModel\">Wikibase DataModel<\/a> 0.7.3. It also outlined plans for making some big changes to the Entity class and it&#8217;s derivatives. We have now taken the most difficult step in the process, which is already resulting in much nicer code.<\/p>\n<p>As I&#8217;ve <a href=\"https:\/\/www.entropywins.wtf\/blog\/2014\/03\/20\/status-of-the-new-wikibase-deserialization-code\/\">written about in the past<\/a>, we had a good portion of technical debt related to our serialization code. Our Value Objects and Entities in DataModel had a public toArray method and a public static newFromArray. This brought with it global state in places, it caused a lot of static code and forces an additional responsibility onto these objects, increasing their complexity. The new serialization components where created in part to address these issues.<\/p>\n<p>I started with removing the old toArray and newFromArray code from DataModel, and in the process of doing so found that this went hand in hand with taking the next big step in breaking up the Entity hierarchy. The constructor of Entity (and it&#8217;s concrete derivatives) took an array with the internal serialization format as only argument. They would hold this array internally and unstub specific parts when that data was requested in object form (ie by calling getSiteLinks). If all the serialization code got moved out of DataModel, then either this would need to go as well, or we&#8217;d need to make DataModel dependent on the new serialization components. Luckily the choice between introducing a cyclic dependency and removing some technical debt you need to get rid of in the near future anyway is an easy one.<\/p>\n<p>Rather than taking this array in some storage specific array format, the constructors of the Entity derivatives now take a list of the objects they need. For instance:<\/p>\n<pre class=\"crayon-selected\">public function __construct( ItemId $id = null, Fingerprint $fingerprint,\r\n    SiteLinkList $links, array $statements ) {<\/pre>\n<p>As you can imagine, this makes a lot of things in Entity simpler. My last post on DataModel included this plot:<\/p>\n<p><a href=\"https:\/\/scrutinizer-ci.com\/g\/wmde\/WikibaseDataModel\/statistics\/\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1309\" data-permalink=\"https:\/\/www.entropywins.wtf\/blog\/2014\/04\/14\/wikibase-datamodel-0-7-3-released\/dm-complexity\/\" data-orig-file=\"https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/04\/dm-complexity.png\" data-orig-size=\"437,203\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"dm-complexity\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/04\/dm-complexity.png\" class=\"alignnone  wp-image-1309\" style=\"border: 1px solid black;\" src=\"https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/04\/dm-complexity.png\" alt=\"dm-complexity\" width=\"437\" height=\"203\" srcset=\"https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/04\/dm-complexity.png 437w, https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/04\/dm-complexity-300x139.png 300w, https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/04\/dm-complexity-100x46.png 100w, https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/04\/dm-complexity-150x69.png 150w, https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/04\/dm-complexity-200x92.png 200w\" sizes=\"auto, (max-width: 437px) 100vw, 437px\" \/><\/a><\/p>\n<p>This is what the same plot looks like on the development branch of the DataModel 1.0 release:<\/p>\n<p><a href=\"https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/04\/entity53.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1328\" data-permalink=\"https:\/\/www.entropywins.wtf\/blog\/2014\/04\/30\/wikibase-datamodel-entity-v2\/entity53\/\" data-orig-file=\"https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/04\/entity53.png\" data-orig-size=\"501,192\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"entity53\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/04\/entity53.png\" class=\"alignnone size-full wp-image-1328\" style=\"border: 1px solid black;\" src=\"https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/04\/entity53.png\" alt=\"entity53\" width=\"501\" height=\"192\" srcset=\"https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/04\/entity53.png 501w, https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/04\/entity53-300x114.png 300w, https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/04\/entity53-100x38.png 100w, https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/04\/entity53-150x57.png 150w, https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/04\/entity53-200x76.png 200w, https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/04\/entity53-450x172.png 450w\" sizes=\"auto, (max-width: 501px) 100vw, 501px\" \/><\/a><\/p>\n<p>We nearly halved the complexity of our most complex class \\o\/. Some more stats: So far we changed\u00a047 files with 768 additions and 2382 deletions. With these changes, our ScurtinizerCI quality rating went from 8.23 to 8.76. The release is definitely not done yet though &#8211; the big changes already described make a lot of smaller cleanup possible. And we&#8217;re incentives to kill deprecated things in this release, since we&#8217;ll be following <a href=\"http:\/\/semver.org\/\">semver<\/a> properly afterwards, and will have to bump to 2.x when we make a breaking change afterwards.<\/p>\n<p>Entity has an equality method. This used to work by putting the array data the Entity held through a generic comparer object. Since we needed a replacement for this, I made most value objects in DataModel implement the Comparable interface. This was already made available in a <a href=\"https:\/\/github.com\/wmde\/WikibaseDataModel\/blob\/master\/RELEASE-NOTES.md#version-074-2014-04-24\">0.7.4 release<\/a>. Now Entity simply delegates to the equals methods of the objects it holds, letting them decide how to compute equality for their type. This fixed quite some inconsistencies that could occur in the old code (depending on how exactly you set data in the first place) such as SiteLink badges incorrectly being compared in order dependant fashion.<\/p>\n<p>Further splitting of Entity is on the roadmap, though perhaps not for the 1.0 release. For a list of 1.0 changes made so far, check <a href=\"https:\/\/github.com\/wmde\/WikibaseDataModel\/blob\/master\/RELEASE-NOTES.md\">the release notes<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In a recent blog post I introduced the new Term classes introduced in Wikibase DataModel 0.7.3. It also outlined plans&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[7,8],"tags":[340,98,195,197,215,316,317,318,305],"class_list":["post-1327","post","type-post","status-publish","format-standard","hentry","category-programming","category-software","tag-components","tag-free-software","tag-php","tag-planet-wikimedia","tag-refactoring","tag-software-design","tag-wikibase","tag-wikibase-datamodel","tag-wikidata"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Wikibase DataModel: Entity v2 - Blog of Jeroen De Dauw<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.entropywins.wtf\/blog\/2014\/04\/30\/wikibase-datamodel-entity-v2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Wikibase DataModel: Entity v2 - Blog of Jeroen De Dauw\" \/>\n<meta property=\"og:description\" content=\"In a recent blog post I introduced the new Term classes introduced in Wikibase DataModel 0.7.3. It also outlined plans&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.entropywins.wtf\/blog\/2014\/04\/30\/wikibase-datamodel-entity-v2\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog of Jeroen De Dauw\" \/>\n<meta property=\"article:published_time\" content=\"2014-04-30T11:01:31+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-04-30T11:02:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/04\/dm-complexity.png\" \/>\n<meta name=\"author\" content=\"Jeroen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/JeroenDeDauw\" \/>\n<meta name=\"twitter:site\" content=\"@JeroenDeDauw\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeroen\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2014\\\/04\\\/30\\\/wikibase-datamodel-entity-v2\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2014\\\/04\\\/30\\\/wikibase-datamodel-entity-v2\\\/\"},\"author\":{\"name\":\"Jeroen\",\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/#\\\/schema\\\/person\\\/4e2ef14f2ca7dc3a0ac137d1692b66b7\"},\"headline\":\"Wikibase DataModel: Entity v2\",\"datePublished\":\"2014-04-30T11:01:31+00:00\",\"dateModified\":\"2014-04-30T11:02:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2014\\\/04\\\/30\\\/wikibase-datamodel-entity-v2\\\/\"},\"wordCount\":554,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/#\\\/schema\\\/person\\\/4e2ef14f2ca7dc3a0ac137d1692b66b7\"},\"image\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2014\\\/04\\\/30\\\/wikibase-datamodel-entity-v2\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/04\\\/dm-complexity.png\",\"keywords\":[\"Components\",\"Free software\",\"PHP\",\"Planet Wikimedia\",\"Refactoring\",\"Software design\",\"Wikibase\",\"Wikibase DataModel\",\"wikidata\"],\"articleSection\":[\"Programming\",\"Software\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2014\\\/04\\\/30\\\/wikibase-datamodel-entity-v2\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2014\\\/04\\\/30\\\/wikibase-datamodel-entity-v2\\\/\",\"url\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2014\\\/04\\\/30\\\/wikibase-datamodel-entity-v2\\\/\",\"name\":\"Wikibase DataModel: Entity v2 - Blog of Jeroen De Dauw\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2014\\\/04\\\/30\\\/wikibase-datamodel-entity-v2\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2014\\\/04\\\/30\\\/wikibase-datamodel-entity-v2\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/04\\\/dm-complexity.png\",\"datePublished\":\"2014-04-30T11:01:31+00:00\",\"dateModified\":\"2014-04-30T11:02:46+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2014\\\/04\\\/30\\\/wikibase-datamodel-entity-v2\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2014\\\/04\\\/30\\\/wikibase-datamodel-entity-v2\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2014\\\/04\\\/30\\\/wikibase-datamodel-entity-v2\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/04\\\/dm-complexity.png\",\"contentUrl\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/04\\\/dm-complexity.png\",\"width\":437,\"height\":203},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2014\\\/04\\\/30\\\/wikibase-datamodel-entity-v2\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Wikibase DataModel: Entity v2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/\",\"name\":\"Entropy Wins\",\"description\":\"A blog on Software Architecture, Design and Craftsmanship\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/#\\\/schema\\\/person\\\/4e2ef14f2ca7dc3a0ac137d1692b66b7\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/#\\\/schema\\\/person\\\/4e2ef14f2ca7dc3a0ac137d1692b66b7\",\"name\":\"Jeroen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g\",\"caption\":\"Jeroen\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g\"},\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/jeroendedauw\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/JeroenDeDauw\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Wikibase DataModel: Entity v2 - Blog of Jeroen De Dauw","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.entropywins.wtf\/blog\/2014\/04\/30\/wikibase-datamodel-entity-v2\/","og_locale":"en_US","og_type":"article","og_title":"Wikibase DataModel: Entity v2 - Blog of Jeroen De Dauw","og_description":"In a recent blog post I introduced the new Term classes introduced in Wikibase DataModel 0.7.3. It also outlined plans&hellip;","og_url":"https:\/\/www.entropywins.wtf\/blog\/2014\/04\/30\/wikibase-datamodel-entity-v2\/","og_site_name":"Blog of Jeroen De Dauw","article_published_time":"2014-04-30T11:01:31+00:00","article_modified_time":"2014-04-30T11:02:46+00:00","og_image":[{"url":"https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/04\/dm-complexity.png","type":"","width":"","height":""}],"author":"Jeroen","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/JeroenDeDauw","twitter_site":"@JeroenDeDauw","twitter_misc":{"Written by":"Jeroen","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.entropywins.wtf\/blog\/2014\/04\/30\/wikibase-datamodel-entity-v2\/#article","isPartOf":{"@id":"https:\/\/www.entropywins.wtf\/blog\/2014\/04\/30\/wikibase-datamodel-entity-v2\/"},"author":{"name":"Jeroen","@id":"https:\/\/www.entropywins.wtf\/blog\/#\/schema\/person\/4e2ef14f2ca7dc3a0ac137d1692b66b7"},"headline":"Wikibase DataModel: Entity v2","datePublished":"2014-04-30T11:01:31+00:00","dateModified":"2014-04-30T11:02:46+00:00","mainEntityOfPage":{"@id":"https:\/\/www.entropywins.wtf\/blog\/2014\/04\/30\/wikibase-datamodel-entity-v2\/"},"wordCount":554,"commentCount":0,"publisher":{"@id":"https:\/\/www.entropywins.wtf\/blog\/#\/schema\/person\/4e2ef14f2ca7dc3a0ac137d1692b66b7"},"image":{"@id":"https:\/\/www.entropywins.wtf\/blog\/2014\/04\/30\/wikibase-datamodel-entity-v2\/#primaryimage"},"thumbnailUrl":"https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/04\/dm-complexity.png","keywords":["Components","Free software","PHP","Planet Wikimedia","Refactoring","Software design","Wikibase","Wikibase DataModel","wikidata"],"articleSection":["Programming","Software"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.entropywins.wtf\/blog\/2014\/04\/30\/wikibase-datamodel-entity-v2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.entropywins.wtf\/blog\/2014\/04\/30\/wikibase-datamodel-entity-v2\/","url":"https:\/\/www.entropywins.wtf\/blog\/2014\/04\/30\/wikibase-datamodel-entity-v2\/","name":"Wikibase DataModel: Entity v2 - Blog of Jeroen De Dauw","isPartOf":{"@id":"https:\/\/www.entropywins.wtf\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.entropywins.wtf\/blog\/2014\/04\/30\/wikibase-datamodel-entity-v2\/#primaryimage"},"image":{"@id":"https:\/\/www.entropywins.wtf\/blog\/2014\/04\/30\/wikibase-datamodel-entity-v2\/#primaryimage"},"thumbnailUrl":"https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/04\/dm-complexity.png","datePublished":"2014-04-30T11:01:31+00:00","dateModified":"2014-04-30T11:02:46+00:00","breadcrumb":{"@id":"https:\/\/www.entropywins.wtf\/blog\/2014\/04\/30\/wikibase-datamodel-entity-v2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.entropywins.wtf\/blog\/2014\/04\/30\/wikibase-datamodel-entity-v2\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.entropywins.wtf\/blog\/2014\/04\/30\/wikibase-datamodel-entity-v2\/#primaryimage","url":"https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/04\/dm-complexity.png","contentUrl":"https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/04\/dm-complexity.png","width":437,"height":203},{"@type":"BreadcrumbList","@id":"https:\/\/www.entropywins.wtf\/blog\/2014\/04\/30\/wikibase-datamodel-entity-v2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.entropywins.wtf\/blog\/"},{"@type":"ListItem","position":2,"name":"Wikibase DataModel: Entity v2"}]},{"@type":"WebSite","@id":"https:\/\/www.entropywins.wtf\/blog\/#website","url":"https:\/\/www.entropywins.wtf\/blog\/","name":"Entropy Wins","description":"A blog on Software Architecture, Design and Craftsmanship","publisher":{"@id":"https:\/\/www.entropywins.wtf\/blog\/#\/schema\/person\/4e2ef14f2ca7dc3a0ac137d1692b66b7"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.entropywins.wtf\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.entropywins.wtf\/blog\/#\/schema\/person\/4e2ef14f2ca7dc3a0ac137d1692b66b7","name":"Jeroen","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g","caption":"Jeroen"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g"},"sameAs":["https:\/\/www.linkedin.com\/in\/jeroendedauw\/","https:\/\/x.com\/https:\/\/twitter.com\/JeroenDeDauw"]}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p74TBF-lp","jetpack-related-posts":[{"id":1401,"url":"https:\/\/www.entropywins.wtf\/blog\/2014\/09\/02\/wikibase-datamodel-1-0\/","url_meta":{"origin":1327,"position":0},"title":"Wikibase DataModel 1.0","author":"Jeroen","date":"2014-09-02","format":false,"excerpt":"I'm happy to announce the 1.0 release of Wikibase DataModel.\u00a0Wikibase DataModel is the canonical PHP implementation of the Data Model at the heart of the Wikibase software. This is a big release which has been some time in the making, even though many additions have been split of and included\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.entropywins.wtf\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1453,"url":"https:\/\/www.entropywins.wtf\/blog\/2015\/08\/11\/wikibase-datamodel-services\/","url_meta":{"origin":1327,"position":1},"title":"Wikibase DataModel Services","author":"Jeroen","date":"2015-08-11","format":false,"excerpt":"I'm happy to announce the immediate availability of a new Wikibase library: Wikibase DataModel Services (which I'll in this blog post refer to as DMS). Rationale behind the library The main motivation for introducing this new library is to reduce technical debt and draw more solid architectural boundaries in the\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.entropywins.wtf\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1306,"url":"https:\/\/www.entropywins.wtf\/blog\/2014\/04\/14\/wikibase-datamodel-0-7-3-released\/","url_meta":{"origin":1327,"position":2},"title":"Wikibase DataModel 0.7.3 released","author":"Jeroen","date":"2014-04-14","format":false,"excerpt":"I am happy to announce the 0.7.3 release of Wikibase DataModel. Wikibase DataModel is the canonical PHP implementation of the Data Model at the heart of the Wikibase software. It is primarily used by the Wikibase MediaWiki extensions, though has no dependencies whatsoever on these or on MediaWiki itself. This\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.entropywins.wtf\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/04\/dm-complexity.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1165,"url":"https:\/\/www.entropywins.wtf\/blog\/2013\/12\/23\/wikibase-datamodel-released\/","url_meta":{"origin":1327,"position":3},"title":"Wikibase DataModel released!","author":"Jeroen","date":"2013-12-23","format":false,"excerpt":"I\u2019m happy to announce the 0.6 release of Wikibase DataModel. This is the first real release of this component. DataModel? Wikibase is the software behind Wikidata.org. At its core, this software is about describing entities. Entities are collections of claims, which can have qualifiers, references and values of various different\u2026","rel":"","context":"In \"Component\"","block_context":{"text":"Component","link":"https:\/\/www.entropywins.wtf\/blog\/tag\/component\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1484,"url":"https:\/\/www.entropywins.wtf\/blog\/2015\/11\/08\/wikidata-wikibase-json-dump-reader\/","url_meta":{"origin":1327,"position":4},"title":"Wikidata\/Wikibase Json Dump Reader","author":"Jeroen","date":"2015-11-08","format":false,"excerpt":"I've created a small PHP library to read from, and iterate through, Wikidata\/Wikibase JSON dumps. Wikidata is the free knowledge base that anyone can edit, and serves as a central data repository for Wikipedia and associated projects. Wikibase is a set of free open source software that powers Wikidata. You\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.entropywins.wtf\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1334,"url":"https:\/\/www.entropywins.wtf\/blog\/2014\/05\/04\/nyan-review\/","url_meta":{"origin":1327,"position":5},"title":"Nyan review","author":"Jeroen","date":"2014-05-04","format":false,"excerpt":"Code review is fun!","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.entropywins.wtf\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/05\/NyanReview-807x1024.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/05\/NyanReview-807x1024.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/05\/NyanReview-807x1024.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2014\/05\/NyanReview-807x1024.png?resize=700%2C400&ssl=1 2x"},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/posts\/1327","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/comments?post=1327"}],"version-history":[{"count":4,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/posts\/1327\/revisions"}],"predecessor-version":[{"id":1332,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/posts\/1327\/revisions\/1332"}],"wp:attachment":[{"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/media?parent=1327"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/categories?post=1327"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/tags?post=1327"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}