{"id":450,"date":"2012-10-18T22:12:12","date_gmt":"2012-10-19T03:12:12","guid":{"rendered":"http:\/\/billdwhite.com\/?p=450"},"modified":"2012-10-18T22:12:12","modified_gmt":"2012-10-19T03:12:12","slug":"puremvc-pipes-ported-to-native-javascript","status":"publish","type":"post","link":"https:\/\/billdwhite.com\/wordpress\/2012\/10\/18\/puremvc-pipes-ported-to-native-javascript\/","title":{"rendered":"PureMVC Pipes Ported to Native Javascript"},"content":{"rendered":"<p>When I <a href=\"http:\/\/billdwhite.com\/?p=425\" title=\"PureMVC port with Dojo\">ported PureMVC over to Dojo<\/a> I could not pass up the chance to port over the <a href=\"http:\/\/github.com\/PureMVC\/puremvc-as3-util-pipes\/wiki\" title=\"PureMVC Pipes\">the Pipes utility<\/a> as well.  I initially created a <a href=\"http:\/\/github.com\/billdwhite\/dojo-puremvc\/tree\/master\/src\/org\/puremvc\/js\/multicore\/utilities\" title=\"PureMVC Pipes - Dojo Version\">Dojo-flavored version<\/a>, but since the main <a href=\"http:\/\/github.com\/PureMVC\" title=\"PureMVC on GitHub\">Javascript distribution of PureMVC<\/a> is framework independent, I figured that Pipes should be as well.<\/p>\n<p>For those who are unfamiliar with Pipes, it is basically a way to create multiple PureMVC applications, each with its own core, so that they can be loaded and unloaded as modules within a main application or shell.  It can get a little confusing and may appear to be overkill at first glance, but I think the end result proves to be worth the effort.<\/p>\n<p>I posted the <a href=\"http:\/\/github.com\/billdwhite\/puremvc-js-pipes\" title=\"PureMVC Pipes JS\">native version here<\/a>.  I also created a <a href=\"http:\/\/github.com\/billdwhite\/puremvc-js-pipes\/tree\/master\/pipes-define\" title=\"PureMVC Pipes JS using puremvc.define\">variation<\/a> that uses the <a href=\"http:\/\/forums.puremvc.org\/index.php?topic=1992.0\" title=\"puremvc.define\">puremvc.define<\/a> function to create a more clearly defined OO structure.  I really like that approach better but the first version mimics the coding style found in the currently supported PureMVC Javascript implementation.<\/p>\n<p>I also created a demo based on <a href=\"http:\/\/www.tekool.net\/blogfiles\/puremvc_flex_modules_and_pipes\/project\/PureMVC_FlexModulesAndPipes.html\" title=\"Tekool's Pipes Demo\">Tekool&#8217;s AS3 Pipes Demo<\/a>:<\/p>\n<ul>\n<li><a href=\"http:\/\/billdwhite.com\/wp-content\/demos\/PipesDemo\/pipes\/src-demo\/index.html\" title=\"PureMVC Pipes JS - Native\">Demo [native version]<\/a><\/li>\n<li><a href=\"http:\/\/billdwhite.com\/wp-content\/demos\/PipesDemo\/pipes-define\/src-demo\/index.html\" title=\"PureMVC Pipes JS - Define Version\">Demo [puremvc.define version]<\/a>\n<pre><em>*they are identical in appearance and behavior<\/em><\/pre>\n<\/li>\n<\/ul>\n<p>UPDATE:  <a href=\"http:\/\/billdwhite.com\/wp-content\/downloads\/PipesDemo.zip\" title=\"PureMVC Demo Source\">Here is a zip file<\/a> containing the source for both demos.  It is a tad large since it has a few binaries and dojo src libs (for the dojo version only of course).<\/p>\n<p>If you are looking to learn more about Pipes, check out the following links which cover the conceptual use of Pipes, albeit in a Actionscript\/Flex format.<\/p>\n<ul>\n<li><a href=\"http:\/\/www.tekool.net\/blog\/2009\/06\/14\/puremvc_flex_modules_and_pipes\/\" title=\"Tekool - Flex modules with PureMVC Pipes Simple Demo\">Tekool &#8211; Flex modules with PureMVC Pipes Simple Demo<\/a><\/li>\n<li><a href=\"http:\/\/joelhooks.com\/2009\/05\/18\/piping-the-machine-puremvc-multicore-with-pipes-and-the-finite-state-machine-fsm\/\" title=\"Joel Hooks - Piping the Machine\">Joel Hooks &#8211; Piping the Machine<\/a><\/li>\n<li><a href=\"http:\/\/www.joshuaostrom.com\/2008\/06\/15\/understanding-puremvc-pipes\/\" title=\"Joshua Ostrom - Understanding PureMVC Pipes\">Joshua Ostrom &#8211; Understanding PureMVC Pipes<\/a><\/li>\n<li><a href=\"http:\/\/www.websector.de\/blog\/2008\/06\/21\/a-basic-puremvc-multicore-as3-example-using-pipes-utility-and-modules\/\" title=\"Jens Krause - Basic PureMVC Multicore AS3 Example\">Jens Krause &#8211; A basic PureMVC MultiCore AS3 Example<\/a><\/li>\n<\/ul>\n<p>(Update:  I had to change the reference from Shell.js to Shelll.js because wordpress seems to think that any file named Shell.js is dangerous and blocks access to it which was breaking the demo.  I updated both html pages with Shelll which points to Shelll.js to make it work)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When I ported PureMVC over to Dojo I could not pass up the chance to port over the the Pipes utility as well. I initially created a Dojo-flavored version, but since the main Javascript distribution of PureMVC is framework independent, I figured that Pipes should be as well. For those who are unfamiliar with Pipes,\u2026 <span class=\"read-more\"><a href=\"https:\/\/billdwhite.com\/wordpress\/2012\/10\/18\/puremvc-pipes-ported-to-native-javascript\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[9,13],"tags":[],"class_list":["post-450","post","type-post","status-publish","format-standard","hentry","category-javascript","category-puremvc"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>PureMVC Pipes Ported to Native Javascript - Bill White<\/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:\/\/billdwhite.com\/wordpress\/2012\/10\/18\/puremvc-pipes-ported-to-native-javascript\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PureMVC Pipes Ported to Native Javascript - Bill White\" \/>\n<meta property=\"og:description\" content=\"When I ported PureMVC over to Dojo I could not pass up the chance to port over the the Pipes utility as well. I initially created a Dojo-flavored version, but since the main Javascript distribution of PureMVC is framework independent, I figured that Pipes should be as well. For those who are unfamiliar with Pipes,\u2026 Read More &raquo;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/billdwhite.com\/wordpress\/2012\/10\/18\/puremvc-pipes-ported-to-native-javascript\/\" \/>\n<meta property=\"og:site_name\" content=\"Bill White\" \/>\n<meta property=\"article:published_time\" content=\"2012-10-19T03:12:12+00:00\" \/>\n<meta name=\"author\" content=\"Bill White\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@bill_d_white\" \/>\n<meta name=\"twitter:site\" content=\"@bill_d_white\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Bill White\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/billdwhite.com\/wordpress\/2012\/10\/18\/puremvc-pipes-ported-to-native-javascript\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/billdwhite.com\/wordpress\/2012\/10\/18\/puremvc-pipes-ported-to-native-javascript\/\"},\"author\":{\"name\":\"Bill White\",\"@id\":\"https:\/\/billdwhite.com\/wordpress\/#\/schema\/person\/ea6b87554d0eed13a0152765dd01d314\"},\"headline\":\"PureMVC Pipes Ported to Native Javascript\",\"datePublished\":\"2012-10-19T03:12:12+00:00\",\"dateModified\":\"2012-10-19T03:12:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/billdwhite.com\/wordpress\/2012\/10\/18\/puremvc-pipes-ported-to-native-javascript\/\"},\"wordCount\":327,\"commentCount\":8,\"publisher\":{\"@id\":\"https:\/\/billdwhite.com\/wordpress\/#\/schema\/person\/ea6b87554d0eed13a0152765dd01d314\"},\"articleSection\":[\"Javascript\",\"PureMVC\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/billdwhite.com\/wordpress\/2012\/10\/18\/puremvc-pipes-ported-to-native-javascript\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/billdwhite.com\/wordpress\/2012\/10\/18\/puremvc-pipes-ported-to-native-javascript\/\",\"url\":\"https:\/\/billdwhite.com\/wordpress\/2012\/10\/18\/puremvc-pipes-ported-to-native-javascript\/\",\"name\":\"PureMVC Pipes Ported to Native Javascript - Bill White\",\"isPartOf\":{\"@id\":\"https:\/\/billdwhite.com\/wordpress\/#website\"},\"datePublished\":\"2012-10-19T03:12:12+00:00\",\"dateModified\":\"2012-10-19T03:12:12+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/billdwhite.com\/wordpress\/2012\/10\/18\/puremvc-pipes-ported-to-native-javascript\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/billdwhite.com\/wordpress\/2012\/10\/18\/puremvc-pipes-ported-to-native-javascript\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/billdwhite.com\/wordpress\/2012\/10\/18\/puremvc-pipes-ported-to-native-javascript\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/billdwhite.com\/wordpress\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PureMVC Pipes Ported to Native Javascript\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/billdwhite.com\/wordpress\/#website\",\"url\":\"https:\/\/billdwhite.com\/wordpress\/\",\"name\":\"Bill White's Blog\",\"description\":\"UI Development and Data Visualization:  Angular \/ React \/ D3 \/ Typescript \/ Javascript \/ UI \/ UX \/ Etc\",\"publisher\":{\"@id\":\"https:\/\/billdwhite.com\/wordpress\/#\/schema\/person\/ea6b87554d0eed13a0152765dd01d314\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/billdwhite.com\/wordpress\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/billdwhite.com\/wordpress\/#\/schema\/person\/ea6b87554d0eed13a0152765dd01d314\",\"name\":\"Bill White\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/billdwhite.com\/wordpress\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3c3595ee8305a186eea4ea5286143893?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3c3595ee8305a186eea4ea5286143893?s=96&d=mm&r=g\",\"caption\":\"Bill White\"},\"logo\":{\"@id\":\"https:\/\/billdwhite.com\/wordpress\/#\/schema\/person\/image\/\"},\"sameAs\":[\"http:\/\/www.billdwhite.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PureMVC Pipes Ported to Native Javascript - Bill White","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:\/\/billdwhite.com\/wordpress\/2012\/10\/18\/puremvc-pipes-ported-to-native-javascript\/","og_locale":"en_US","og_type":"article","og_title":"PureMVC Pipes Ported to Native Javascript - Bill White","og_description":"When I ported PureMVC over to Dojo I could not pass up the chance to port over the the Pipes utility as well. I initially created a Dojo-flavored version, but since the main Javascript distribution of PureMVC is framework independent, I figured that Pipes should be as well. For those who are unfamiliar with Pipes,\u2026 Read More &raquo;","og_url":"https:\/\/billdwhite.com\/wordpress\/2012\/10\/18\/puremvc-pipes-ported-to-native-javascript\/","og_site_name":"Bill White","article_published_time":"2012-10-19T03:12:12+00:00","author":"Bill White","twitter_card":"summary_large_image","twitter_creator":"@bill_d_white","twitter_site":"@bill_d_white","twitter_misc":{"Written by":"Bill White","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/billdwhite.com\/wordpress\/2012\/10\/18\/puremvc-pipes-ported-to-native-javascript\/#article","isPartOf":{"@id":"https:\/\/billdwhite.com\/wordpress\/2012\/10\/18\/puremvc-pipes-ported-to-native-javascript\/"},"author":{"name":"Bill White","@id":"https:\/\/billdwhite.com\/wordpress\/#\/schema\/person\/ea6b87554d0eed13a0152765dd01d314"},"headline":"PureMVC Pipes Ported to Native Javascript","datePublished":"2012-10-19T03:12:12+00:00","dateModified":"2012-10-19T03:12:12+00:00","mainEntityOfPage":{"@id":"https:\/\/billdwhite.com\/wordpress\/2012\/10\/18\/puremvc-pipes-ported-to-native-javascript\/"},"wordCount":327,"commentCount":8,"publisher":{"@id":"https:\/\/billdwhite.com\/wordpress\/#\/schema\/person\/ea6b87554d0eed13a0152765dd01d314"},"articleSection":["Javascript","PureMVC"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/billdwhite.com\/wordpress\/2012\/10\/18\/puremvc-pipes-ported-to-native-javascript\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/billdwhite.com\/wordpress\/2012\/10\/18\/puremvc-pipes-ported-to-native-javascript\/","url":"https:\/\/billdwhite.com\/wordpress\/2012\/10\/18\/puremvc-pipes-ported-to-native-javascript\/","name":"PureMVC Pipes Ported to Native Javascript - Bill White","isPartOf":{"@id":"https:\/\/billdwhite.com\/wordpress\/#website"},"datePublished":"2012-10-19T03:12:12+00:00","dateModified":"2012-10-19T03:12:12+00:00","breadcrumb":{"@id":"https:\/\/billdwhite.com\/wordpress\/2012\/10\/18\/puremvc-pipes-ported-to-native-javascript\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/billdwhite.com\/wordpress\/2012\/10\/18\/puremvc-pipes-ported-to-native-javascript\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/billdwhite.com\/wordpress\/2012\/10\/18\/puremvc-pipes-ported-to-native-javascript\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/billdwhite.com\/wordpress\/"},{"@type":"ListItem","position":2,"name":"PureMVC Pipes Ported to Native Javascript"}]},{"@type":"WebSite","@id":"https:\/\/billdwhite.com\/wordpress\/#website","url":"https:\/\/billdwhite.com\/wordpress\/","name":"Bill White's Blog","description":"UI Development and Data Visualization:  Angular \/ React \/ D3 \/ Typescript \/ Javascript \/ UI \/ UX \/ Etc","publisher":{"@id":"https:\/\/billdwhite.com\/wordpress\/#\/schema\/person\/ea6b87554d0eed13a0152765dd01d314"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/billdwhite.com\/wordpress\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/billdwhite.com\/wordpress\/#\/schema\/person\/ea6b87554d0eed13a0152765dd01d314","name":"Bill White","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/billdwhite.com\/wordpress\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/3c3595ee8305a186eea4ea5286143893?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3c3595ee8305a186eea4ea5286143893?s=96&d=mm&r=g","caption":"Bill White"},"logo":{"@id":"https:\/\/billdwhite.com\/wordpress\/#\/schema\/person\/image\/"},"sameAs":["http:\/\/www.billdwhite.com"]}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/billdwhite.com\/wordpress\/wp-json\/wp\/v2\/posts\/450","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/billdwhite.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/billdwhite.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/billdwhite.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/billdwhite.com\/wordpress\/wp-json\/wp\/v2\/comments?post=450"}],"version-history":[{"count":0,"href":"https:\/\/billdwhite.com\/wordpress\/wp-json\/wp\/v2\/posts\/450\/revisions"}],"wp:attachment":[{"href":"https:\/\/billdwhite.com\/wordpress\/wp-json\/wp\/v2\/media?parent=450"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/billdwhite.com\/wordpress\/wp-json\/wp\/v2\/categories?post=450"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/billdwhite.com\/wordpress\/wp-json\/wp\/v2\/tags?post=450"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}