{"id":1637,"date":"2011-06-01T19:28:18","date_gmt":"2011-06-01T18:28:18","guid":{"rendered":"http:\/\/www.gamlor.info\/wordpress\/?p=1637"},"modified":"2021-10-16T01:30:05","modified_gmt":"2021-10-16T00:30:05","slug":"mini-orm-hype","status":"publish","type":"post","link":"https:\/\/www.gamlor.info\/wordpress\/2011\/06\/mini-orm-hype\/","title":{"rendered":"Mini-ORM Hype"},"content":{"rendered":"<div id=\"attachment_1638\" style=\"width: 310px\" class=\"wp-caption alignright\"><a href=\"https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2011\/06\/mini-orm.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1638\" class=\"size-medium wp-image-1638\" title=\"mini-orm\" src=\"https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2011\/06\/mini-orm-300x215.png\" alt=\"Mini ORM fight\" width=\"300\" height=\"215\" srcset=\"https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2011\/06\/mini-orm-300x215.png 300w, https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2011\/06\/mini-orm.png 900w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-1638\" class=\"wp-caption-text\">Mini ORM fight<\/p><\/div>\n<p>An interesting recent development is the explosion in tiny \u2018object relational mappers\u2019, such as <a href=\"http:\/\/code.google.com\/p\/dapper-dot-net\/\">Dapper<\/a>, <a href=\"http:\/\/blog.wekeroad.com\/helpy-stuff\/and-i-shall-call-it-massive\">Massive<\/a> or <a href=\"http:\/\/www.toptensoftware.com\/petapoco\/\">PetaPoco<\/a>. Most of these help you with a thin layer to read data from a relational database, but don\u2019t try to \u2018simulate\u2019 a pure object model. For example they use SQL as query language and don\u2019t manage complex object graphs.<\/p>\n<p>&nbsp;<\/p>\n<p>Why are these libraries showing up now? I think one reason is that C# has now the features to actually write these kinds of tiny libraries. Mainly because features like dynamic, closures, etc. allow a more functional and concise way to express such things. Of course in some sense they play catch up with other libraries for other languages. When I look at these libraries they remind me of my PHP projects, where I had a very similar library.<\/p>\n<p>I like really like these frameworks, because they remove the annoying boiler-plate code, but don\u2019t try to create a complex abstraction, which is leaky anyway. The only thing I\u2019m really missing is LINQ. Of course even the simplest LINQ provider would be much larger than the mini ORM itself and add a lot of complexity.<\/p>\n<p>Currently I\u2019m not working on any project with relational databases, so I can\u2019t tell much more. When such a project comes along, I will certainly look at these libraries again. And of course these mini frameworks are just another tool, not a magic shiny unicorn =(.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>An interesting recent development is the explosion in tiny \u2018object relational mappers\u2019, such as Dapper, Massive or PetaPoco. Most of these help you with a thin layer to read data&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"categories":[126],"tags":[21,162,223],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/posts\/1637"}],"collection":[{"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/comments?post=1637"}],"version-history":[{"count":3,"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/posts\/1637\/revisions"}],"predecessor-version":[{"id":3912,"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/posts\/1637\/revisions\/3912"}],"wp:attachment":[{"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/media?parent=1637"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/categories?post=1637"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/tags?post=1637"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}