{"id":1259,"date":"2010-04-30T19:25:04","date_gmt":"2010-05-01T00:25:04","guid":{"rendered":"http:\/\/mikeconley.ca\/blog\/?p=1259"},"modified":"2023-12-20T16:25:17","modified_gmt":"2023-12-20T21:25:17","slug":"code-spelunking-review-board-extensions-2","status":"publish","type":"post","link":"https:\/\/mikeconley.ca\/blog\/2010\/04\/30\/code-spelunking-review-board-extensions-2\/","title":{"rendered":"Code Spelunking: Review Board Extensions"},"content":{"rendered":"<p>So this summer, <a href=\"http:\/\/mikeconley.ca\/blog\/2010\/04\/27\/my-gsoc-project-review-board-extensions\/\">I&#8217;m working on Review Board for the Google Summer of Code.<\/a><\/p>\n<p>Until my GSoC acceptance, my romps into the code had been relatively shallow. \u00a0But with my proposal being given the green light, I&#8217;ve started doing more extensive explorations.<\/p>\n<p>Review Board is built using <a href=\"http:\/\/www.djangoproject.com\/\">the Django web framework<\/a>. \u00a0I haven&#8217;t worked with Django before, but I have quite a bit of experience with Rails, so that should be an asset. \u00a0Using a web framework means having (relatively) predictable source code layout, and Review Board is no exception.<\/p>\n<h4>Djblets<\/h4>\n<p>At one point or another, the Review Board developers realized that a lot of their code wasn&#8217;t Review Board specific, and could be abstracted out into an external library.<\/p>\n<p>That library is called <a href=\"http:\/\/github.com\/djblets\/djblets\">Djblets<\/a>.<\/p>\n<p>Among other things, Djblets adds a DataGrid component for easy record sorting and pagination. \u00a0There are improvements to Django&#8217;s Authentication system. \u00a0Functions for easily displaying a user&#8217;s <a href=\"http:\/\/en.gravatar.com\/\">Gravatar<\/a>.<\/p>\n<p>And, low and behold, there is a branch of Djblets that provides classes and functions for giving a Django application an extension framework. \u00a0The classes are abstract enough so that, in your Django application, you can specify different types and behaviours for your Hooks.<\/p>\n<h4>Djblets -&gt; Review Board<\/h4>\n<p>The Review Board extension branch takes these Djblets extension classes, and extends them into DashboardHooks, NavigationBarHooks, ReviewRequestDetailHooks&#8230;lots of different hooks.<\/p>\n<p>So, Djblets creates the foundation abstractions. \u00a0Review Board makes these abstractions a little more specific. \u00a0And then an extension writer needs to instantiate and use these classes to design their extensions. \u00a0It sounds complicated, I know.<\/p>\n<h4>So Let&#8217;s Map It Out<\/h4>\n<p>When I start learning a new code base, I do a lot of drawing. \u00a0To me, getting to now a code base is like getting to know a city, and that means walking around it, and mapping it out.<\/p>\n<p>So I&#8217;ve taken the liberty of mapping out the extension classes that I&#8217;ve found, and how they relate to one another. \u00a0Note that at the bottom of my map, a simple extension (RB Reports) is using some of those classes to hook itself into Review Board. \u00a0You can find this, and other extensions,<a href=\"http:\/\/github.com\/chipx86\/rb-extension-pack\">here<\/a>.<\/p>\n<div id=\"attachment_1222\" style=\"width: 310px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.mikeconley.ca\/images\/rb_ext\/Map.html\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1222\" data-attachment-id=\"1222\" data-permalink=\"https:\/\/mikeconley.ca\/blog\/map\/\" data-orig-file=\"https:\/\/mikeconley.ca\/blog\/wp-content\/uploads\/2010\/04\/Map.png\" data-orig-size=\"1583,1259\" 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=\"Extensions Map\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;Click here to check out my map of the current state of the extension framework&lt;\/p&gt;\n\" data-large-file=\"https:\/\/mikeconley.ca\/blog\/wp-content\/uploads\/2010\/04\/Map-1023x814.png\" class=\"size-medium wp-image-1222\" title=\"Extensions Map\" src=\"http:\/\/mikeconley.ca\/blog\/wp-content\/uploads\/2010\/04\/Map-300x238.png\" alt=\"My map of the extension framework\" width=\"300\" height=\"238\" srcset=\"https:\/\/mikeconley.ca\/blog\/wp-content\/uploads\/2010\/04\/Map-300x238.png 300w, https:\/\/mikeconley.ca\/blog\/wp-content\/uploads\/2010\/04\/Map-1023x814.png 1023w, https:\/\/mikeconley.ca\/blog\/wp-content\/uploads\/2010\/04\/Map.png 1583w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-1222\" class=\"wp-caption-text\">Click here to check out my map of the current state of the extension framework<\/p><\/div>\n<p>Now, before someone in the department starts complaining about my misuse of UML: \u00a0I&#8217;m not a UML guy. \u00a0I just wanted an easy piece of diagramming software, and the one that I found (<a href=\"http:\/\/www.gnome.org\/projects\/dia\/\">Dia<\/a>), did UML. \u00a0I just wanted something to draw boxes and lines. So please don&#8217;t freak out if you think I&#8217;m using the wrong symbols.<\/p>\n<p>One symbol you might be wondering about is the blue quantum-flux-capacitor-implosion.<\/p>\n<p>I&#8217;ll save that for a future post.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So this summer, I&#8217;m working on Review Board for the Google Summer of Code. Until my GSoC acceptance, my romps into the code had been relatively shallow. \u00a0But with my proposal being given the green light, I&#8217;ve started doing more extensive explorations. Review Board is built using the Django web framework. \u00a0I haven&#8217;t worked with [&hellip;]<\/p>\n","protected":false},"author":4,"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":[657,773,1],"tags":[558,663,131,1219],"class_list":["post-1259","post","type-post","status-publish","format-standard","hentry","category-extensions-review-board-code-reviews-computer-science-technology","category-gsoc-computer-science","category-uncategorized","tag-code-spelunking","tag-djblets","tag-extensions","tag-review-board"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/prmTy-kj","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/mikeconley.ca\/blog\/wp-json\/wp\/v2\/posts\/1259","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mikeconley.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mikeconley.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mikeconley.ca\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/mikeconley.ca\/blog\/wp-json\/wp\/v2\/comments?post=1259"}],"version-history":[{"count":7,"href":"https:\/\/mikeconley.ca\/blog\/wp-json\/wp\/v2\/posts\/1259\/revisions"}],"predecessor-version":[{"id":1284,"href":"https:\/\/mikeconley.ca\/blog\/wp-json\/wp\/v2\/posts\/1259\/revisions\/1284"}],"wp:attachment":[{"href":"https:\/\/mikeconley.ca\/blog\/wp-json\/wp\/v2\/media?parent=1259"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mikeconley.ca\/blog\/wp-json\/wp\/v2\/categories?post=1259"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mikeconley.ca\/blog\/wp-json\/wp\/v2\/tags?post=1259"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}