{"id":3356,"date":"2017-07-04T17:03:23","date_gmt":"2017-07-04T11:33:23","guid":{"rendered":"https:\/\/www.innovationm.com\/blog\/?p=3356"},"modified":"2017-07-04T17:03:23","modified_gmt":"2017-07-04T11:33:23","slug":"tailor-clean-and-organized-code","status":"publish","type":"post","link":"https:\/\/www.innovationm.com\/blog\/tailor-clean-and-organized-code\/","title":{"rendered":"Tailor: Clean and Organized Code"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>I found this quote by <code>James O. Coplien<\/code>\u00a0on Japanese\u00a0workplace organization methodology called <a href=\"https:\/\/en.wikipedia.org\/wiki\/5S_(methodology)\">5S<\/a><\/p>\n<blockquote><p>Clean your workplace on daily basis completely or set cleaning frequency.<br \/>\nUse cleaning as inspection.<br \/>\nPrevent machinery and equipment deterioration.<br \/>\nKeep workplace safe and easy to work.<br \/>\nKeep workplace clean and pleasing to work in.<\/p><\/blockquote>\n<p>Just like our organization, the codebase is also our workplace where we work and others have to work and maintain, and it also need to be clean and readable.<\/p>\n<p>Many times I come across codes which are so unorganized that you can&#8217;t even read them, you can&#8217;t find when a condition starts when ends and when other start. Just imagine if you have to understand and maintain that code.<\/p>\n<p>Well, many of you can say that commenting the code can solve the problem. Sure, commenting code is a good practice but I don&#8217;t think it can solve the problem of unorganized code because sometimes comments are not enough and we have to read the code.<\/p>\n<p>So why don&#8217;t we write code so that it just not need to be commented.<\/p>\n<blockquote><p>The Only Truly Good Comment is the Comment You Found a Way Not To Write.<\/p><\/blockquote>\n<p>I am not a big code commenter, and I love to read the <code>Robert C. Martin (a.k.a. Uncle Bob)<\/code> on code commenting:<\/p>\n<blockquote><p>Why am I so down on comments? Because they lie. Not always, and not intentionally, but too often. The older a comment is, and the farther away it is from the code it describes, the more likely it is to be just plain wrong. The reason is simple. Programmers can\u2019t realistically maintain them.<\/p><\/blockquote>\n<p>So, let&#8217;s come to the topic, Tailor: Tailor is a Static Code Analyzer and Linter for Swift. It helps to enforce Swift coding guidelines collected from many sources in your code. It helps to code clean and reduce the possibility of bugs.<\/p>\n<h2>Installation<\/h2>\n<p>To install tailor use following command in terminal:<\/p>\n<pre class=\"toolbar:2 striped:false nums:false nums-toggle:false lang:sh decode:true\">brew install tailor<\/pre>\n<p>If Homebrew is not installed on your system use following command to install it first:<\/p>\n<pre class=\"toolbar:2 toolbar-overlay:false ranges:false nums:false nums-toggle:false lang:sh decode:true \">ruby -e \"$(curl -fsSL https:\/\/raw.githubusercontent.com\/Homebrew\/install\/master\/install)\"<\/pre>\n<p>That&#8217;s it Tailor is installed on your system, you can check it with following command:<\/p>\n<pre class=\"toolbar:2 toolbar-overlay:false ranges:false nums:false nums-toggle:false lang:sh decode:true\">brew doctor<\/pre>\n<h2>Integration with XCode Project<\/h2>\n<p>Use following command to Integrate Tailor with your XCode Project:<\/p>\n<pre class=\"toolbar:2 toolbar-overlay:false toolbar-hide:false ranges:false nums:false nums-toggle:false lang:sh decode:true \">tailor --xcode \/path\/to\/demo.xcodeproj\/<\/pre>\n<p>This command will add following build script to your project<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-full wp-image-3368\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/06\/tailor-script.png\" alt=\"\" width=\"1200\" height=\"300\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/06\/tailor-script.png 1200w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/06\/tailor-script-300x75.png 300w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/06\/tailor-script-768x192.png 768w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/06\/tailor-script-1024x256.png 1024w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/06\/tailor-script-624x156.png 624w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>You can also add the build script directly in your project.<\/p>\n<h2>Disable Tailor in source code<\/h2>\n<p>You can disable the Tailor for some code snippet.<\/p>\n<h3>Disable for a single line<\/h3>\n<p>To disable Tailor for a single line use `\/\/ tailor:disable` after that line, like:<\/p>\n<pre class=\"toolbar:2 toolbar-overlay:false toolbar-hide:false toolbar-delay:false striped:false lang:swift decode:true \">if(someBoolean == true) { \/\/ tailor:disable\r\n}<\/pre>\n<h3>Disable for a block<\/h3>\n<p>To disable Tailor for a block of code write that code within <code>\/\/ tailor:off<\/code>\u00a0and <code>\/\/ tailor:on<\/code>\u00a0comments, like:<\/p>\n<pre class=\"toolbar:2 toolbar-overlay:false toolbar-hide:false toolbar-delay:false lang:swift decode:true \">\/\/ tailor:off\r\nextension CreateOrderVC: CreateOrderDisplay {\r\n    \r\n    \/\/ MARK: Display logic\r\n    func displayOrder(viewModel: CreateOrderViewModel) {\r\n        \r\n        \/\/ NOTE: Display the result from the Presenter\r\n        labelOrder.text = viewModel.orderName\r\n    }\r\n    \r\n    func removedSuccessfully(order: CreateOrderViewModel) {\r\n        labelOrder.text = \"\"\r\n    }\r\n}\r\n\/\/ tailor:on<\/pre>\n<h2>Configuration File (<code>.tailor.yml<\/code>)<\/h2>\n<p>The behavior of Tailor can be customized with a configuration file name <code>.tailor.yml<\/code>. We will use this file for following configuration:<\/p>\n<ul>\n<li>include\/exclude some files or directories<\/li>\n<li>enable\/disable some analysis rules<\/li>\n<\/ul>\n<p>For the simplicity keep the <code>.tailor.yml<\/code>\u00a0file in same directory as of the <code>xcproject<\/code>\u00a0file of XCode project, otherwise you will need to specify the path of the file with <code>--config<\/code>\u00a0option in build script.<\/p>\n<h3>Include\/Exclude some files or directories<\/h3>\n<p>by default tailor analyzes all the file within the root directory of project. If you want to analyze only some files you can use <code>include<\/code>\u00a0option in configuration file, and if you want to exclude some files from analysis you can use <code>exclude<\/code>\u00a0option for those files.<\/p>\n<p>It is better to exclude <code>Pods<\/code>\u00a0directory from tailor analysis.<\/p>\n<p>Example:<\/p>\n<pre class=\"toolbar:2 toolbar-overlay:false toolbar-hide:false toolbar-delay:false lang:yaml decode:true\">include:\r\n    - Sources\r\nexclude:\r\n    - Pods\r\n    - Utilities\/ThirdParty<\/pre>\n<p>It will analyze all the files in <code>Sources\/<\/code>\u00a0directory and exclude the files in <code>Pods\/<\/code>\u00a0and <code>Utilities\/ThirdParty\/<\/code>\u00a0directory.<\/p>\n<h3>Enable\/Disable some analysis rules<\/h3>\n<p>To enable or disable some analysis rules you can use <code>only<\/code>\u00a0and <code>except<\/code>\u00a0options.<\/p>\n<p>Example: <code>only<\/code><\/p>\n<pre class=\"toolbar:2 toolbar-overlay:false toolbar-hide:false toolbar-delay:false lang:yaml decode:true\">only:\r\n    - upper-camel-case\r\n    - trailing-closure\r\n    - forced-type-cast\r\n    - redundant-parentheses<\/pre>\n<p>This will only check the given rules.<\/p>\n<p>Example: <code>except<\/code><\/p>\n<pre class=\"toolbar:2 toolbar-overlay:false toolbar-hide:false toolbar-delay:false lang:yaml decode:true \">except:\r\n    - trailing-whitespace\r\n    - comment-whitespace\r\n    - forced-type-cast\r\n    - redundant-parentheses\r\n    - lower-camel-case\r\n    - trailing-closure\r\n    - todo-syntax<\/pre>\n<p>This will check all the rules except these.<\/p>\n<p>So an complete <code>.tailor.yml<\/code>\u00a0file will look something like this:<\/p>\n<pre class=\"toolbar:2 toolbar-overlay:false toolbar-hide:false toolbar-delay:false lang:yaml decode:true\">include:\r\n    - Sources\r\n\r\nexclude:\r\n    - Pods\r\n    - Utilities\/ThirdParty\r\n\r\nexcept:\r\n    - trailing-whitespace\r\n    - comment-whitespace\r\n    - forced-type-cast\r\n    - redundant-parentheses\r\n    - lower-camel-case\r\n    - trailing-closure\r\n    - todo-syntax<\/pre>\n<h2>Warning or Error<\/h2>\n<p>We can also give the option to treat the violation of rules as error or warning with <code>--max-severity<\/code>\u00a0option. by default it is set to warning. If we set the <code>--max-severity<\/code>\u00a0to <code>error<\/code>\u00a0and any rule violated in our source code then the XCode will mark the build as failed.<\/p>\n<h2>Configuring Analysis Mode in XCode (Optional)<\/h2>\n<p>Now we will configure our project to run Tailor only when we build it in <code>Analyze<\/code> phase.<\/p>\n<p>Add a new configuration <code>Analyze<\/code>\u00a0to the project.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-3385\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/06\/analyze1-1.png\" alt=\"\" width=\"2040\" height=\"644\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/06\/analyze1-1.png 2040w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/06\/analyze1-1-300x95.png 300w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/06\/analyze1-1-768x242.png 768w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/06\/analyze1-1-1024x323.png 1024w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/06\/analyze1-1-624x197.png 624w\" sizes=\"(max-width: 2040px) 100vw, 2040px\" \/><\/p>\n<p>Goto Edit Scheme, and in <code>Analyze<\/code>\u00a0Phase select our newly created configuration.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-3386\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/06\/analyze2.png\" alt=\"\" width=\"1798\" height=\"1012\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/06\/analyze2.png 1798w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/06\/analyze2-300x169.png 300w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/06\/analyze2-768x432.png 768w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/06\/analyze2-1024x576.png 1024w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/06\/analyze2-624x351.png 624w\" sizes=\"(max-width: 1798px) 100vw, 1798px\" \/><\/p>\n<p>Change the tailor build script like this:<\/p>\n<pre class=\"toolbar:2 toolbar-overlay:false toolbar-hide:false toolbar-delay:false lang:sh decode:true\">if [ \"${CONFIGURATION}\" = \"Analyze\" ]; then\r\n    if hash tailor 2&gt;\/dev\/null; then\r\n        tailor\r\n    else\r\n        echo \"warning: Please install Tailor from https:\/\/tailor.sh\"\r\n    fi\r\nfi<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>Done, Now Tailor will only run in Analyze mode \ud83d\ude42 .<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; I found this quote by James O. Coplien\u00a0on Japanese\u00a0workplace organization methodology called 5S Clean your workplace on daily basis completely or set cleaning frequency. Use cleaning as inspection. Prevent machinery and equipment deterioration. Keep workplace safe and easy to work. Keep workplace clean and pleasing to work in. Just like our organization, the codebase [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3362,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,71,8],"tags":[160,122,89,165,183,178,10,28],"class_list":["post-3356","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ios","category-mobile","category-mobile-architecture-and-design","tag-ios","tag-ipad","tag-iphone","tag-mobile","tag-swift","tag-swift-3-0","tag-ui-design","tag-xcode"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Tailor: Clean and Organized Code - InnovationM - Blog<\/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.innovationm.com\/blog\/tailor-clean-and-organized-code\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Tailor: Clean and Organized Code - InnovationM - Blog\" \/>\n<meta property=\"og:description\" content=\"&nbsp; I found this quote by James O. Coplien\u00a0on Japanese\u00a0workplace organization methodology called 5S Clean your workplace on daily basis completely or set cleaning frequency. Use cleaning as inspection. Prevent machinery and equipment deterioration. Keep workplace safe and easy to work. Keep workplace clean and pleasing to work in. Just like our organization, the codebase [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.innovationm.com\/blog\/tailor-clean-and-organized-code\/\" \/>\n<meta property=\"og:site_name\" content=\"InnovationM - Blog\" \/>\n<meta property=\"article:published_time\" content=\"2017-07-04T11:33:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/06\/18ae2e06-5b3b-11e5-9b37-72a3e9621b9c.png\" \/>\n\t<meta property=\"og:image:width\" content=\"3000\" \/>\n\t<meta property=\"og:image:height\" content=\"1000\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"InnovationM Admin\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"InnovationM Admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/tailor-clean-and-organized-code\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/tailor-clean-and-organized-code\\\/\"},\"author\":{\"name\":\"InnovationM Admin\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/#\\\/schema\\\/person\\\/a831bf4602d69d1fa452e3de0c8862ed\"},\"headline\":\"Tailor: Clean and Organized Code\",\"datePublished\":\"2017-07-04T11:33:23+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/tailor-clean-and-organized-code\\\/\"},\"wordCount\":733,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/tailor-clean-and-organized-code\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/06\\\/18ae2e06-5b3b-11e5-9b37-72a3e9621b9c.png\",\"keywords\":[\"iOS\",\"iPad\",\"iPhone\",\"Mobile\",\"Swift\",\"Swift 3.0\",\"UI Design\",\"Xcode\"],\"articleSection\":[\"iOS\",\"Mobile\",\"Mobile Architecture and Design\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/tailor-clean-and-organized-code\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/tailor-clean-and-organized-code\\\/\",\"url\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/tailor-clean-and-organized-code\\\/\",\"name\":\"Tailor: Clean and Organized Code - InnovationM - Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/tailor-clean-and-organized-code\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/tailor-clean-and-organized-code\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/06\\\/18ae2e06-5b3b-11e5-9b37-72a3e9621b9c.png\",\"datePublished\":\"2017-07-04T11:33:23+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/#\\\/schema\\\/person\\\/a831bf4602d69d1fa452e3de0c8862ed\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/tailor-clean-and-organized-code\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/tailor-clean-and-organized-code\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/tailor-clean-and-organized-code\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/06\\\/18ae2e06-5b3b-11e5-9b37-72a3e9621b9c.png\",\"contentUrl\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/06\\\/18ae2e06-5b3b-11e5-9b37-72a3e9621b9c.png\",\"width\":3000,\"height\":1000},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/tailor-clean-and-organized-code\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tailor: Clean and Organized Code\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/\",\"name\":\"InnovationM - Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/#\\\/schema\\\/person\\\/a831bf4602d69d1fa452e3de0c8862ed\",\"name\":\"InnovationM Admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g\",\"caption\":\"InnovationM Admin\"},\"sameAs\":[\"http:\\\/\\\/www.innovationm.com\\\/\"],\"url\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/author\\\/innovationmadmin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Tailor: Clean and Organized Code - InnovationM - Blog","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.innovationm.com\/blog\/tailor-clean-and-organized-code\/","og_locale":"en_US","og_type":"article","og_title":"Tailor: Clean and Organized Code - InnovationM - Blog","og_description":"&nbsp; I found this quote by James O. Coplien\u00a0on Japanese\u00a0workplace organization methodology called 5S Clean your workplace on daily basis completely or set cleaning frequency. Use cleaning as inspection. Prevent machinery and equipment deterioration. Keep workplace safe and easy to work. Keep workplace clean and pleasing to work in. Just like our organization, the codebase [&hellip;]","og_url":"https:\/\/www.innovationm.com\/blog\/tailor-clean-and-organized-code\/","og_site_name":"InnovationM - Blog","article_published_time":"2017-07-04T11:33:23+00:00","og_image":[{"width":3000,"height":1000,"url":"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/06\/18ae2e06-5b3b-11e5-9b37-72a3e9621b9c.png","type":"image\/png"}],"author":"InnovationM Admin","twitter_misc":{"Written by":"InnovationM Admin","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.innovationm.com\/blog\/tailor-clean-and-organized-code\/#article","isPartOf":{"@id":"https:\/\/www.innovationm.com\/blog\/tailor-clean-and-organized-code\/"},"author":{"name":"InnovationM Admin","@id":"https:\/\/www.innovationm.com\/blog\/#\/schema\/person\/a831bf4602d69d1fa452e3de0c8862ed"},"headline":"Tailor: Clean and Organized Code","datePublished":"2017-07-04T11:33:23+00:00","mainEntityOfPage":{"@id":"https:\/\/www.innovationm.com\/blog\/tailor-clean-and-organized-code\/"},"wordCount":733,"commentCount":0,"image":{"@id":"https:\/\/www.innovationm.com\/blog\/tailor-clean-and-organized-code\/#primaryimage"},"thumbnailUrl":"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/06\/18ae2e06-5b3b-11e5-9b37-72a3e9621b9c.png","keywords":["iOS","iPad","iPhone","Mobile","Swift","Swift 3.0","UI Design","Xcode"],"articleSection":["iOS","Mobile","Mobile Architecture and Design"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.innovationm.com\/blog\/tailor-clean-and-organized-code\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.innovationm.com\/blog\/tailor-clean-and-organized-code\/","url":"https:\/\/www.innovationm.com\/blog\/tailor-clean-and-organized-code\/","name":"Tailor: Clean and Organized Code - InnovationM - Blog","isPartOf":{"@id":"https:\/\/www.innovationm.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.innovationm.com\/blog\/tailor-clean-and-organized-code\/#primaryimage"},"image":{"@id":"https:\/\/www.innovationm.com\/blog\/tailor-clean-and-organized-code\/#primaryimage"},"thumbnailUrl":"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/06\/18ae2e06-5b3b-11e5-9b37-72a3e9621b9c.png","datePublished":"2017-07-04T11:33:23+00:00","author":{"@id":"https:\/\/www.innovationm.com\/blog\/#\/schema\/person\/a831bf4602d69d1fa452e3de0c8862ed"},"breadcrumb":{"@id":"https:\/\/www.innovationm.com\/blog\/tailor-clean-and-organized-code\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.innovationm.com\/blog\/tailor-clean-and-organized-code\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.innovationm.com\/blog\/tailor-clean-and-organized-code\/#primaryimage","url":"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/06\/18ae2e06-5b3b-11e5-9b37-72a3e9621b9c.png","contentUrl":"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/06\/18ae2e06-5b3b-11e5-9b37-72a3e9621b9c.png","width":3000,"height":1000},{"@type":"BreadcrumbList","@id":"https:\/\/www.innovationm.com\/blog\/tailor-clean-and-organized-code\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.innovationm.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Tailor: Clean and Organized Code"}]},{"@type":"WebSite","@id":"https:\/\/www.innovationm.com\/blog\/#website","url":"https:\/\/www.innovationm.com\/blog\/","name":"InnovationM - Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.innovationm.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.innovationm.com\/blog\/#\/schema\/person\/a831bf4602d69d1fa452e3de0c8862ed","name":"InnovationM Admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g","caption":"InnovationM Admin"},"sameAs":["http:\/\/www.innovationm.com\/"],"url":"https:\/\/www.innovationm.com\/blog\/author\/innovationmadmin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/posts\/3356","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/comments?post=3356"}],"version-history":[{"count":0,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/posts\/3356\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/media\/3362"}],"wp:attachment":[{"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/media?parent=3356"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/categories?post=3356"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/tags?post=3356"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}