{"id":2198,"date":"2016-05-13T09:34:00","date_gmt":"2016-05-13T15:34:00","guid":{"rendered":"http:\/\/www.mooreds.com\/wordpress\/?p=2198"},"modified":"2016-04-20T08:22:28","modified_gmt":"2016-04-20T14:22:28","slug":"review-of-modular-rails","status":"publish","type":"post","link":"https:\/\/www.mooreds.com\/wordpress\/archives\/2198","title":{"rendered":"Review of Modular Rails"},"content":{"rendered":"<p>I am currently working on modifying an existing large rails app.\u00a0 I am customizing some of the look and feel and extending functionality.<\/p>\n<p>The app is under current development and I wanted to be able to take advantage of bug fixes or improvements, without impacting my customizations.\u00a0 Or at least minimizing that impact.<\/p>\n<p>Being fairly new to Rails, I surveyed the landscape and thought that building my customizations as an <a href=\"http:\/\/guides.rubyonrails.org\/engines.html\">engine<\/a> would be a good way to go.\u00a0 (I was wrong, because engines have a hard time reaching out and modifying the application that they are part of.\u00a0 At least that seemed to be a non standard use of engines from what I can find.) The author of <a href=\"http:\/\/modular-rails.samurails.com\/\">Modular Rails<\/a> has some good <a href=\"https:\/\/samurails.com\/category\/modularity\/\">blog posts about engines and modularity<\/a>, so I bought his book.<\/p>\n<p>Pluses:<\/p>\n<ul>\n<li>Good overview of how to extend three major components of rails app, models, views and controllers<\/li>\n<li>Easy reading style<\/li>\n<li>Leverages existing gems like deface<\/li>\n<li>Mentions testing<\/li>\n<li>Starts from first principles and then later gives you a gem to speed up development<\/li>\n<li>Not too long<\/li>\n<li>Information on setting up your own gems server<\/li>\n<\/ul>\n<p>Minuses:<\/p>\n<ul>\n<li>Focus on &#8216;greenfield&#8217; apps.\u00a0 No mention of integration with existing monoliths.<\/li>\n<li>Uses nested modules, unlike every other engine article out there<\/li>\n<li>Assumes relatively advanced knowledge of rails<\/li>\n<li>Fair bit of fluff&#8211;lots of &#8216;mv&#8217; commands<\/li>\n<li>Extra charge for source code<\/li>\n<\/ul>\n<p>All in all I am glad I read this book.\u00a0 It didn&#8217;t fit my needs, but it didn&#8217;t promise that either.\u00a0 I found it a good overview of the engine concept, even if he did do some things in a non standard manner and was a bit verbose about unix commands.<\/p>\n<p>If you have done more Rails development, it will be more useful, and it is a great way to think about building new freestanding applications.\u00a0 I haven&#8217;t surveyed the entire rails book landscape but I haven&#8217;t found anything out there focusing on Rails engines that is better.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am currently working on modifying an existing large rails app.\u00a0 I am customizing some of the look and feel and extending functionality. The app is under current development and [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,77],"tags":[],"class_list":["post-2198","post","type-post","status-publish","format-standard","hentry","category-books","category-rails"],"_links":{"self":[{"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/posts\/2198","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/comments?post=2198"}],"version-history":[{"count":2,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/posts\/2198\/revisions"}],"predecessor-version":[{"id":2205,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/posts\/2198\/revisions\/2205"}],"wp:attachment":[{"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/media?parent=2198"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/categories?post=2198"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/tags?post=2198"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}