<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;CkQBQX89eip7ImA9WhJWEkw.&quot;"><id>tag:blogger.com,1999:blog-1930213017396645687</id><updated>2012-08-17T07:32:30.162-06:00</updated><category term="facebook" /><category term="google maps" /><category term="truism" /><category term="cloudos" /><category term="defaction" /><category term="errorstack" /><category term="statcounter" /><category term="YQL" /><category term="firebug" /><category term="brightkite" /><category term="events" /><category term="linkedin" /><category term="edoism" /><category term="time" /><category term="seo" /><category term="crud" /><category term="webhooks" /><category term="jquery" /><category term="iphone" /><category term="kynetx" /><category term="annotation" /><category term="geolocation" /><category term="css" /><category term="push" /><category term="aculis" /><category term="XPath" /><category term="twilio" /><category term="online identity" /><category term="twitter" /><category term="personal cloud" /><category term="bigohoo" /><category term="oauth" /><category term="social media" /><category term="blogger template" /><category term="webapp" /><category term="JSON" /><category term="widget" /><category term="foursquare" /><category term="safari" /><title>edoism</title><subtitle type="html">truism of ed orcutt</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://edoism.orcutt.org/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://edoism.orcutt.org/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Ed Orcutt</name><uri>http://www.blogger.com/profile/01072069799127687951</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_tXU2PrpKxHU/SuDD5YwomTI/AAAAAAAAAII/hCrRNUZWOto/S220/edo_transjpg.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>40</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/edoism" /><feedburner:info uri="edoism" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;D0cCQH46eCp7ImA9WhJRE00.&quot;"><id>tag:blogger.com,1999:blog-1930213017396645687.post-3204083770873682819</id><published>2012-07-14T16:31:00.000-06:00</published><updated>2012-07-14T16:31:01.010-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-07-14T16:31:01.010-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="kynetx" /><category scheme="http://www.blogger.com/atom/ns#" term="cloudos" /><title>CloudOS Event Protocol Update</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-rYTMrSIDBAI/UAHy3yGPr4I/AAAAAAAAAbw/9T7_zHdFwuc/s1600/cloudos-update.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-rYTMrSIDBAI/UAHy3yGPr4I/AAAAAAAAAbw/9T7_zHdFwuc/s1600/cloudos-update.png" /&gt;&lt;/a&gt;&lt;/div&gt;
The Kynetx CloudOS Ruleset and Module provide and event based interface to the Personal Cloud account services. The account services include the ability to manage Personal Clouds, Personal Channels and Rulesets within a Personal Cloud. The CloudOS module provides functions to access the account services and the Ruleset provides includes system Rules that provide access to the account system. This week we have updated the functions provided by the module to operate with the current Personal Cloud, or within another Personal Cloud identified by a Personal Channel.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
If you want to used the CloudOS function within the current Personal Cloud simple omit the userToken parameter when calling the function. For example, to uninstall a Ruleset from the current Personal Cloud:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;pre {
  rulesetStatus = CloudOS:rulesetRemove("a169x404");
}&lt;/pre&gt;
&lt;br /&gt;
However, if you want to uninstall a Ruleset for another Personal Cloud you will need to include a Personal Channel identifier for the target Personal Cloud:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;pre {
  authToken = "71760130-a8f8-012f-4a37-00163ebcdddd";
  rulesetStatus = CloudOS:rulesetRemove("a169x404", authToken);
}&lt;/pre&gt;
&lt;br /&gt;
Of course in order to use the functions provided by the CloudOS module you must include the following pragma in the meta section of your ruleset:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;user module a169x625 alias CloudOS
&lt;/pre&gt;
&lt;br /&gt;
Documentation on the functions provided are available at &lt;a href="http://developer.kynetx.com/display/docs/CloudOS+Event+Protocol"&gt;developer.kynetx.com&lt;/a&gt;. Functions are provided by the CloudOS module to create, destroy and list Personal Channels, to add, remove and list Rulesets, and to create and authenticate with Personal Clouds.&lt;br /&gt;
&lt;br /&gt;
Enjoy!&lt;img src="http://feeds.feedburner.com/~r/edoism/~4/Utu2F6FAuBU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://edoism.orcutt.org/feeds/3204083770873682819/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://edoism.orcutt.org/2012/07/cloudos-event-protocol-update.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/3204083770873682819?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/3204083770873682819?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/edoism/~3/Utu2F6FAuBU/cloudos-event-protocol-update.html" title="CloudOS Event Protocol Update" /><author><name>Ed Orcutt</name><uri>http://www.blogger.com/profile/01072069799127687951</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_tXU2PrpKxHU/SuDD5YwomTI/AAAAAAAAAII/hCrRNUZWOto/S220/edo_transjpg.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-rYTMrSIDBAI/UAHy3yGPr4I/AAAAAAAAAbw/9T7_zHdFwuc/s72-c/cloudos-update.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://edoism.orcutt.org/2012/07/cloudos-event-protocol-update.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0cMQno7fSp7ImA9WhJSFU8.&quot;"><id>tag:blogger.com,1999:blog-1930213017396645687.post-2804514634225734509</id><published>2012-07-05T16:58:00.000-06:00</published><updated>2012-07-05T16:58:03.405-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-07-05T16:58:03.405-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="kynetx" /><title>Personal Cloud Subscription Walkabout</title><content type="html">&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-8JNJOYRB4-4/T_YZifgbl7I/AAAAAAAAAbM/aMESJDeg-vo/s1600/sub_channels.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-8JNJOYRB4-4/T_YZifgbl7I/AAAAAAAAAbM/aMESJDeg-vo/s1600/sub_channels.png" /&gt;&lt;/a&gt;&lt;/div&gt;
The objective of this article is to explore the steps necessary to establish &lt;a href="http://www.windley.com/archives/2012/06/personal_channels.shtml"&gt;Personal Channels&lt;/a&gt; between two &lt;a href="http://www.windley.com/archives/2012/04/from_personal_computers_to_personal_clouds.shtml"&gt;Personal Clouds&lt;/a&gt;. The notion of a subscription in this context is that a Personal Channel is established which permits events to be raised from one Personal Cloud into another Personal Cloud. So we need to create two Personal Channels, one channel for Ben to raised events into Ted's Personal Cloud and a second Personal Channel for Ted to raised events into Ben's Personal Cloud. We begin this exercise with two Personal Clouds, one for Ben and second one for Ted. In addition, there is a well known public Channel into Ted's Personal Cloud which we will call the doorbell.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-0ChEWk20YVg/T_YZ-d6xbyI/AAAAAAAAAbU/VML3_m8EXCc/s1600/sub_door.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-0ChEWk20YVg/T_YZ-d6xbyI/AAAAAAAAAbU/VML3_m8EXCc/s1600/sub_door.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style="background-color: white;"&gt;We will begin the process of establishing the Personal Channels from Ben's Personal Cloud. An event will be raised by Ben into Ted's Personal Cloud over the public channel identified by the &lt;i&gt;doorbell&lt;/i&gt;. We will call this a &lt;i&gt;subscription request&lt;/i&gt;. As part of the subscription request Ben will need to create a new Personal Channel which can be used to raise events into his Personal Cloud. We will label this new Personal Channel, ChannelA.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
subscriptionRequest(ChannelB, doorbell)&lt;br /&gt;
&lt;br /&gt;
When Ted receives the subscription request event he will save the Event Channel Identifier, ChannelA, so that he may use it in the future to raise events back into Ben's Personal Cloud.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-DmPZTG9ni94/T_YaTBwqTBI/AAAAAAAAAbc/fjMLdMaBzvE/s1600/sub_A.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-DmPZTG9ni94/T_YaTBwqTBI/AAAAAAAAAbc/fjMLdMaBzvE/s1600/sub_A.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Then Ted will respond to the subscription request by raising an event back to Bob over ChannelA. We will call this a &lt;i&gt;subscription confirmation&lt;/i&gt;. As part of the subscription confirmation Ted will need to create a new Personal Channel which can be used to raise events into his Personal Cloud. We will label this Personal Channel, ChannelB.&lt;br /&gt;
&lt;br /&gt;
subscriptionConfirmation(ChannelB, ChannelA)&lt;br /&gt;
&lt;br /&gt;
When Bob receives the subscription confirmation he will save the Event Channel Identifier, ChannelB, so that he may use it in the future to raise events back into Ted's Personal Cloud.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-qoNdqNRRkWA/T_YaiFTh6qI/AAAAAAAAAbk/VMeBYCImFAk/s1600/sub_full.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-qoNdqNRRkWA/T_YaiFTh6qI/AAAAAAAAAbk/VMeBYCImFAk/s1600/sub_full.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Now both Ben and Ted has Personal Channels which can be used to raise events into each others Personal Clouds.&lt;img src="http://feeds.feedburner.com/~r/edoism/~4/JV2MHQjiaSc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://edoism.orcutt.org/feeds/2804514634225734509/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://edoism.orcutt.org/2012/07/personal-cloud-subscription-walkabout.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/2804514634225734509?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/2804514634225734509?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/edoism/~3/JV2MHQjiaSc/personal-cloud-subscription-walkabout.html" title="Personal Cloud Subscription Walkabout" /><author><name>Ed Orcutt</name><uri>http://www.blogger.com/profile/01072069799127687951</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_tXU2PrpKxHU/SuDD5YwomTI/AAAAAAAAAII/hCrRNUZWOto/S220/edo_transjpg.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-8JNJOYRB4-4/T_YZifgbl7I/AAAAAAAAAbM/aMESJDeg-vo/s72-c/sub_channels.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://edoism.orcutt.org/2012/07/personal-cloud-subscription-walkabout.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkYHSXc6eip7ImA9WhJSEkU.&quot;"><id>tag:blogger.com,1999:blog-1930213017396645687.post-1078353752089916599</id><published>2012-07-02T20:55:00.000-06:00</published><updated>2012-07-02T20:55:38.912-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-07-02T20:55:38.912-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="kynetx" /><category scheme="http://www.blogger.com/atom/ns#" term="webapp" /><title>SkyApp Skunkworks: Personal Cloud User Profile</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-H9BQZ-N0YAI/T-jCAK7cecI/AAAAAAAAAZs/gHhagkTF414/s1600/skyappone.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="215" src="http://1.bp.blogspot.com/-H9BQZ-N0YAI/T-jCAK7cecI/AAAAAAAAAZs/gHhagkTF414/s320/skyappone.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
SkyAppTwo is a single-page application that list the application and channels for the &lt;a href="http://www.windley.com/docs/2012/cloudos.shtml"&gt;Personal Cloud&lt;/a&gt;. Twitter Bootstrap is used to provide a responsive web interface, with the Kinetic Rules Engine (KRE) providing the event processing back-end. The SkyApp is built on a refactored module for accessing the accounting system called CloudOS. Note that after you authenticate the CloudOS Ruleset/Module is installed into your Personal Cloud.&lt;br /&gt;
&lt;br /&gt;
&lt;div style="clear: both; text-align: center;"&gt;
&lt;a class="big_button" href="http://edorcutt.github.com/SkyApp-Skunkworks/skyapptwo.html"&gt;View Demo Online&lt;/a&gt; &lt;a class="big_button" href="https://github.com/edorcutt/SkyApp-Skunkworks"&gt;Download Source Code&lt;/a&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/edoism/~4/u2m1904gQFg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://edoism.orcutt.org/feeds/1078353752089916599/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://edoism.orcutt.org/2012/07/skyapp-skunkworks-personal-cloud-user.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/1078353752089916599?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/1078353752089916599?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/edoism/~3/u2m1904gQFg/skyapp-skunkworks-personal-cloud-user.html" title="SkyApp Skunkworks: Personal Cloud User Profile" /><author><name>Ed Orcutt</name><uri>http://www.blogger.com/profile/01072069799127687951</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_tXU2PrpKxHU/SuDD5YwomTI/AAAAAAAAAII/hCrRNUZWOto/S220/edo_transjpg.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-H9BQZ-N0YAI/T-jCAK7cecI/AAAAAAAAAZs/gHhagkTF414/s72-c/skyappone.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://edoism.orcutt.org/2012/07/skyapp-skunkworks-personal-cloud-user.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkYBRXY4eSp7ImA9WhJTFkg.&quot;"><id>tag:blogger.com,1999:blog-1930213017396645687.post-2157851934332266578</id><published>2012-06-25T13:55:00.004-06:00</published><updated>2012-06-25T13:55:54.831-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-06-25T13:55:54.831-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="kynetx" /><category scheme="http://www.blogger.com/atom/ns#" term="webapp" /><title>SkyApp Skunkworks: Personal Cloud Application Template</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-H9BQZ-N0YAI/T-jCAK7cecI/AAAAAAAAAZs/gHhagkTF414/s1600/skyappone.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="215" src="http://1.bp.blogspot.com/-H9BQZ-N0YAI/T-jCAK7cecI/AAAAAAAAAZs/gHhagkTF414/s320/skyappone.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;SkyAppOne is a &lt;a href="http://en.wikipedia.org/wiki/Single-page_application"&gt;single-page application&lt;/a&gt; template for the &lt;a href="http://www.windley.com/docs/2012/cloudos.shtml"&gt;Personal Cloud&lt;/a&gt;. Twitter Bootstrap is used to provide a responsive web interface, with the Kinetic Rules Engine (KRE) providing the event processing back-end. This initial template provides an example of how to handle routing via URL hashtags and authentication with the Kynetx account system. Future SkyApp templates will offer additional solution specific examples.&lt;br /&gt;
&lt;br /&gt;
&lt;div style="clear: both; text-align: center;"&gt;&lt;a class="big_button" href="http://edorcutt.github.com/SkyApp-Skunkworks/skyappone.html"&gt;View Demo Online&lt;/a&gt; &lt;a class="big_button" href="https://github.com/edorcutt/SkyApp-Skunkworks"&gt;Download Source Code&lt;/a&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/edoism/~4/Yx419qjCcZE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://edoism.orcutt.org/feeds/2157851934332266578/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://edoism.orcutt.org/2012/06/skyapp-skunkworks-personal-cloud.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/2157851934332266578?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/2157851934332266578?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/edoism/~3/Yx419qjCcZE/skyapp-skunkworks-personal-cloud.html" title="SkyApp Skunkworks: Personal Cloud Application Template" /><author><name>Ed Orcutt</name><uri>http://www.blogger.com/profile/01072069799127687951</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_tXU2PrpKxHU/SuDD5YwomTI/AAAAAAAAAII/hCrRNUZWOto/S220/edo_transjpg.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-H9BQZ-N0YAI/T-jCAK7cecI/AAAAAAAAAZs/gHhagkTF414/s72-c/skyappone.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://edoism.orcutt.org/2012/06/skyapp-skunkworks-personal-cloud.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0AMQHgyfip7ImA9WhJTEkQ.&quot;"><id>tag:blogger.com,1999:blog-1930213017396645687.post-8591799369061398791</id><published>2012-06-21T10:23:00.000-06:00</published><updated>2012-06-21T10:23:01.696-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-06-21T10:23:01.696-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="crud" /><category scheme="http://www.blogger.com/atom/ns#" term="kynetx" /><title>CRUD in Your Personal Cloud</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-eD7ivA_doX8/T-JXLsNhqBI/AAAAAAAAAZg/a8_AcoFBza8/s1600/datastore.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="150" src="http://1.bp.blogspot.com/-eD7ivA_doX8/T-JXLsNhqBI/AAAAAAAAAZg/a8_AcoFBza8/s200/datastore.png" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;
In this article we will develop a watch action for form submits within the Sky Event API.&amp;nbsp;&lt;span style="background-color: white;"&gt;Previously we have done &lt;a href="http://edoism.orcutt.org/2011/10/krl-safari-krud-redux-kynetx-crud-with.html"&gt;CRUD with KRL&lt;/a&gt;, which enables the development of &lt;a href="http://developer.kynetx.com/display/docs/Event+Network+Exercises%3A+Data+Storage+Module"&gt;data storage modules&lt;/a&gt;. While the &lt;a href="http://edorcutt.github.com/SkyKit/watch.html"&gt;watch()&lt;/a&gt; action works well with the current Blue API, it does not yet support the Sky Event API. We have added a watch_submit() defaction to the &lt;a href="https://github.com/edorcutt/SkyKit"&gt;SkyKit module&lt;/a&gt; so that you can create a data storage module in your Personal Cloud.&lt;/span&gt;&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div style="clear: both; text-align: center;"&gt;
&lt;a class="big_button" href="http://edorcutt.github.com/SkyKit/watch.html"&gt;View Demo Online&lt;/a&gt; &lt;a class="big_button" href="https://github.com/edorcutt/SkyKit"&gt;Download Source Code&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
The demo ruleset is executed as a site tag. The ruleset executes a raise_delegate() into a Personal Cloud, with event type formTest.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;SkyKit:raise_delegate("formTest", "f6511bf0-9ba1-012f-7a7a-00163e64d091")
&lt;/pre&gt;
&lt;br /&gt;
With the data storage module ruleset installed in the Personal Cloud, the formTest rule is fired:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;rule formTest {
  select when web formTest
  pre {
    eci = "f6511bf0-9ba1-012f-7a7a-00163e64d091";
    firstName = ent:firstName || "";
    lastName  = ent:lastName || "";
  }
  {
    SkyKit:watch_submit("#formDemo", eci);
    emit &amp;lt;&amp;lt;
      $K('#firstName').val(firstName);
      $K('#lastName').val(lastName);
    &amp;gt;&amp;gt;;
  }
}
&lt;/pre&gt;
&lt;br /&gt;
This rule sets a watch for form submit and displays the current values within the data store. When the form is submitted a Sky Event will be raised into the Personal Cloud associated with the Event Channel Identifier.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;rule formSubmit {
  select when web submit "#formDemo"
  pre {
    firstName = event:attr("firstName");
    lastName  = event:attr("lastName");
  }
  { noop(); }
  fired {
    set ent:firstName firstName;
    set ent:lastName lastName;
  }
}
&lt;/pre&gt;
&lt;br /&gt;
The formSubmit rule will be fired when the form is submitted, saving the values into the data store.&lt;br /&gt;
&lt;br /&gt;
&lt;div style="clear: both; text-align: center;"&gt;
&lt;a class="big_button" href="http://edorcutt.github.com/SkyKit/watch.html"&gt;View Demo Online&lt;/a&gt; &lt;a class="big_button" href="https://github.com/edorcutt/SkyKit"&gt;Download Source Code&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Enjoy!&lt;img src="http://feeds.feedburner.com/~r/edoism/~4/dTQuZLY-Wdg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://edoism.orcutt.org/feeds/8591799369061398791/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://edoism.orcutt.org/2012/06/crud-in-your-personal-cloud.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/8591799369061398791?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/8591799369061398791?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/edoism/~3/dTQuZLY-Wdg/crud-in-your-personal-cloud.html" title="CRUD in Your Personal Cloud" /><author><name>Ed Orcutt</name><uri>http://www.blogger.com/profile/01072069799127687951</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_tXU2PrpKxHU/SuDD5YwomTI/AAAAAAAAAII/hCrRNUZWOto/S220/edo_transjpg.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-eD7ivA_doX8/T-JXLsNhqBI/AAAAAAAAAZg/a8_AcoFBza8/s72-c/datastore.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://edoism.orcutt.org/2012/06/crud-in-your-personal-cloud.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEQBRnc8eCp7ImA9WhJTEk8.&quot;"><id>tag:blogger.com,1999:blog-1930213017396645687.post-7769575228406617683</id><published>2012-06-20T15:05:00.000-06:00</published><updated>2012-06-20T15:05:57.970-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-06-20T15:05:57.970-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="kynetx" /><category scheme="http://www.blogger.com/atom/ns#" term="time" /><title>Time Travel with KRL</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-ilFhliGexxw/T-I6wnR-VmI/AAAAAAAAAZU/bj6ir5LsVqw/s1600/timetravel.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="180" src="http://2.bp.blogspot.com/-ilFhliGexxw/T-I6wnR-VmI/AAAAAAAAAZU/bj6ir5LsVqw/s320/timetravel.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
Well perhaps not time travel in the science fiction sense, but we will be performing transmogrification between time format specification ... which is time travel in the developer sense (grin). A recent project involved reading an RSS feed and formatting it for display within a web page. Unfortunately the pubDate time format in the RSS feed was not compatible with the &lt;a href="http://developer.kynetx.com/display/docs/time"&gt;KRL time library&lt;/a&gt;. So we developed a KRL function to convert the time format. Perhaps you will find this function useful when you embark on your own time travels.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div style="clear: both;"&gt;
&lt;/div&gt;
The RSS pubDate time string accepted by the KRL function is of the format:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;Wed, 21 Sep 2011 15:02:01 -0700
&lt;/pre&gt;
&lt;br /&gt;
and will be converted to RFC3339 format:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;2011-09-21T15:02:01-07:00
&lt;/pre&gt;
&lt;br /&gt;
We use the function to convert the RSS pubDate, then call the time:strftime() library to generate the needed display format:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;krlDate = rss2krlTime("Wed, 21 Sep 2011 15:02:01 -0700");
strDate = time:strftime(krlDate, "%b %d %Y");
&lt;/pre&gt;
&lt;br /&gt;
Here is the KRL time travel function is all it's glory:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;rss2krlTime = function(pubDate) {
  tarr = pubDate.split(re/ /);
  tzoff = tarr[5].replace(re/\d\d$/, "");
  rfcTime = tarr[3] + "-" + mon2num{[tarr[2]]} + "-" +
            tarr[1] + "T" + tarr[4] + tzoff + ":00";
  rfcTime
};

mon2num = { "Jan": "01", "Feb": "02", "Mar": "03",
            "Apr": "04", "May": "05", "Jun": "06",
            "Jul": "07", "Aug": "08", "Sep": "09",
            "Oct": "10", "Nov": "11", "Dec": "12" };
&lt;/pre&gt;
&lt;br /&gt;
Enjoy!&lt;img src="http://feeds.feedburner.com/~r/edoism/~4/J1F2J-3en5E" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://edoism.orcutt.org/feeds/7769575228406617683/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://edoism.orcutt.org/2012/06/time-travel-with-krl.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/7769575228406617683?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/7769575228406617683?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/edoism/~3/J1F2J-3en5E/time-travel-with-krl.html" title="Time Travel with KRL" /><author><name>Ed Orcutt</name><uri>http://www.blogger.com/profile/01072069799127687951</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_tXU2PrpKxHU/SuDD5YwomTI/AAAAAAAAAII/hCrRNUZWOto/S220/edo_transjpg.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-ilFhliGexxw/T-I6wnR-VmI/AAAAAAAAAZU/bj6ir5LsVqw/s72-c/timetravel.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://edoism.orcutt.org/2012/06/time-travel-with-krl.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEQFRHw-fip7ImA9WhJTEkw.&quot;"><id>tag:blogger.com,1999:blog-1930213017396645687.post-8023848127233674161</id><published>2012-06-20T11:11:00.001-06:00</published><updated>2012-06-20T11:11:55.256-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-06-20T11:11:55.256-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="kynetx" /><category scheme="http://www.blogger.com/atom/ns#" term="webapp" /><title>KRL Quickie: Embedded Site Tags</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-rBMb-LtEq2Q/T-IDvwYBC0I/AAAAAAAAAZI/88yEmQyGaM8/s1600/quickie-mouse.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="211" src="http://1.bp.blogspot.com/-rBMb-LtEq2Q/T-IDvwYBC0I/AAAAAAAAAZI/88yEmQyGaM8/s320/quickie-mouse.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;Your KRL Ruleset can be executed on your web page by simply embedding a site tag. The end user does not need to install a browser extension for your ruleset to run. Of course you will need to be able to modify the files on the website directly in order to embed the site tag.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;To have the ruleset a169x616 excuted on your website, add the following javascript just before the closing body tag:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;&lt;script&gt;
KOBJ_config= {"rids":["a169x616"]};
&lt;/script&gt;
&lt;script src="http://init.kobj.net/js/shared/kobj-static.js"&gt;
&lt;/script&gt;
&lt;/pre&gt;&lt;br /&gt;
Adding this site tag to your web page will execute the production version of the ruleset everytime the web page is visited. If you would rather execute the development version of your ruleset add the following javascript just before the closing body tag:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;&lt;script&gt;
KOBJ_config= {"a169x616:kynetx_app_version":"dev","rids":["a169x616"]};
&lt;/script&gt;
&lt;script src="http://init.kobj.net/js/shared/kobj-static.js"&gt;
&lt;/script&gt;
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/edoism/~4/936o4f-hpXY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://edoism.orcutt.org/feeds/8023848127233674161/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://edoism.orcutt.org/2012/06/krl-quickie-embedded-site-tags.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/8023848127233674161?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/8023848127233674161?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/edoism/~3/936o4f-hpXY/krl-quickie-embedded-site-tags.html" title="KRL Quickie: Embedded Site Tags" /><author><name>Ed Orcutt</name><uri>http://www.blogger.com/profile/01072069799127687951</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_tXU2PrpKxHU/SuDD5YwomTI/AAAAAAAAAII/hCrRNUZWOto/S220/edo_transjpg.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-rBMb-LtEq2Q/T-IDvwYBC0I/AAAAAAAAAZI/88yEmQyGaM8/s72-c/quickie-mouse.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://edoism.orcutt.org/2012/06/krl-quickie-embedded-site-tags.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0UHQ3o-cCp7ImA9WhJTEU8.&quot;"><id>tag:blogger.com,1999:blog-1930213017396645687.post-8567299950762247551</id><published>2012-06-19T10:58:00.000-06:00</published><updated>2012-06-19T11:00:32.458-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-06-19T11:00:32.458-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="kynetx" /><category scheme="http://www.blogger.com/atom/ns#" term="personal cloud" /><category scheme="http://www.blogger.com/atom/ns#" term="events" /><title>Knock on the Sky and Listen for Events</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-h_I08BEzPtw/T9_zfYVfTbI/AAAAAAAAAY4/4pcEJV6s9dk/s1600/tron-jeff-bridges.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="211" src="http://3.bp.blogspot.com/-h_I08BEzPtw/T9_zfYVfTbI/AAAAAAAAAY4/4pcEJV6s9dk/s320/tron-jeff-bridges.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;With the introduction of the Kynetx&amp;nbsp;&lt;a href="http://developer.kynetx.com/display/docs/Sky+Event+API"&gt;Sky Event API&lt;/a&gt;&amp;nbsp;you can now raise events to all the rulesets installed in your Kynetx Personal Cloud without the need to specify a ruleset. Prior to the release of the Sky Event API events had to be raised to a specific ruleset using the Blue API. This feature of the Sky Event API extends the late binding nature of the Kynetx platform. As a developer you do not need to hard code a ruleset ID. For the end-user you have the freedom to choose which ruleset you want to respond to an event when it is raised.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div style="text-align: center;clear:both;"&gt;&lt;a class="big_button" href="http://ktest.heroku.com/a169x611"&gt;View Demo Online&lt;/a&gt; &lt;a class="big_button" href="https://github.com/edorcutt/SkyKit"&gt;Download Source Code&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
For the developer you can still &lt;a href="http://developer.kynetx.com/display/docs/Raising+Explicit+Events+in+the+Postlude"&gt;raise explicit events&lt;/a&gt; with the Sky Event API. Simply add &lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;"_api" = "sky"&lt;/span&gt; to the attributes of your raise explicit statement.&amp;nbsp;Raising an explicit Sky Event in this manner will result in the event being raised to all of the rulesets that are installed in the end-users Personal Cloud. (Aside: At this time the end-users Personal Cloud is that same thing as their Kynetx account.) As a result all installed rulesets with matching select statements will trigger their rules to fire.&lt;br /&gt;
&lt;br /&gt;
The power of the Sky Event API really comes into focus with the ability to raise events into other Personal Clouds! While broadcasting an event within your own Personal Cloud is cool, raising events into other Personal Clouds over event channels is were the magic of the Sky Event API really excels. &lt;a href="http://www.windley.com/archives/2012/03/sending_events_in_parallel.shtml"&gt;Sending events in Parallel&lt;/a&gt; is an excellent example of using the Sky Event API in this manner.&lt;br /&gt;
&lt;br /&gt;
The pattern that I want to share with you today is how to run javascript when raising a Sky Event into a Personal Cloud. The starting point for this pattern is provided by the send_event defaction developed by Phil Windley in &lt;a href="http://www.windley.com/archives/2012/03/sending_events_in_parallel.shtml"&gt;Sending Events in Parallel&lt;/a&gt;. There are two important extensions we will make to send_event. First, in order to return javascript, instead of directives, we must raise our event in the "web" domain. Second, to have the javascript executed we must inject the Sky event signal URL into the DOM. This defaction has been release a part of the public module SkyKit.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;raise_delegate = defaction(type, token) {
  configure using attrs = {}

  dom = "web";
  eid = math:random(9999999);
  arg = attrs.keys().map(function(x) {
          uri:escape(x) + "=" + uri:escape(attrs{x});
       }).join("&amp;amp;");
   esl = "http://cs.kobj.net/sky/event/" +
         "#{token}/#{eid}/#{dom}/#{type}?#{arg}";
   {
     emit &amp;lt;&amp;lt;
       var r = document.createElement("script");
       r.src = esl;
       r.type = "text/javascript";
       r.onload = r.onreadystatechange = KOBJ.url_loaded_callback;
       var body = document.getElementsByTagName("body")[0] ||
       document.getElementsByTagName("frameset")[0];
       body.appendChild(r);
     &amp;gt;&amp;gt;;
  }
};
&lt;/pre&gt;&lt;br /&gt;
To demostrate this pattern we will install a ruleset into a Personal Cloud with a single notify() action:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;rule sayHello {
  select when web sayHello
    notify("Kynetx SkyKit Demo", "Hi, I'm App #1") with sticky = true;
}
&lt;/pre&gt;&lt;br /&gt;
Then create an Event Channel Identifier for the Personal Cloud:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;f6511bf0-9ba1-012f-7a7a-00163e64d091
&lt;/pre&gt;&lt;br /&gt;
And finally we will create a ruleset that use raise_delegate():&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;rule testme {
  select when pageview
    pre {
      eci = "f6511bf0-9ba1-012f-7a7a-00163e64d091";
    }
    {
      notify("Kynetx SkyKit Demo", "Hello, World!") with sticky = true;
      SkyKit:raise_delegate("sayHello", eci);
    }
}
&lt;/pre&gt;&lt;br /&gt;
This will not be installed into the Personal Cloud, but will be exeucted as a bookmarket. You can take it for a test drive on Heroku.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style="text-align: center;"&gt;&lt;a class="big_button" href="http://ktest.heroku.com/a169x611"&gt;View Demo Online&lt;/a&gt; &lt;a class="big_button" href="https://github.com/edorcutt/SkyKit"&gt;Download Source Code&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Enjoy!&lt;img src="http://feeds.feedburner.com/~r/edoism/~4/42BZuWb4z0s" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://edoism.orcutt.org/feeds/8567299950762247551/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://edoism.orcutt.org/2012/06/knock-on-sky-and-listen-for-events.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/8567299950762247551?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/8567299950762247551?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/edoism/~3/42BZuWb4z0s/knock-on-sky-and-listen-for-events.html" title="Knock on the Sky and Listen for Events" /><author><name>Ed Orcutt</name><uri>http://www.blogger.com/profile/01072069799127687951</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_tXU2PrpKxHU/SuDD5YwomTI/AAAAAAAAAII/hCrRNUZWOto/S220/edo_transjpg.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-h_I08BEzPtw/T9_zfYVfTbI/AAAAAAAAAY4/4pcEJV6s9dk/s72-c/tron-jeff-bridges.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://edoism.orcutt.org/2012/06/knock-on-sky-and-listen-for-events.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEcCSHk_fyp7ImA9WhRWEkU.&quot;"><id>tag:blogger.com,1999:blog-1930213017396645687.post-7646254264895999483</id><published>2011-12-30T14:54:00.000-07:00</published><updated>2011-12-30T14:54:29.747-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-30T14:54:29.747-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="kynetx" /><category scheme="http://www.blogger.com/atom/ns#" term="linkedin" /><category scheme="http://www.blogger.com/atom/ns#" term="oauth" /><title>Making LinkedIn API Calls From KRL</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-PmbDBtrceYo/Tv4yLpVS49I/AAAAAAAAAU0/gzahe-Kkj-I/s1600/linkedin-people.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="150" src="http://4.bp.blogspot.com/-PmbDBtrceYo/Tv4yLpVS49I/AAAAAAAAAU0/gzahe-Kkj-I/s200/linkedin-people.jpg" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;
Using the KRL &lt;a href="http://docs.kynetx.com/docs/OAuthModule"&gt;OAuthModule &lt;/a&gt;you can access the LinkedIn API from your Kynetx application. Here's the KRL demo code to perform the authorization.&lt;br /&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div style="clear: both; text-align: center;"&gt;
&lt;a class="big_button" href="http://ktest.heroku.com/a169x484"&gt;View Demo Online&lt;/a&gt; &lt;a class="big_button" href="https://gist.github.com/1541588"&gt;Download Source Code&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/1541588.js?file=LinkedIn-Authorize-OAuthModule.krl.txt"&gt;
&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="text-align: center;"&gt;
&lt;a class="big_button" href="http://ktest.heroku.com/a169x484"&gt;View Demo Online&lt;/a&gt; &lt;a class="big_button" href="https://gist.github.com/1541588"&gt;Download Source Code&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Enjoy!&lt;img src="http://feeds.feedburner.com/~r/edoism/~4/w8QRjI94eII" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://edoism.orcutt.org/feeds/7646254264895999483/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://edoism.orcutt.org/2011/12/making-linkedin-api-calls-from-krl.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/7646254264895999483?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/7646254264895999483?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/edoism/~3/w8QRjI94eII/making-linkedin-api-calls-from-krl.html" title="Making LinkedIn API Calls From KRL" /><author><name>Ed Orcutt</name><uri>http://www.blogger.com/profile/01072069799127687951</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_tXU2PrpKxHU/SuDD5YwomTI/AAAAAAAAAII/hCrRNUZWOto/S220/edo_transjpg.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-PmbDBtrceYo/Tv4yLpVS49I/AAAAAAAAAU0/gzahe-Kkj-I/s72-c/linkedin-people.jpg" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://edoism.orcutt.org/2011/12/making-linkedin-api-calls-from-krl.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkEMQn0-eip7ImA9WhRSGEg.&quot;"><id>tag:blogger.com,1999:blog-1930213017396645687.post-8426449755526248191</id><published>2011-11-20T21:38:00.001-07:00</published><updated>2011-11-20T21:44:43.352-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-20T21:44:43.352-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="kynetx" /><category scheme="http://www.blogger.com/atom/ns#" term="jquery" /><category scheme="http://www.blogger.com/atom/ns#" term="css" /><title>Using Twitter Bootstrap with KRL</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-RFMs0QM2xT0/TsnWL2ns2SI/AAAAAAAAAUk/EKRRWvjTCDU/s1600/twitter-bootstrap.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://4.bp.blogspot.com/-RFMs0QM2xT0/TsnWL2ns2SI/AAAAAAAAAUk/EKRRWvjTCDU/s200/twitter-bootstrap.png" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;Twitter recently released &lt;a href="http://twitter.github.com/bootstrap/"&gt;Bootstrap&lt;/a&gt;, a library of CSS styles and set of javascript plugins to kickstart development of webapps and sites. I have found it to be a real time saver when building prototypes with KRL. Since Bootstrap uses jQuery it was easy to enhance the code to work with Kynetx KRL. I have updated the Bootstrap demo pages to use the embedded version of jQuery in KRL. The updated demo includes links to the updated javascript files that can be used with KRL.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div style="text-align: center;"&gt;&lt;a class="big_button" href="http://www.lobosllc.com/demo/bootstrap/docs/"&gt;View Demo Online&lt;/a&gt; &lt;a class="big_button" href="https://gist.github.com/1381274"&gt;Download Source Code&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
To use the embedded version of jQuery within KRL change the last like in each Bootstrap plugin from:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;}( window.jQuery || window.ender );
&lt;/pre&gt;to&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;}( window.$KOBJ );
&lt;/pre&gt;&lt;br /&gt;
We are 90% done! The remainder of the effort is to move Javascript includes from the HTML file to the KRL webapp with use javascript resource.&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/1381274.js?file=Twitter-Bootstrap.krl.txt"&gt;
&lt;/script&gt;&lt;br /&gt;
&lt;div style="text-align: center;"&gt;&lt;a class="big_button" href="http://www.lobosllc.com/demo/bootstrap/docs/"&gt;View Demo Online&lt;/a&gt; &lt;a class="big_button" href="https://gist.github.com/1381274"&gt;Download Source Code&lt;/a&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/edoism/~4/7QQjHUj62fw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://edoism.orcutt.org/feeds/8426449755526248191/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://edoism.orcutt.org/2011/11/using-twitter-bootstrap-with-krl.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/8426449755526248191?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/8426449755526248191?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/edoism/~3/7QQjHUj62fw/using-twitter-bootstrap-with-krl.html" title="Using Twitter Bootstrap with KRL" /><author><name>Ed Orcutt</name><uri>http://www.blogger.com/profile/01072069799127687951</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_tXU2PrpKxHU/SuDD5YwomTI/AAAAAAAAAII/hCrRNUZWOto/S220/edo_transjpg.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-RFMs0QM2xT0/TsnWL2ns2SI/AAAAAAAAAUk/EKRRWvjTCDU/s72-c/twitter-bootstrap.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://edoism.orcutt.org/2011/11/using-twitter-bootstrap-with-krl.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEIDQng5fCp7ImA9WhdaFk0.&quot;"><id>tag:blogger.com,1999:blog-1930213017396645687.post-2555855760959979376</id><published>2011-10-25T23:22:00.000-06:00</published><updated>2011-10-25T23:22:53.624-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-25T23:22:53.624-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="defaction" /><category scheme="http://www.blogger.com/atom/ns#" term="kynetx" /><category scheme="http://www.blogger.com/atom/ns#" term="css" /><title>CSS Inception with Kynetx</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-Dsb6t-9Myoc/TqeYX4JIEjI/AAAAAAAAAUI/NfpeRgrFPgc/s1600/CSS_Inception_300x250.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="166" src="http://3.bp.blogspot.com/-Dsb6t-9Myoc/TqeYX4JIEjI/AAAAAAAAAUI/NfpeRgrFPgc/s200/CSS_Inception_300x250.png" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;
While developing an administrative interface for a web application I only wanted to load the CSS stylesheet for the administrative view when it was needed. KRL provides the ability to define &lt;a href="http://docs.kynetx.com/docs/Global#CSS"&gt;CSS in the global section&lt;/a&gt; and &lt;a href="http://docs.kynetx.com/docs/Use_resource"&gt;load external CSS files&lt;/a&gt;. However, both methods insert the CSS into the page every time the Ruleset is evaluated. I really did not want to load hundreds of lines of useless CSS into every page.&lt;br /&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div style="text-align: center;"&gt;
&lt;a class="big_button" href="http://ktest.heroku.com/a169x448"&gt;View Demo Online&lt;/a&gt; &lt;a class="big_button" href="https://gist.github.com/1315433"&gt;Download Source Code&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
My solution was to harvest the load external stylesheet code from the KRL runtime and wrap it in a &lt;a href="http://docs.kynetx.com/docs/Defaction"&gt;defaction&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;loadStylesheet = defaction(cssURL) {
  loadCode = &amp;lt;&amp;lt;
    var head=document.getElementsByTagName('head')[0];
    var new_style_sheet=document.createElement("link");
    new_style_sheet.href="#{cssURL}";
    new_style_sheet.rel="stylesheet";
    new_style_sheet.type="text/css";
    head.appendChild(new_style_sheet);
  &amp;gt;&amp;gt;;
  emit &amp;lt;&amp;lt; eval(loadCode);  &amp;gt;&amp;gt;;
};
&lt;/pre&gt;
&lt;br /&gt;
Now I can load external stylesheets programatically:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;rule inject_css {
  select when click "#ignite"
  {
    loadStylesheet("http://assets.lobosllc.com/css/inception.css");
  }
}
&lt;/pre&gt;
&lt;br /&gt;
&lt;div style="text-align: center;"&gt;
&lt;a class="big_button" href="http://ktest.heroku.com/a169x448"&gt;View Demo Online&lt;/a&gt; &lt;a class="big_button" href="https://gist.github.com/1315433"&gt;Download Source Code&lt;/a&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/edoism/~4/KSKPuswClLc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://edoism.orcutt.org/feeds/2555855760959979376/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://edoism.orcutt.org/2011/10/css-inception-with-kynetx.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/2555855760959979376?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/2555855760959979376?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/edoism/~3/KSKPuswClLc/css-inception-with-kynetx.html" title="CSS Inception with Kynetx" /><author><name>Ed Orcutt</name><uri>http://www.blogger.com/profile/01072069799127687951</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_tXU2PrpKxHU/SuDD5YwomTI/AAAAAAAAAII/hCrRNUZWOto/S220/edo_transjpg.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-Dsb6t-9Myoc/TqeYX4JIEjI/AAAAAAAAAUI/NfpeRgrFPgc/s72-c/CSS_Inception_300x250.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://edoism.orcutt.org/2011/10/css-inception-with-kynetx.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUAGRn8-eyp7ImA9WhdbE0o.&quot;"><id>tag:blogger.com,1999:blog-1930213017396645687.post-6280183698947686146</id><published>2011-10-10T16:29:00.001-06:00</published><updated>2011-10-11T16:55:27.153-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-11T16:55:27.153-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="crud" /><category scheme="http://www.blogger.com/atom/ns#" term="kynetx" /><category scheme="http://www.blogger.com/atom/ns#" term="safari" /><title>KRL Safari: KRUD Redux - Kynetx CRUD with Persistent Variables</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-M78XHP61V9c/TRDz9tCmcpI/AAAAAAAAAPk/b2tHMk1vjHc/s1600/krl_safari_border.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="102" src="http://4.bp.blogspot.com/-M78XHP61V9c/TRDz9tCmcpI/AAAAAAAAAPk/b2tHMk1vjHc/s200/krl_safari_border.png" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;
Recent updates to the Kynetx platform related to &lt;a href="http://docs.kynetx.com/docs/Literals#"&gt;Hash expressions&lt;/a&gt; has given me the opportunity to revisit &lt;a href="http://edoism.orcutt.org/2011/02/krl-safari-krud-kynetx-crud-with.html"&gt;my previous post&lt;/a&gt;. If your WebApp has modest requirements for storage of data it is worthwhile considering the use of &lt;a href="http://docs.kynetx.com/docs/Persistent_Variables"&gt;Persistent Variables&lt;/a&gt;. To demonstrate the salient principles of using persistent variables as a datastore, a simple Kynetx WebApp addressbook is provided.&lt;br /&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div style="text-align: center;"&gt;
&lt;a class="big_button" href="http://ktest.heroku.com/a169x426"&gt;View Demo Online&lt;/a&gt; &lt;a class="big_button" href="https://gist.github.com/1276723"&gt;Download Source Code&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
The addressbook application stores the name, email and phone number of each person. The addressbook data is stored in a single persistant variable as key/value pairs. With the persons name used as the key:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;"SomeName" : {
    "Name"  : "SomeName",
    "Email" : "SomeEmail",
    "Phone" : "SomePhone"
}
&lt;/pre&gt;
&lt;br /&gt;
Since there is a lot of to wade through, so let me point out that parts specifically related to reading, writing and remove entries in the addressbook. In order to read all of the entries in the addressbook the following ruleset is used:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;foreach ent:KRUDaddresss.keys() setting (addressKey)
pre {
  email = ent:KRUDaddresss{[addressKey, "Email"]};
  phone = ent:KRUDaddresss{[addressKey, "Phone"]};
  addressRow = &amp;amp;lt;&amp;amp;lt;
      
          #{addressKey}
          #{email}
          #{phone}
          &lt;a class="KRUDaction" href="javascript:void(0);"&gt;Remove&lt;/a&gt;
      
  &amp;gt;&amp;gt;;
}
{
  append('#panelAddressList .DataTable tbody', addressRow);
}
&lt;/pre&gt;
&lt;br /&gt;
New entries for the addressbook are entered via a standard HTML form. With a &lt;a href="http://docs.kynetx.com/docs/Watch"&gt;watch()&lt;/a&gt; placed on the submit the following rule captures the entry from the form, builds a new entry and adds it to the persistent variable:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;select when submit "#formAddressAdd"
pre {
  formName  = event:param("formName");
  formEmail = event:param("formEmail");
  formPhone = event:param("formPhone");
  formHash = {
      "Name"  : formName,
      "Email" : formEmail,
      "Phone" : formPhone
  };

  KRUDaddresss = ent:KRUDaddresss || {};
}
{ noop(); }
fired {
  set ent:KRUDaddresss{[formName]} formHash;
}
&lt;/pre&gt;
&lt;br /&gt;
Entries are removed from the addressbook by calling the following rule with an entries name as the event parameter:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;pre {
  keyName = event:param("keyName");
}
{ noop(); }
fired {
  clear ent:KRUDaddresss{keyName};
}
&lt;/pre&gt;
&lt;br /&gt;
You can play with the &lt;a href="http://ktest.heroku.com/a169x426"&gt;online demo&lt;/a&gt; to see the end results. And you can &lt;a href="https://gist.github.com/1276723"&gt;get the source code&lt;/a&gt; for the whole WebApp on GitHub. Heads up, there's a lot of code in the WebApp related to the GUI, that's why I wanted to call out the salient CRUD elements above. Enjoy!&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;11 Oct 2011:&lt;/b&gt; Revised code for adding new addressbook entries to use the new expression syntax for &lt;a href="http://docs.kynetx.com/docs/Persistent_Variables#Persistent_Hashes"&gt;Persistent Hashes&lt;/a&gt;. When these new expressions are used you avoid loading, binding and transferring the entire hash.&lt;br /&gt;
&lt;br /&gt;
&lt;div style="text-align: center;"&gt;
&lt;a class="big_button" href="http://ktest.heroku.com/a169x426"&gt;View Demo Online&lt;/a&gt; &lt;a class="big_button" href="https://gist.github.com/1276723"&gt;Download Source Code&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/edoism/~4/A7qwnP_RNfc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://edoism.orcutt.org/feeds/6280183698947686146/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://edoism.orcutt.org/2011/10/krl-safari-krud-redux-kynetx-crud-with.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/6280183698947686146?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/6280183698947686146?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/edoism/~3/A7qwnP_RNfc/krl-safari-krud-redux-kynetx-crud-with.html" title="KRL Safari: KRUD Redux - Kynetx CRUD with Persistent Variables" /><author><name>Ed Orcutt</name><uri>http://www.blogger.com/profile/01072069799127687951</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_tXU2PrpKxHU/SuDD5YwomTI/AAAAAAAAAII/hCrRNUZWOto/S220/edo_transjpg.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-M78XHP61V9c/TRDz9tCmcpI/AAAAAAAAAPk/b2tHMk1vjHc/s72-c/krl_safari_border.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://edoism.orcutt.org/2011/10/krl-safari-krud-redux-kynetx-crud-with.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkEDQ3w_cCp7ImA9WhdbEk0.&quot;"><id>tag:blogger.com,1999:blog-1930213017396645687.post-8428476810539094109</id><published>2011-10-09T19:04:00.000-06:00</published><updated>2011-10-09T19:04:32.248-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-09T19:04:32.248-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="statcounter" /><category scheme="http://www.blogger.com/atom/ns#" term="errorstack" /><category scheme="http://www.blogger.com/atom/ns#" term="kynetx" /><category scheme="http://www.blogger.com/atom/ns#" term="webapp" /><title>KRL WebApp Template and Cheatsheet</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-M78XHP61V9c/TRDz9tCmcpI/AAAAAAAAAPk/b2tHMk1vjHc/s1600/krl_safari_border.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="164" src="http://4.bp.blogspot.com/-M78XHP61V9c/TRDz9tCmcpI/AAAAAAAAAPk/b2tHMk1vjHc/s320/krl_safari_border.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
Let me share with you the Kynetx KRL template that I use as a starting point for all of the web applications that I develop. The template not only gives me a solid starting point for each Kynetx WebApp, but contains samples of KRL syntax and contructs, as well as reminders of componets to be added prior to release of the WebApp. Before releasing a Kynetx WebApp there are two components that I always include. First, a method for collecting any errors that may be encountered while the WebApp is being used. Second, a method of collecting some basic usage statistics.&lt;br /&gt;
&lt;a href="http://www.errorstack.com/"&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div style="text-align: center;"&gt;
&lt;a class="big_button" href="http://ktest.heroku.com/a169x425"&gt;View Demo Online&lt;/a&gt; &lt;a class="big_button" href="https://gist.github.com/1274226"&gt;Download Source Code&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;a href="http://www.errorstack.com/"&gt;ErrorStack &lt;/a&gt;provides a excellent cloud based service to collect errors for WebApps. Since a Kynetx WebApp will be running in the browser of your end-user it will be almost impossible to find out when an error occurs. That's where ErrorStack comes to the rescue! By simply including an ErrorStack application key in your Kynetx WebApp errors will be collected via the ErrorStack service. Absolutely brilliant! As an added bonus &lt;a href="http://twitter.com/windley"&gt;Phil Windley&lt;/a&gt;&amp;nbsp;provides an &lt;a href="http://www.windley.com/archives/2011/05/error_handling_in_krl.shtml"&gt;error handling module&lt;/a&gt; that can be used to send all user and system level errors related to your WebApp to ErrorStack.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://statcounter.com/"&gt;StatCounter &lt;/a&gt;provides user analytics for your WebApp. Just like you would not launch a website without including analytics, you shouldn't release a WebApp without including analytics. In this template an invisible image is inserted when the WebApp gets run. This will provide you with the basic information about the number of users, which browser they are using, etc. I've made the StatCounter project analytics for this template &lt;a href="http://statcounter.com/project/standard/stats.php?project_id=7288818&amp;amp;guest=1"&gt;publicly available&lt;/a&gt; so that you can appreicate the value of this service.&lt;br /&gt;
&lt;br /&gt;
The rest of this template contains KRL constructs which I use frequently. But alas I often mistype the exact syntax, so this gives me a single point of reference so that I don't have to search through old WebApps for a sample to cut &amp;amp; paste. There are samples for using the integrated Kynetx jQuery UI libary, including external javascript and CSS resources, raising explicit events, and web events.&lt;br /&gt;
&lt;br /&gt;
Last, but certainly not least there is a link to test the development version of the WebApp using the brilliant &lt;a href="http://ktest.heroku.com/"&gt;Ktest &lt;/a&gt;service offered by &lt;a href="http://twitter.com/rsbohn"&gt;Randall Bohn&lt;/a&gt;. As a matter of fact you can &lt;a href="http://ktest.heroku.com/a169x425"&gt;demo this WebApp&lt;/a&gt; template using Ktest. Here is a screenshot:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-BDx-frxr52w/TpIR48O_FdI/AAAAAAAAAT8/hCC49W_eX88/s1600/screenshot_krl_template.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-BDx-frxr52w/TpIR48O_FdI/AAAAAAAAAT8/hCC49W_eX88/s1600/screenshot_krl_template.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/1274226.js?file=KRL_WebApp_Template.krl.txt"&gt;
&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style="text-align: center;"&gt;
&lt;a class="big_button" href="http://ktest.heroku.com/a169x425"&gt;View Demo Online&lt;/a&gt; &lt;a class="big_button" href="https://gist.github.com/1274226"&gt;Download Source Code&lt;/a&gt;&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/edoism/~4/BRQvlDVV7A4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://edoism.orcutt.org/feeds/8428476810539094109/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://edoism.orcutt.org/2011/10/krl-webapp-template-and-cheatsheet.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/8428476810539094109?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/8428476810539094109?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/edoism/~3/BRQvlDVV7A4/krl-webapp-template-and-cheatsheet.html" title="KRL WebApp Template and Cheatsheet" /><author><name>Ed Orcutt</name><uri>http://www.blogger.com/profile/01072069799127687951</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_tXU2PrpKxHU/SuDD5YwomTI/AAAAAAAAAII/hCrRNUZWOto/S220/edo_transjpg.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-M78XHP61V9c/TRDz9tCmcpI/AAAAAAAAAPk/b2tHMk1vjHc/s72-c/krl_safari_border.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://edoism.orcutt.org/2011/10/krl-webapp-template-and-cheatsheet.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUABSXY9eSp7ImA9WhdXGUw.&quot;"><id>tag:blogger.com,1999:blog-1930213017396645687.post-4342015566809263133</id><published>2011-09-01T15:49:00.000-06:00</published><updated>2011-09-01T15:49:18.861-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-01T15:49:18.861-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="kynetx" /><category scheme="http://www.blogger.com/atom/ns#" term="events" /><category scheme="http://www.blogger.com/atom/ns#" term="push" /><title>KronHooks: An Event Scheduling Service for Kynetx Applications</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-TLE6_-kG170/Tl_4VjxTrGI/AAAAAAAAASo/-9s8D4A40wE/s1600/kronhooks.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="172" src="http://2.bp.blogspot.com/-TLE6_-kG170/Tl_4VjxTrGI/AAAAAAAAASo/-9s8D4A40wE/s200/kronhooks.png" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;a href="http://kronhooks.appspot.com/"&gt;KronHooks &lt;/a&gt;is a time-based event scheduler for Kynetx applications. The Kronhooks service enables Kynetx developers to raise events into the &lt;a href="http://docs.kynetx.com/docs/Kynetx_Network_Service_API"&gt;Kynetx Network Services API&lt;/a&gt; at regular intervals of 5, 10, 30 or 60 minutes.&lt;br /&gt;
&lt;br /&gt;
The strength of the KRL event based architecture enables a developer to extent the platform to interact with many other systems. KRL already has built-in libraries for interacting with &lt;a href="http://docs.kynetx.com/docs/Facebook"&gt;Facebook&lt;/a&gt;, &lt;a href="http://docs.kynetx.com/docs/Twitter"&gt;Twitter&lt;/a&gt;, &lt;a href="http://docs.kynetx.com/docs/Amazon"&gt;Amazon &lt;/a&gt;and many others. In the past I have developed KRL Modules to pull data from &lt;a href="http://apps.kynetx.com/modules/a169x316"&gt;Qwerly&lt;/a&gt;, &lt;a href="http://apps.kynetx.com/modules/a169x319"&gt;PeerIndex &lt;/a&gt;and &lt;a href="http://apps.kynetx.com/modules/a169x322"&gt;Empire Avenue&lt;/a&gt;, but the development of the KronHooks service takes a different perspective.&lt;br /&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;The KronHooks service was developed to &lt;b&gt;push &lt;/b&gt;events into a Kynetx Ruleset. In essence it is a external service which can be used by a Kynetx developer to raise events into their application on a regularly scheduled basis. In order to receive the events from the KronHooks service a developer only needs to add a &lt;a href="http://docs.kynetx.com/docs/Select"&gt;select statement&lt;/a&gt; to a rule:&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;select when kronhook igvmgjf&lt;/pre&gt;
Perhaps a simple example will help to clarify. Let's write a Kynetx application that will send out a tweet every 5 minutes. Not a practical application in the real world, unless you want to be unfollowed by everyone. To build the demo application we will configure KronHooks to raise an event into your Kynetx Ruleset every 5 minutes. The Kynetx rule receiving the event will publish a tweet with the current time.&lt;br /&gt;
&lt;br /&gt;
On the &lt;a href="http://kronhooks.appspot.com/"&gt;KronHooks &lt;/a&gt;site select an interval of 5 minutes and enter the RID of your Kynex application:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-opYBn_EhGeQ/Tl_1caTWwOI/AAAAAAAAASg/1aTl9CvGZKI/s1600/screenshot-add-kronhook.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="72" src="http://2.bp.blogspot.com/-opYBn_EhGeQ/Tl_1caTWwOI/AAAAAAAAASg/1aTl9CvGZKI/s320/screenshot-add-kronhook.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Click the &lt;i&gt;Add &lt;/i&gt;button and your freshly minted kronhook will be added to the service. You will note that KronHooks has generated an event name for you new addition, in this example the event name is &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;b&gt;igvmgjf&lt;/b&gt;&lt;/span&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-B5NmnDnbBRM/Tl_1nGPqTnI/AAAAAAAAASk/E5CLH-3Nekg/s1600/screenshot-your-kronhook.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="78" src="http://1.bp.blogspot.com/-B5NmnDnbBRM/Tl_1nGPqTnI/AAAAAAAAASk/E5CLH-3Nekg/s320/screenshot-your-kronhook.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
KronHooks has already begun to raise events into your Kynetx Ruleset with RID a169x397! So let's add the necessary select statement:&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;select when kronhook igvmgjf&lt;/pre&gt;
Here is the KRL source for the whole rule:
&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;rule MyKronHook {
  select when kronhook igvmgjf
  pre {
    hookTime = event:param("hook.time");
    msg = "KronHook raised an event at #{hookTime}";
  }
  {
    twitter:update(msg);
  }
}
&lt;/pre&gt;
Every 5 minutes when KronHooks raises the event into your Kynetx Ruleset, the select statement will cause the rule to fire. In the prelude of the rule the parameter hook.time provided by KronHooks will be retrieved and used to create a status update on Twitter.&lt;br /&gt;
&lt;br /&gt;
Warning: Technical deep dive ahead! The KronHooks service raises events based on the specification given in the &lt;a href="http://docs.kynetx.com/docs/Kynetx_Network_Service_API"&gt;Kynetx Network Service API&lt;/a&gt;. Thus, a event is raised by performing a POST to:&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;http://cs.kobj.net/blue/event/kronhook/event_name/rid&lt;/pre&gt;
More specifically for this demo the URL was&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;http://cs.kobj.net/blue/event/kronhook/igvmgjf/a169x397&lt;/pre&gt;
Please consider the KronHooks service a beta. With your feedback we can mature and stabilize it to become a useful production service.&lt;br /&gt;
&lt;br /&gt;
The KRL source for the demo application is &lt;a href="https://gist.github.com/1187231"&gt;available as a gist&lt;/a&gt; and the source for KronHooks is available as a public repository on GitHub &lt;a href="https://github.com/edorcutt/KronHooks"&gt;edoructt/KronHooks&lt;/a&gt;.&lt;img src="http://feeds.feedburner.com/~r/edoism/~4/J91IisC4BxI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://edoism.orcutt.org/feeds/4342015566809263133/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://edoism.orcutt.org/2011/09/kronhooks-event-scheduling-service-for.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/4342015566809263133?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/4342015566809263133?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/edoism/~3/J91IisC4BxI/kronhooks-event-scheduling-service-for.html" title="KronHooks: An Event Scheduling Service for Kynetx Applications" /><author><name>Ed Orcutt</name><uri>http://www.blogger.com/profile/01072069799127687951</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_tXU2PrpKxHU/SuDD5YwomTI/AAAAAAAAAII/hCrRNUZWOto/S220/edo_transjpg.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-TLE6_-kG170/Tl_4VjxTrGI/AAAAAAAAASo/-9s8D4A40wE/s72-c/kronhooks.png" height="72" width="72" /><thr:total>0</thr:total><georss:featurename>Highland, UT, USA</georss:featurename><georss:point>40.42156 -111.788755</georss:point><georss:box>40.3732065 -111.867719 40.4699135 -111.709791</georss:box><feedburner:origLink>http://edoism.orcutt.org/2011/09/kronhooks-event-scheduling-service-for.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkECRnw9cSp7ImA9WhdXF08.&quot;"><id>tag:blogger.com,1999:blog-1930213017396645687.post-8375917051358331156</id><published>2011-08-30T12:24:00.000-06:00</published><updated>2011-08-30T12:24:27.269-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-30T12:24:27.269-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="kynetx" /><title>KRLCode: Kynetx Ruleset Source Code Search</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-L8T4Bonor_E/Tl0djSzemSI/AAAAAAAAASY/vlTXh1hxvKc/s1600/KRL-Code-Logo.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="94" src="http://1.bp.blogspot.com/-L8T4Bonor_E/Tl0djSzemSI/AAAAAAAAASY/vlTXh1hxvKc/s320/KRL-Code-Logo.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;The goal of &lt;a href="http://krlcode.com/"&gt;KRLCode &lt;/a&gt;is to provide a simple interface to search Kynetx KRL Ruleset source code. While many good snippets of KRL have been published in blogs, posted on StackOverflow and released as Gist, it can difficult to find the one you need. I've begun to collect them in a &lt;a href="https://github.com/edorcutt/KRL-Code"&gt;GiHub repository&lt;/a&gt; and provide a simple interface to search the collected works of Phil Windley, Sam Curren, Mike Grace, Alex Olson, Steve Nay, Randall Bohn, Aaron Frost and myself.&lt;br /&gt;
Your contribution to the KRL Code repository would be most appreciated. Just send a tweet to &lt;a href="http://twitter.com/KRLCode"&gt;@KRLCode&lt;/a&gt; with the URL of your KRL Ruleset.&lt;img src="http://feeds.feedburner.com/~r/edoism/~4/JtgmG-Makrs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://edoism.orcutt.org/feeds/8375917051358331156/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://edoism.orcutt.org/2011/08/krlcode-kynetx-ruleset-source-code.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/8375917051358331156?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/8375917051358331156?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/edoism/~3/JtgmG-Makrs/krlcode-kynetx-ruleset-source-code.html" title="KRLCode: Kynetx Ruleset Source Code Search" /><author><name>Ed Orcutt</name><uri>http://www.blogger.com/profile/01072069799127687951</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_tXU2PrpKxHU/SuDD5YwomTI/AAAAAAAAAII/hCrRNUZWOto/S220/edo_transjpg.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-L8T4Bonor_E/Tl0djSzemSI/AAAAAAAAASY/vlTXh1hxvKc/s72-c/KRL-Code-Logo.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://edoism.orcutt.org/2011/08/krlcode-kynetx-ruleset-source-code.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEEGRHc6fip7ImA9WhdXFk4.&quot;"><id>tag:blogger.com,1999:blog-1930213017396645687.post-2316032810052321463</id><published>2011-08-29T09:43:00.000-06:00</published><updated>2011-08-29T09:43:45.916-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-29T09:43:45.916-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="kynetx" /><category scheme="http://www.blogger.com/atom/ns#" term="twitter" /><category scheme="http://www.blogger.com/atom/ns#" term="oauth" /><title>Sexy Twitter Authorization for KRL</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-w4v26Qp5_Ts/TKo_taGORyI/AAAAAAAAAOI/5xTK5fzwYWo/s1600/theme.logo.eb3fcf.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-w4v26Qp5_Ts/TKo_taGORyI/AAAAAAAAAOI/5xTK5fzwYWo/s1600/theme.logo.eb3fcf.png" /&gt;&lt;/a&gt;&lt;/div&gt;A new KRL library has been released that enables you to build a sexy Twitter authorization. The &lt;a href="http://docs.kynetx.com/docs/OAuthModule"&gt;OAuthModule &lt;/a&gt;provides a generic process for making OAuth 1.0A authentication and protected resource requests. This means that you can now make your own authorization request to Twitter, and many other services.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
Using &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;oauthmodule:get_auth_url&lt;/span&gt; function you get a URL that can be used to start the OAuth authorization dance. While you could simple perform the action within the current browser window, it is so much nicer to pop open a new window. So what we've done is attach a click event to the image that was added to the page.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-3s8w7AqONrI/TluyctyidlI/AAAAAAAAASQ/x3lIl2DTU7g/s1600/screenshot-twitter-oauthmodule-signin-button.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="67" src="http://2.bp.blogspot.com/-3s8w7AqONrI/TluyctyidlI/AAAAAAAAASQ/x3lIl2DTU7g/s320/screenshot-twitter-oauthmodule-signin-button.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;We the images is clicked a new browser window is opened using the URL that was returned from oauthmodule:get_auth_url. Then we have a setInterval timer which watches for the window to close.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-BlySdLNPLHQ/TluyiddiApI/AAAAAAAAASU/Cm35kGeHxfM/s1600/screenshot-twitter-oauthmodule-signin-popup.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="183" src="http://1.bp.blogspot.com/-BlySdLNPLHQ/TluyiddiApI/AAAAAAAAASU/Cm35kGeHxfM/s320/screenshot-twitter-oauthmodule-signin-popup.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Here is the KRL source code&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/1178579.js?file=Twitter-Authorize-OAuthModule.krl.txt"&gt;
&lt;/script&gt;&lt;img src="http://feeds.feedburner.com/~r/edoism/~4/XFNXAX3ZZig" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://edoism.orcutt.org/feeds/2316032810052321463/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://edoism.orcutt.org/2011/08/sexy-twitter-authorization-for-krl.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/2316032810052321463?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/2316032810052321463?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/edoism/~3/XFNXAX3ZZig/sexy-twitter-authorization-for-krl.html" title="Sexy Twitter Authorization for KRL" /><author><name>Ed Orcutt</name><uri>http://www.blogger.com/profile/01072069799127687951</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_tXU2PrpKxHU/SuDD5YwomTI/AAAAAAAAAII/hCrRNUZWOto/S220/edo_transjpg.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-w4v26Qp5_Ts/TKo_taGORyI/AAAAAAAAAOI/5xTK5fzwYWo/s72-c/theme.logo.eb3fcf.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://edoism.orcutt.org/2011/08/sexy-twitter-authorization-for-krl.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkQHRns9cSp7ImA9Wx9VGEk.&quot;"><id>tag:blogger.com,1999:blog-1930213017396645687.post-907152792230902650</id><published>2011-02-04T10:25:00.000-07:00</published><updated>2011-02-04T10:25:37.569-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-04T10:25:37.569-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="crud" /><category scheme="http://www.blogger.com/atom/ns#" term="kynetx" /><category scheme="http://www.blogger.com/atom/ns#" term="safari" /><title>KRL Safari: KRUD - Kynetx CRUD with Persistant Variables</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_tXU2PrpKxHU/TRDz9tCmcpI/AAAAAAAAAPk/C2jMx5O-0IY/s1600/krl_safari_border.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="164" src="http://3.bp.blogspot.com/_tXU2PrpKxHU/TRDz9tCmcpI/AAAAAAAAAPk/C2jMx5O-0IY/s320/krl_safari_border.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;Got KRUD? In this KRL safari we will be using persistance variables as a database. While most web developers have written code to access a database, most Kynetx applications retrieve their data via RESTful web services. But there are times when a persistant data store is needed. Building a one off web service to host the data is certainly an option, but if the storage needs are moderate you can simply use a persistant variable. After all 2 million bytes of data can be stored in a persistant variable!&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
To keep the focus on the mechanics a simple data structure is used to demonstrate KRL CRUD ... an array of strings which will be used to implement a tag cloud. The &lt;a href="http://www.lobosllc.com/demo/krud/"&gt;demo &lt;/a&gt;provides a web interface to see all of the strings in the tag cloud, add new tags and delete tags. To permit the &lt;a href="http://www.lobosllc.com/demo/krud/"&gt;demo &lt;/a&gt;to be accessible to a broad audience, it has been distributed using a &lt;a href="http://docs.kynetx.com/docs/Distribute"&gt;site tag&lt;/a&gt;. Just &lt;a href="http://www.lobosllc.com/demo/krud/"&gt;visit the demo page &lt;/a&gt;to see all of the current tags which have been entered by all who have used the application. You can add a new tag by entering text into the form, then click the Add button. To delete a existing tag simply click on the text of the tag.&lt;br /&gt;
&lt;br /&gt;
While the KRL code has comments thoughout, it should be emphasized that application persistent variables accessed in the rule &lt;a href="http://docs.kynetx.com/docs/Prelude"&gt;prelude&lt;/a&gt;:&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;TagCloud = app:TagCloud;&lt;/pre&gt;And the updated persistent variable are saved in the &lt;a href="http://docs.kynetx.com/docs/Postlude"&gt;postlude&lt;/a&gt;:&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;set app:TagCloud TagCloud;&lt;/pre&gt;Adding a new value to the persistent variable is performed using the &lt;a href="http://docs.kynetx.com/docs/Sets#Union_.28A_.E2.88.AA_B.29"&gt;union operator&lt;/a&gt;:&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;newCloud = TagCloud.union(cleanTag);&lt;/pre&gt;Removing a value from the persistent variable is done using the &lt;a href="http://docs.kynetx.com/docs/Sets#difference_.28A_.5C_B.29"&gt;difference operator&lt;/a&gt;:&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;newCloud = TagCloud.difference(tagText);&lt;/pre&gt;To see the implementation using a complex data structure take a look at Kynetx App A Day 28 &lt;a href="http://kynetxappaday.wordpress.com/2010/12/29/day-28-updating-users-list-when-user-joins-app/"&gt;Updating User's List When User Joins App&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/810516.js?file=KRUD"&gt;
&lt;/script&gt;&lt;br /&gt;
Hey! Where's the U in KRUD? Multiple choice response:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Left as an exercise for the reader&lt;/li&gt;
&lt;li&gt;Updated was not needed for demo&lt;/li&gt;
&lt;li&gt;I'm lazy :)&lt;/li&gt;
&lt;/ol&gt;Enjoy!&lt;img src="http://feeds.feedburner.com/~r/edoism/~4/9lFj6r1BpFQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://edoism.orcutt.org/feeds/907152792230902650/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://edoism.orcutt.org/2011/02/krl-safari-krud-kynetx-crud-with.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/907152792230902650?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/907152792230902650?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/edoism/~3/9lFj6r1BpFQ/krl-safari-krud-kynetx-crud-with.html" title="KRL Safari: KRUD - Kynetx CRUD with Persistant Variables" /><author><name>Ed Orcutt</name><uri>http://www.blogger.com/profile/01072069799127687951</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_tXU2PrpKxHU/SuDD5YwomTI/AAAAAAAAAII/hCrRNUZWOto/S220/edo_transjpg.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_tXU2PrpKxHU/TRDz9tCmcpI/AAAAAAAAAPk/C2jMx5O-0IY/s72-c/krl_safari_border.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://edoism.orcutt.org/2011/02/krl-safari-krud-kynetx-crud-with.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkYASH45fSp7ImA9Wx9QEE4.&quot;"><id>tag:blogger.com,1999:blog-1930213017396645687.post-1609978044949296180</id><published>2010-12-22T10:15:00.000-07:00</published><updated>2010-12-22T10:15:49.025-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-22T10:15:49.025-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="kynetx" /><category scheme="http://www.blogger.com/atom/ns#" term="safari" /><title>KRL Scope Safari: Application Variables</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_tXU2PrpKxHU/TRDz9tCmcpI/AAAAAAAAAPk/C2jMx5O-0IY/s1600/krl_safari_border.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="164" src="http://3.bp.blogspot.com/_tXU2PrpKxHU/TRDz9tCmcpI/AAAAAAAAAPk/C2jMx5O-0IY/s320/krl_safari_border.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;The safari continues with a tour of &lt;a href="http://docs.kynetx.com/docs/Persistent_Variables"&gt;persistent application variables&lt;/a&gt;. This is the second article in the series to chronicle the investigation of scope and extent of persistent variables in the Kynetx KRL platform. In the &lt;a href="http://edoism.orcutt.org/2010/12/krl-scope-safari-entity-variables.html"&gt;first KRL Scope Safari &lt;/a&gt;we explored persistent Entity Variables. Application variables in KRL are used to record persistent data within a &lt;a href="http://docs.kynetx.com/docs/Ruleset"&gt;ruleset&lt;/a&gt;. The value of an application variable is retained between execution of the ruleset. So far application variables seem to be the same as entity variables. The difference is that application variables are shared across all sessions of the ruleset. They are not restrained to a single browser session. A truly &lt;i&gt;global&lt;/i&gt; application variable!&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
Note: For another perspective on KRL persistent variables I would highly recommend the &lt;i&gt;Kynetx App A Day &lt;/i&gt;article &lt;a href="http://kynetxappaday.wordpress.com/2010/12/18/day-12-persistant-variables/"&gt;Day 12 - Persistent Variables&lt;/a&gt; by &lt;a href="http://geek.michaelgrace.org/"&gt;Michael Grace&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
We need some &lt;a href="https://gist.github.com/751134"&gt;KRL code for this safari&lt;/a&gt;! Starting with the KRL from the last safari we replace all occurrences of &lt;i&gt;ent:safari_entity &lt;/i&gt;with &lt;i&gt;app:safari_app&lt;/i&gt;. There are three rules in the demo application. The first rule, &lt;i&gt;Safari_Initialize &lt;/i&gt;displays a growl notification which includes a title, the current value of the application variable and two html forms which permit the application variable to mutated and cleared. The second rule, &lt;i&gt;Safari_Respond_Submit &lt;/i&gt;processes the form submission to mutate (change) the application variable. The last rule, &lt;i&gt;Safari_Respond_Clear &lt;/i&gt;processes the form submission to clear the application variable.&lt;br /&gt;
&lt;br /&gt;
The value of the application variable can be accessed inside prelude expressions. In the prelude section of &lt;i&gt;Safari_Initalize &lt;/i&gt;the value of safari_app is accessed. Application variables are mutated in the postlude section of a rule. In the postlude section of &lt;i&gt;Safari_Respond_Submit &lt;/i&gt;the value of the application variable safari_app is set to the value of newValue. And in the postlude section of &lt;i&gt;Safari_Respond_Clear &lt;/i&gt;the application variable safari_app is cleared.&lt;br /&gt;
&lt;br /&gt;
It's demo time! You can follow along with the demo by running the application in two separate browsers at &lt;a href="http://kynetx.aculis.net/safari/app.html"&gt;http://kynetx.aculis.net/safari/app.html &lt;/a&gt;The screen shots below are taking from Mozilla Firefox and Google Chrome. Starting in Firefox, the very first time the Kynetx ruleset is run the application variable does not exist, so it's value is set to "Just Born!". Note: Your mileage may vary since the application variable will retain it's value from the last user.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_tXU2PrpKxHU/TRGKFXTxVkI/AAAAAAAAAPo/Shw30VK6rDo/s1600/01_safari_app_firefox_start.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="110" src="http://1.bp.blogspot.com/_tXU2PrpKxHU/TRGKFXTxVkI/AAAAAAAAAPo/Shw30VK6rDo/s320/01_safari_app_firefox_start.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;The value of the application variable can be changed by entering a new value into the text field.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_tXU2PrpKxHU/TRGKJgFaPsI/AAAAAAAAAPs/0jENkKdZj4k/s1600/02_safari_app_firefox_entertext.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="107" src="http://2.bp.blogspot.com/_tXU2PrpKxHU/TRGKJgFaPsI/AAAAAAAAAPs/0jENkKdZj4k/s320/02_safari_app_firefox_entertext.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
After the Mutate button is clicked the current value of the application variable is set.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_tXU2PrpKxHU/TRGKdg1B2eI/AAAAAAAAAPw/LOOzQxImnUY/s1600/03_safari_app_firefox_newcurrent.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="107" src="http://3.bp.blogspot.com/_tXU2PrpKxHU/TRGKdg1B2eI/AAAAAAAAAPw/LOOzQxImnUY/s320/03_safari_app_firefox_newcurrent.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Switching over to the Google Chrome browser, when the Kynetx ruleset fires the value of the application variable is the same as it was in Firefox. &lt;b&gt;This is our proof &lt;/b&gt;that the application variable is accessible to all running sessions of the ruleset.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_tXU2PrpKxHU/TRGKmOdCMWI/AAAAAAAAAP0/57KRhS8HEkE/s1600/04_safari_app_chrome_start.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="108" src="http://2.bp.blogspot.com/_tXU2PrpKxHU/TRGKmOdCMWI/AAAAAAAAAP0/57KRhS8HEkE/s320/04_safari_app_chrome_start.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Still in Chrome a new value is entered into the text field.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_tXU2PrpKxHU/TRGKsse-WVI/AAAAAAAAAP4/snN6Cv1pJ_Y/s1600/05_safari_app_chrome_entertext.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="108" src="http://4.bp.blogspot.com/_tXU2PrpKxHU/TRGKsse-WVI/AAAAAAAAAP4/snN6Cv1pJ_Y/s320/05_safari_app_chrome_entertext.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
After clicking the Mutate button the current value is updated.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_tXU2PrpKxHU/TRGKzelTh6I/AAAAAAAAAP8/YU5SU5-rQM8/s1600/06_safari_app_chrome_newcurrent.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="108" src="http://1.bp.blogspot.com/_tXU2PrpKxHU/TRGKzelTh6I/AAAAAAAAAP8/YU5SU5-rQM8/s320/06_safari_app_chrome_newcurrent.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Back to the Firefox browser, the page is reloaded and we can see that updated value of the application variable is the same as it was in Chrome.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_tXU2PrpKxHU/TRGK8BMwmEI/AAAAAAAAAQA/l4CNurtp11M/s1600/07_safari_app_firefox_reload.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="107" src="http://4.bp.blogspot.com/_tXU2PrpKxHU/TRGK8BMwmEI/AAAAAAAAAQA/l4CNurtp11M/s320/07_safari_app_firefox_reload.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;br /&gt;
Clicking the Clear button will destory the application variable.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_tXU2PrpKxHU/TRGLCEOExSI/AAAAAAAAAQE/azshiQSVqFE/s1600/08_safari_app_firefox_clear.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="107" src="http://3.bp.blogspot.com/_tXU2PrpKxHU/TRGLCEOExSI/AAAAAAAAAQE/azshiQSVqFE/s320/08_safari_app_firefox_clear.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Finally we reload the page in Chrome after it has been cleared.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_tXU2PrpKxHU/TRGLHC0qWOI/AAAAAAAAAQI/iVJUa3_DRuQ/s1600/09_safari_app_chrome_allclear.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="108" src="http://1.bp.blogspot.com/_tXU2PrpKxHU/TRGLHC0qWOI/AAAAAAAAAQI/iVJUa3_DRuQ/s320/09_safari_app_chrome_allclear.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
In the next KRL Scope Safari we will add Modules to the adventure! Will we be able to share an persistent application variable between to different rulesets by using the same module? Stay Tuned!&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/751134.js?file=KRL_Scope_Safari_Application_Variables.js"&gt;
&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
Enjoy!&lt;img src="http://feeds.feedburner.com/~r/edoism/~4/xlFU6MsF1GQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://edoism.orcutt.org/feeds/1609978044949296180/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://edoism.orcutt.org/2010/12/krl-scope-safari-application-variables.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/1609978044949296180?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/1609978044949296180?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/edoism/~3/xlFU6MsF1GQ/krl-scope-safari-application-variables.html" title="KRL Scope Safari: Application Variables" /><author><name>Ed Orcutt</name><uri>http://www.blogger.com/profile/01072069799127687951</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_tXU2PrpKxHU/SuDD5YwomTI/AAAAAAAAAII/hCrRNUZWOto/S220/edo_transjpg.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_tXU2PrpKxHU/TRDz9tCmcpI/AAAAAAAAAPk/C2jMx5O-0IY/s72-c/krl_safari_border.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://edoism.orcutt.org/2010/12/krl-scope-safari-application-variables.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkADRXw8fSp7ImA9Wx9RGUg.&quot;"><id>tag:blogger.com,1999:blog-1930213017396645687.post-7880597813640487780</id><published>2010-12-21T12:12:00.000-07:00</published><updated>2010-12-21T12:12:54.275-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-21T12:12:54.275-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="kynetx" /><category scheme="http://www.blogger.com/atom/ns#" term="safari" /><title>KRL Scope Safari: Entity Variables</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_tXU2PrpKxHU/TRDz9tCmcpI/AAAAAAAAAPk/C2jMx5O-0IY/s1600/krl_safari_border.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="165" src="http://3.bp.blogspot.com/_tXU2PrpKxHU/TRDz9tCmcpI/AAAAAAAAAPk/C2jMx5O-0IY/s320/krl_safari_border.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;This KRL Safari will investigate the scope and extent of &lt;a href="http://docs.kynetx.com/docs/Persistent_Variables"&gt;persistent variables &lt;/a&gt;on the Kynetx KRL platform. We begin the expedition with the most familiar type of persistent variable, the Entity variable. Entity variables in KRL are used to record persistent data within a &lt;a href="http://docs.kynetx.com/docs/Ruleset"&gt;ruleset&lt;/a&gt;. The value of an entity variable is retained between executions of the ruleset. It is important to note that the scope of an entity variable is directly associated with your browser session.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
Note: For another perspective on KRL persistent variables I would highly recommend the &lt;i&gt;Kynetx App A Day &lt;/i&gt;article &lt;a href="http://kynetxappaday.wordpress.com/2010/12/18/day-12-persistant-variables/"&gt;Day 12 - Persistent Variables&lt;/a&gt; by &lt;a href="http://geek.michaelgrace.org/"&gt;Michael Grace&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Since the definitive authority is code, here is a &lt;a href="https://gist.github.com/749097"&gt;KRL ruleset&lt;/a&gt;! There are three rules in this demo application. The first rule, &lt;i&gt;Safari_Initialize &lt;/i&gt;displays a growl notification which includes a title, the current value of the entity variable and two html forms which enable the entity variable to mutated and cleared. The second rule, &lt;i&gt;Safari_Respond_Submit &lt;/i&gt;processes the form submission to mutate (change) the entity variable. The last rule, &lt;i&gt;Safari_Respond_Clear &lt;/i&gt;processes the form submission to clear the entity variable.&lt;br /&gt;
&lt;br /&gt;
The value of the entity variable can be accessed inside of a prelude expression. In the prelude section of &lt;i&gt;Safari_Initalize &lt;/i&gt;the value of safari_entity is accessed. Entity variables can be mutated in the postlude section of a rule. In the postlude section of &lt;i&gt;Safari_Respond_Submit &lt;/i&gt;the value of the entity variable safari_entity is set to the value of newValue. And in the postlude section of &lt;i&gt;Safari_Respond_Clear &lt;/i&gt;the entity variable safari_entity is cleared.&lt;br /&gt;
&lt;br /&gt;
Now it's time to start the safari demo of persistent entity variables. You can follow along with the demo in another browser window by visiting &lt;a href="http://kynetx.aculis.net/safari/entity.html"&gt;http://kynetx.aculis.net/safari/entity.html&lt;/a&gt;. When this Kynetx ruleset is run for the first time the entity variable does not exist, and so it is set to the value "Just Born!".&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_tXU2PrpKxHU/TQ_WcYgtRoI/AAAAAAAAAPQ/F73KZXlma9c/s1600/01_safari_entity_start.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="107" src="http://3.bp.blogspot.com/_tXU2PrpKxHU/TQ_WcYgtRoI/AAAAAAAAAPQ/F73KZXlma9c/s320/01_safari_entity_start.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
The value of the entity variable can be changed by entering a new value into the text field.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_tXU2PrpKxHU/TQ_WmsTsWVI/AAAAAAAAAPU/xtp1oK-315w/s1600/02_safari_entity_enternew.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="107" src="http://3.bp.blogspot.com/_tXU2PrpKxHU/TQ_WmsTsWVI/AAAAAAAAAPU/xtp1oK-315w/s320/02_safari_entity_enternew.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
After the Mutate button is clicked the current value of the entity variable is updated.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_tXU2PrpKxHU/TQ_Wu2GoDhI/AAAAAAAAAPY/-1Xx4D4_vnY/s1600/03_safari_entity_newcurrent.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="107" src="http://3.bp.blogspot.com/_tXU2PrpKxHU/TQ_Wu2GoDhI/AAAAAAAAAPY/-1Xx4D4_vnY/s320/03_safari_entity_newcurrent.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
When the browser window is reload or a new window is opened the current value of the entity variable remains the same.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_tXU2PrpKxHU/TQ_W58FRB3I/AAAAAAAAAPc/vXOUHwd3ajE/s1600/04_safari_entity_reloadcurrent.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="107" src="http://1.bp.blogspot.com/_tXU2PrpKxHU/TQ_W58FRB3I/AAAAAAAAAPc/vXOUHwd3ajE/s320/04_safari_entity_reloadcurrent.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Clicking the Clear button will destory the entity variable.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_tXU2PrpKxHU/TQ_XEpHbttI/AAAAAAAAAPg/XsPjD-OiyQM/s1600/05_safari_entity_clear.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="107" src="http://3.bp.blogspot.com/_tXU2PrpKxHU/TQ_XEpHbttI/AAAAAAAAAPg/XsPjD-OiyQM/s320/05_safari_entity_clear.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Then when the browser window is reloaded, or a new window is opened, we are back at the beginning of this demo.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_tXU2PrpKxHU/TQ_WcYgtRoI/AAAAAAAAAPQ/F73KZXlma9c/s1600/01_safari_entity_start.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="107" src="http://3.bp.blogspot.com/_tXU2PrpKxHU/TQ_WcYgtRoI/AAAAAAAAAPQ/F73KZXlma9c/s320/01_safari_entity_start.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
An extremely important point to note is that entity variables are tied to your browser session in much the same way as browser cookies. You can see this for yourself by running this demo in two separate browsers (e.g. Firefox &amp;amp; Chrome) or by running the demo on two separate computers. Simply running the demo in two separate Firefox windows on the same computer is not the same since the session is the same.&lt;br /&gt;
&lt;br /&gt;
The Scope Safari continues next time when we look at the scope of Application persistent variables on the Kynetx platform.&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/749097.js?file=KRL_Scope_Safari_Entity_Variables.js"&gt;
&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
Enjoy!&lt;img src="http://feeds.feedburner.com/~r/edoism/~4/YbAyKtrCC-w" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://edoism.orcutt.org/feeds/7880597813640487780/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://edoism.orcutt.org/2010/12/krl-scope-safari-entity-variables.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/7880597813640487780?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/7880597813640487780?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/edoism/~3/YbAyKtrCC-w/krl-scope-safari-entity-variables.html" title="KRL Scope Safari: Entity Variables" /><author><name>Ed Orcutt</name><uri>http://www.blogger.com/profile/01072069799127687951</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_tXU2PrpKxHU/SuDD5YwomTI/AAAAAAAAAII/hCrRNUZWOto/S220/edo_transjpg.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_tXU2PrpKxHU/TRDz9tCmcpI/AAAAAAAAAPk/C2jMx5O-0IY/s72-c/krl_safari_border.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://edoism.orcutt.org/2010/12/krl-scope-safari-entity-variables.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck8HQ3o_cSp7ImA9Wx9TGEQ.&quot;"><id>tag:blogger.com,1999:blog-1930213017396645687.post-2879307591244298972</id><published>2010-11-27T13:47:00.000-07:00</published><updated>2010-11-27T13:47:12.449-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-11-27T13:47:12.449-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="kynetx" /><category scheme="http://www.blogger.com/atom/ns#" term="linkedin" /><category scheme="http://www.blogger.com/atom/ns#" term="facebook" /><category scheme="http://www.blogger.com/atom/ns#" term="aculis" /><title>Now You Can "Like" Any Company on LinkedIn</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_tXU2PrpKxHU/TPFs0gaf7EI/AAAAAAAAAO4/yz3x-8931xg/s1600/facebook_like_button_big.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="142" src="http://3.bp.blogspot.com/_tXU2PrpKxHU/TPFs0gaf7EI/AAAAAAAAAO4/yz3x-8931xg/s320/facebook_like_button_big.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;Inspired by &lt;a href="http://staynalive.com/articles/twitter-like-button/"&gt;Jess Stay's Kynetx application &lt;/a&gt;that enables you to like any Tweet on Twitter.com, I wrote a variation which will let you Like any company on LinkedIn.com. The Kynetx application can be installed as a browser extension available for Firefox, Chrome and Internet Explorer from the &lt;a href="http://www.aculis.net/portfolio/product/21"&gt;Aculis website. &lt;/a&gt;Once you will the application installed you will be able to Like company pages on LinkedIn.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
Here's an example of me liking the Aculis company page on LinkedIn:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_tXU2PrpKxHU/TPFs-7jm8zI/AAAAAAAAAO8/8O4jIKL7b5U/s1600/linkedinlikeaculis.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="79" src="http://3.bp.blogspot.com/_tXU2PrpKxHU/TPFs-7jm8zI/AAAAAAAAAO8/8O4jIKL7b5U/s320/linkedinlikeaculis.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Which is displayed in my profile on Facebook like this:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_tXU2PrpKxHU/TPFtEZjQHSI/AAAAAAAAAPA/TTSVbXJzt1Q/s1600/linkedinprofile.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="77" src="http://2.bp.blogspot.com/_tXU2PrpKxHU/TPFtEZjQHSI/AAAAAAAAAPA/TTSVbXJzt1Q/s320/linkedinprofile.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
One of the more interesting parts of this Kynetx application is that to avoid having Likes for each of the subordinate company pages on LinkedIn a regular expression is used to extract the company name from the URL:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;select when pageview "/company/([\w\-]*)" setting (companyName)
&lt;/pre&gt;&lt;br /&gt;
Then the extracted company name is inserted into the call to the Facebook Like widget before it is inserted into the webpage:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;href=http://www.linkedin.com/company/#{companyName}
&lt;/pre&gt;&lt;br /&gt;
You can take &lt;a href="http://www.aculis.net/portfolio/product/21"&gt;LinkedIn Like &lt;/a&gt;for a test drive by installing the browser extension from the portfolio page. And the Kynetx KRL source code for the application has be posted to GitHub as a &lt;a href="http://gist.github.com/718197"&gt;gist&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/718197.js?file=linkedin_like.krl"&gt;
&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
Enjoy!&lt;img src="http://feeds.feedburner.com/~r/edoism/~4/f1OgpgT-FDU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://edoism.orcutt.org/feeds/2879307591244298972/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://edoism.orcutt.org/2010/11/now-you-can-like-any-company-on.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/2879307591244298972?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/2879307591244298972?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/edoism/~3/f1OgpgT-FDU/now-you-can-like-any-company-on.html" title="Now You Can &quot;Like&quot; Any Company on LinkedIn" /><author><name>Ed Orcutt</name><uri>http://www.blogger.com/profile/01072069799127687951</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_tXU2PrpKxHU/SuDD5YwomTI/AAAAAAAAAII/hCrRNUZWOto/S220/edo_transjpg.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_tXU2PrpKxHU/TPFs0gaf7EI/AAAAAAAAAO4/yz3x-8931xg/s72-c/facebook_like_button_big.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://edoism.orcutt.org/2010/11/now-you-can-like-any-company-on.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0EEQXwyeyp7ImA9Wx5aE04.&quot;"><id>tag:blogger.com,1999:blog-1930213017396645687.post-4494211372236879170</id><published>2010-11-09T13:46:00.000-07:00</published><updated>2010-11-09T13:46:40.293-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-11-09T13:46:40.293-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="JSON" /><category scheme="http://www.blogger.com/atom/ns#" term="kynetx" /><title>Happy Hack'in with Kynetx JSONPath</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_tXU2PrpKxHU/TNmv54DXY9I/AAAAAAAAAO0/ZGZ6f59Dxeo/s1600/JSON.gif" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_tXU2PrpKxHU/TNmv54DXY9I/AAAAAAAAAO0/ZGZ6f59Dxeo/s1600/JSON.gif" /&gt;&lt;/a&gt;&lt;/div&gt;You can doing amazing things with the tools that are available to you, if you only take the time to learn how to use them. That was how I felt after taking the time to dig into the details of &lt;a href="http://docs.kynetx.com/docs/KRL_and_JSONPath"&gt;JSONPath&lt;/a&gt;. The Kynetx KRL language contains a number of mini languages, regex, jQuery, JSONPath, etc. While I was fortunate to have JSON data source for the &lt;a href="http://www.twilio.com/gallery/apps/CloudStatus"&gt;CloudStatus &lt;/a&gt;application, the structure of the data was not usable. Or so I initially thought.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
First some background on the CloudStatus application. The CloudStatus application will provide a list of public API services that are having performance issues. Basically it will tell you which services are not ok. Fortunately I was able to find the JSON (actually JSONP) data which is used to build &lt;a href="http://api-status.com/"&gt;Public API Status&lt;/a&gt;. However, the JSON was structured so that it could be easily used to build a website which reports the status of all 26 services, not just report the bad ones. No problem I'll just write another utility application to transform the JSON into a structure that will be easier for the CloudStatus application to consume.&lt;br /&gt;
&lt;br /&gt;
Good idea, right? Well, yes, no, maybe. Honestly I really did not want to spend the time to code, test and debug an application that transformed JSON data. Sorry, it's just too tedious! But being lazy in this regard motivated me to dig into the details of what can be done with JSONPath. It's far more powerful that I initially assumed. And after about 30 minutes I was able to craft a JSONPath expression that extracted the data that I needed. Awesome!&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_tXU2PrpKxHU/TNmthX1jzEI/AAAAAAAAAOw/_tznDWzS_rE/s1600/json.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_tXU2PrpKxHU/TNmthX1jzEI/AAAAAAAAAOw/_tznDWzS_rE/s1600/json.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
The source JSON data was structured with the list of 26 services in random order. With 6 attributes provided for each of the services, including the name of the service and current status (ok, warn, or err). All that we need for the CloudStatus app is the list of services that are not ok. Using a JSONPath filter expression we grab a list of services where current status is not ok &lt;span style="font-family: inherit;"&gt;(current_status ne 'ok')&lt;/span&gt;. But since we only need the name of the services, not all of the attributes, we'll just retrieve the name:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;BadServices = status_json.pick("$..services[?(@.current_status ne 'ok')].name")
&lt;/pre&gt;&lt;br /&gt;
Now &lt;i&gt;BadServices &lt;/i&gt;contains array of the services names that are having performance issues. And we didn't have to hack a pile of tedious code to transform the JSON into a new structure for our application to consume. Three cheers for JSONPath!&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;["bing search API", "Box.net API", "Flickr API"]
&lt;/pre&gt;&lt;br /&gt;
We still need to get the list into string format so that it can be passed to &lt;a href="http://www.twilio.com/"&gt;Twilio&lt;/a&gt;, and from an end user point of view we should remove the text "API". Using the KRL &lt;a href="http://docs.kynetx.com/docs/Join"&gt;join operator &lt;/a&gt;we can convert the array to a string:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;BadString = BadServices.join(" and ")
&lt;/pre&gt;&lt;br /&gt;
Giving us the the &lt;i&gt;BadString&lt;/i&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;"bing search API and Box.net API and Flickr API"
&lt;/pre&gt;&lt;br /&gt;
Finally, we remove all occurrences of the string "API" using the &lt;a href="http://docs.kynetx.com/docs/Replace"&gt;replace operator&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;YouAreBad = BadString.replace(re/ API/g, "")
&lt;/pre&gt;&lt;br /&gt;
Which gives us a string containing the list of bad services:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;"bing search and Box.net and Flickr"
&lt;/pre&gt;&lt;br /&gt;
Enjoy and happy hack'in!&lt;img src="http://feeds.feedburner.com/~r/edoism/~4/dyUHwmwHttI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://edoism.orcutt.org/feeds/4494211372236879170/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://edoism.orcutt.org/2010/11/happy-hackin-with-kynetx-jsonpath.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/4494211372236879170?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/4494211372236879170?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/edoism/~3/dyUHwmwHttI/happy-hackin-with-kynetx-jsonpath.html" title="Happy Hack'in with Kynetx JSONPath" /><author><name>Ed Orcutt</name><uri>http://www.blogger.com/profile/01072069799127687951</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_tXU2PrpKxHU/SuDD5YwomTI/AAAAAAAAAII/hCrRNUZWOto/S220/edo_transjpg.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_tXU2PrpKxHU/TNmv54DXY9I/AAAAAAAAAO0/ZGZ6f59Dxeo/s72-c/JSON.gif" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://edoism.orcutt.org/2010/11/happy-hackin-with-kynetx-jsonpath.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUINRns8eip7ImA9Wx5aEks.&quot;"><id>tag:blogger.com,1999:blog-1930213017396645687.post-4534321124873222021</id><published>2010-11-08T17:46:00.000-07:00</published><updated>2010-11-08T17:46:37.572-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-11-08T17:46:37.572-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="kynetx" /><category scheme="http://www.blogger.com/atom/ns#" term="twilio" /><title>Kynetx Flow of Control in CloudStatus</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_tXU2PrpKxHU/TNiZg_i29CI/AAAAAAAAAOs/NMukUqAiYv8/s1600/twilio-logo-no-tagline1.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_tXU2PrpKxHU/TNiZg_i29CI/AAAAAAAAAOs/NMukUqAiYv8/s1600/twilio-logo-no-tagline1.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;The development of solutions within an event based language like Kynetx requires you to remap your architecture skills. It's more common for us to apply object oriented or functional methodology, but not so common to apply an event architecture. To that end I wanted to share with you the architecture of the CloudStatus Kynetx application.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
First a brief overview so that you have some context. The CloudStatus Kynetx application provides the status of 26 public APIs. If there are currently any performance issues or service disruptions one quick phone call or text message to (801) 988-9093 will provide the status. When you first call CloudStatus a summary of the services with issues is given, after a short greeting. Then you are presented with a menu of choices. After selecting one of the menu options, and hearing the results, the menu of choices are repeated. Now let's see what that looks like when implemented with Kynetx.&lt;br /&gt;
&lt;br /&gt;
Below is a skeleton of the CloudStatus application. So that we can focus on the flow of control in the application some of the details have been abbreviated or removed. The full source code for CloudStatus Kynetx application is available at &lt;a href="https://gist.github.com/667893"&gt;GitHub&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_tXU2PrpKxHU/TNiX_ewmyTI/AAAAAAAAAOo/tbyjIyKsiAQ/s1600/code_structure.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_tXU2PrpKxHU/TNiX_ewmyTI/AAAAAAAAAOo/tbyjIyKsiAQ/s1600/code_structure.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;The entry point into the application is an incoming call from &lt;a href="http://www.twilio.com/"&gt;Twilio&lt;/a&gt;, rule #1 &lt;i&gt;twilio inbound_call&lt;/i&gt;. After the gretting we raise an explicit event which gives the summary of under performing services. Then another explicit event is raised which takes you to rule #2 explicit &lt;i&gt;givemenu&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
Rule #2 is at the top of the multi-select loop and is the center piece of the applications flow of control. One of the main features to note is the parameter passed into &lt;i&gt;gather_start(). &lt;/i&gt;It is the event name we have choosen, and it is used in many of the rules which follow. In addition you will notice that we have specified that only one digit will be accepted. So when the caller pressing a single digit we will be off and running.&lt;br /&gt;
&lt;br /&gt;
When the caller presses 1, 2, 3 or 0 rule #3, #4, #5 or #6 is fired respectively. Otherwise, Rule #8 is fired. This is the multi-select pattern! So if the caller presses number 1, rule #3 will fire because it matches the event name &lt;i&gt;statuschoice &lt;/i&gt;with the qualifier Digits "1". Recall from above that we choose the event name &lt;i&gt;statuschoice &lt;/i&gt;in the &lt;i&gt;gather_start() &lt;/i&gt;action. The next rule to fire will be #7 which matches event name &lt;i&gt;statuschoice &lt;/i&gt;and any one of the digits 1, 2 or 3. This rule provides the looping which takes us back to rule #2 by raising an explicit event. If the caller presses either the number 2 or 3 the pattern is similar.&lt;br /&gt;
&lt;br /&gt;
If on the other hand the caller presses number 0, then Rule #6 fires, which says goodbye and terminates the call. You will note that Rule #7 does not fire when the Digits is 0, so the caller is not taken back to Rule #2 to hear the menu. The application flow drops through to the end, no loop. there are done.&lt;br /&gt;
&lt;br /&gt;
Finally, if the caller presses any other number then Rule #8 fires, telling them of their poor choice and then taking them back to Rule #2 by raising an explicit event.&lt;img src="http://feeds.feedburner.com/~r/edoism/~4/KulE8mqMZs8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://edoism.orcutt.org/feeds/4534321124873222021/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://edoism.orcutt.org/2010/11/kynetx-flow-of-control-in-cloudstatus.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/4534321124873222021?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/4534321124873222021?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/edoism/~3/KulE8mqMZs8/kynetx-flow-of-control-in-cloudstatus.html" title="Kynetx Flow of Control in CloudStatus" /><author><name>Ed Orcutt</name><uri>http://www.blogger.com/profile/01072069799127687951</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_tXU2PrpKxHU/SuDD5YwomTI/AAAAAAAAAII/hCrRNUZWOto/S220/edo_transjpg.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_tXU2PrpKxHU/TNiZg_i29CI/AAAAAAAAAOs/NMukUqAiYv8/s72-c/twilio-logo-no-tagline1.jpg" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://edoism.orcutt.org/2010/11/kynetx-flow-of-control-in-cloudstatus.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkAMRn48fCp7ImA9Wx5bF08.&quot;"><id>tag:blogger.com,1999:blog-1930213017396645687.post-8516568039072875034</id><published>2010-11-02T13:03:00.003-06:00</published><updated>2010-11-02T13:06:27.074-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-11-02T13:06:27.074-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="webhooks" /><category scheme="http://www.blogger.com/atom/ns#" term="kynetx" /><category scheme="http://www.blogger.com/atom/ns#" term="twitter" /><title>Twitter WebHook for Kynetx Applications</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_tXU2PrpKxHU/TKo_taGORyI/AAAAAAAAAOI/_LZqYi6u-ks/s1600/theme.logo.eb3fcf.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_tXU2PrpKxHU/TKo_taGORyI/AAAAAAAAAOI/_LZqYi6u-ks/s1600/theme.logo.eb3fcf.png" /&gt;&lt;/a&gt;&lt;/div&gt;You can have a Twitter &lt;a href="http://www.webhooks.org/"&gt;WebHook &lt;/a&gt;for your Kynetx application by using &lt;a href="http://notifo.com/"&gt;Notifo &lt;/a&gt;and the &lt;a href="http://push.ly/"&gt;Push.ly &lt;/a&gt;services. Herein are the configuration steps and a simple HelloWorldish Kynetx application. Your Kynetx application will be called where your Twitter account receives a DM, mention, gets a new follower or when someone favorites one of your tweets. Let's jump right into the configuration steps!&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
For this demo we will be using the &lt;a href="http://twitter.com/aculishook"&gt;aculishook (Aculis WebHook) &lt;/a&gt;Twitter account. The first thing you will need to do is to Sign Up for a &lt;a href="http://notifo.com/"&gt;Notifo &lt;/a&gt;account. For this demo we will be using the aculishook account. After you have set up an account at Notifo head on over the &lt;a href="http://push.ly/"&gt;Push.ly &lt;/a&gt;and sign in with your Twitter account. Once you are signed into Push.ly, enter your Notifo username and select the actions for which you would like notifications (aka WebHook calls). From the screenshot below you can see that I have selected all the actions.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_tXU2PrpKxHU/TNBbNP6c6lI/AAAAAAAAAOg/5hx3vjTI8Ok/s1600/screenshot_pushly.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="232" src="http://4.bp.blogspot.com/_tXU2PrpKxHU/TNBbNP6c6lI/AAAAAAAAAOg/5hx3vjTI8Ok/s400/screenshot_pushly.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Now let's head back to Notifo to set up the WebHook call into our Kynetx application. On the Notifo site visit the notifications page (Login then click Settings and click on Notification Settings). Then fill out the "Notification Webhook URL" field then click Save.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_tXU2PrpKxHU/TNBbW80x8yI/AAAAAAAAAOk/yhNBgPC7EA0/s1600/screenshot_notifo.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="50" src="http://2.bp.blogspot.com/_tXU2PrpKxHU/TNBbW80x8yI/AAAAAAAAAOk/yhNBgPC7EA0/s400/screenshot_notifo.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
The construction of the WebHook URL for a Kynetx application is described in the online Kynetx documentation for &lt;a href="http://docs.kynetx.com/docs/Webhook_Endpoint"&gt;Webhook Endpoints&lt;/a&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;http://webhooks.kynetx.com:3098/h/{&lt;i&gt;appid&lt;/i&gt;}/{&lt;i&gt;eventname&lt;/i&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The &lt;i&gt;appid &lt;/i&gt;is the Kynetx application identifier assigned automatically when you created your application. You don't have any choice to make here, just cut &amp;amp; paste. For this demo the &lt;i&gt;appid &lt;/i&gt;was &lt;b&gt;a169x151&lt;/b&gt;. The &lt;i&gt;eventname&lt;/i&gt; is completely in your hands, choose something meaningful as you will also need to use it as an event name in your Kynetx application. For this demo application the &lt;i&gt;eventname &lt;/i&gt;is &lt;b&gt;&lt;span style="font-family: inherit;"&gt;notifohook&lt;/span&gt;&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
Finally we have the Kynetx application which will receive the WebHook calls from Notifo. The bit of Kynetx code that enables your application to respond is in the select statement:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;select when webhook notifohook&lt;/div&gt;&lt;br /&gt;
Notice that eventname &lt;b&gt;notifohook &lt;/b&gt;is the same one that was used in the WebHook URL enter at Notifo? Notifo WebHook calls pass along ten parameters which are available as event:param("") within your Kynetx application. This demo application does not do anything particularly interesting with the data received, it's just saved to a Google form.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: javascript"&gt;ruleset a169x151 {
  meta {
    name "Aculis WebHook"
    description &amp;lt;&amp;lt; Aculis demo of Kynetx Twitter Webhook  &amp;gt;&amp;gt;
    author "Ed Orcutt"
    logging on
  }

  dispatch {
    domain "example.com"
  }

  global { }

  rule Notifo_Webhook is active {
    select when webhook notifohook
    pre {
      notifo_id          = event:param("notifo_id");
      notifo_message     = event:param("notifo_message");
      notifo_service     = event:param("notifo_service");
      notifo_signature   = event:param("notifo_signature");
      notifo_title       = event:param("notifo_title");
      notifo_to_username = event:param("notifo_to_username");
      notifo_type        = event:param("notifo_type");
      notifo_unix_time   = event:param("notifo_unix_time");
      notifo_uri         = event:param("notifo_uri");
      notifo_webhook_url = event:param("notifo_webhook_url");
    }
    every {
      http:post("https://spreadsheets.google.com/a/aculis.net/formResponse?formkey=dElUWGxHSmppczd5Mnl3S0dRaWE0X1E6MQ&amp;amp;ifq")
        with params = {
          "entry.0.single": notifo_id,
          "entry.1.single": notifo_message,
          "entry.2.single": notifo_service,
          "entry.3.single": notifo_signature,
          "entry.4.single": notifo_title,
          "entry.5.single": notifo_to_username,
          "entry.6.single": notifo_type,
          "entry.7.single": notifo_unix_time,
          "entry.8.single": notifo_uri,
          "entry.9.single": notifo_webhook_url,
          "submit": "Submit",
          "pageNumber": "0",
          "backupcache": ""
        };
    }
  }
}
&lt;/pre&gt;&lt;br /&gt;
You can take this demo for a test drive by following the Twitter account &lt;a href="http://twitter.com/aculishook"&gt;aculishook&lt;/a&gt;, mentioning @aculishook in a tweet or by favoring one of aculishook's tweets. Then visit the &lt;a href="https://spreadsheets.google.com/pub?key=tITXlGJjis7y2ywKGQia4_Q&amp;amp;single=true&amp;amp;gid=0&amp;amp;output=html"&gt;Google Form &lt;/a&gt;to see the results. The web page view of the Google spreadsheet is only updated every 5 minutes, so there will probably be a delay before you can see the effect of your action. However, the actually Google spreadsheet is updated immediately from the Kynetx application.&lt;br /&gt;
&lt;br /&gt;
Do let me know if you have found this information useful or if you have any questions!&lt;br /&gt;
&lt;br /&gt;
Enjoy!&lt;img src="http://feeds.feedburner.com/~r/edoism/~4/EMHDTFENiis" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://edoism.orcutt.org/feeds/8516568039072875034/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://edoism.orcutt.org/2010/11/twitter-webhook-for-kynetx-applications.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/8516568039072875034?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/8516568039072875034?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/edoism/~3/EMHDTFENiis/twitter-webhook-for-kynetx-applications.html" title="Twitter WebHook for Kynetx Applications" /><author><name>Ed Orcutt</name><uri>http://www.blogger.com/profile/01072069799127687951</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_tXU2PrpKxHU/SuDD5YwomTI/AAAAAAAAAII/hCrRNUZWOto/S220/edo_transjpg.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_tXU2PrpKxHU/TKo_taGORyI/AAAAAAAAAOI/_LZqYi6u-ks/s72-c/theme.logo.eb3fcf.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://edoism.orcutt.org/2010/11/twitter-webhook-for-kynetx-applications.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUQCQXc4fCp7ImA9Wx5VGUU.&quot;"><id>tag:blogger.com,1999:blog-1930213017396645687.post-540774783187802166</id><published>2010-10-11T14:33:00.003-06:00</published><updated>2010-10-13T10:29:20.934-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-10-13T10:29:20.934-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="kynetx" /><category scheme="http://www.blogger.com/atom/ns#" term="bigohoo" /><category scheme="http://www.blogger.com/atom/ns#" term="annotation" /><title>BiGoHoo! Search Results Mashed with Facebook Like</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_tXU2PrpKxHU/TLNzcQ76otI/AAAAAAAAAOQ/u-MTVJ3rhAM/s1600/ACULIS-A-100x100.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_tXU2PrpKxHU/TLNzcQ76otI/AAAAAAAAAOQ/u-MTVJ3rhAM/s1600/ACULIS-A-100x100.png" /&gt;&lt;/a&gt;&lt;/div&gt;Eager to put the newly released &lt;a href="http://docs.kynetx.com/docs/NEW_Search_Annotation_V2.0"&gt;Kynetx Annotation V 2.0 framework &lt;/a&gt;to use has given birth to BiGoHoo! This initial release of BiGoHoo inserts the number of Facebook Likes for the search results on Bing, Google and Yahoo!. The Kynetx KRL source code for &lt;a href="http://gist.github.com/621135"&gt;BiGoHoo &lt;/a&gt;is available from GitHub. You may also take BiGoHoo for a test drive by download the browser extension for &lt;a href="http://www.aculis.net/assets/apps/BiGoHoo/BiGoHoo.xpi"&gt;Firefox&lt;/a&gt;, &lt;a href="http://www.aculis.net/assets/apps/BiGoHoo/BiGoHoo_Setup.exe"&gt;Internet Explorer &lt;/a&gt;or &lt;a href="http://www.aculis.net/assets/apps/BiGoHoo/BiGoHoo.crx"&gt;Chrome&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Here's a quick screenshot of BiGoHoo in action on Google:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_tXU2PrpKxHU/TLN0aPRkOdI/AAAAAAAAAOU/w_RO2e_q4w8/s1600/bigohoo_shot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="141" src="http://3.bp.blogspot.com/_tXU2PrpKxHU/TLN0aPRkOdI/AAAAAAAAAOU/w_RO2e_q4w8/s400/bigohoo_shot.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Update 13 Oct 2010: Integration with Twitter and Google Buzz have been added to BiGoHoo. The updated &lt;a href="http://gist.github.com/621135"&gt;Kynetx source code &lt;/a&gt;has been posted to Github.Here's an updated screenshot from Google which includes the integration of social media data from Facebook, Twitter and Buzz:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_tXU2PrpKxHU/TLXeIB0lMSI/AAAAAAAAAOY/CA68KT8-ZIg/s1600/bigohoo_kynetx.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="332" src="http://3.bp.blogspot.com/_tXU2PrpKxHU/TLXeIB0lMSI/AAAAAAAAAOY/CA68KT8-ZIg/s400/bigohoo_kynetx.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/edoism/~4/_LjQsDgIEfQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://edoism.orcutt.org/feeds/540774783187802166/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://edoism.orcutt.org/2010/10/bigohoo-search-results-mashed-with.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/540774783187802166?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/540774783187802166?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/edoism/~3/_LjQsDgIEfQ/bigohoo-search-results-mashed-with.html" title="BiGoHoo! Search Results Mashed with Facebook Like" /><author><name>Ed Orcutt</name><uri>http://www.blogger.com/profile/01072069799127687951</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_tXU2PrpKxHU/SuDD5YwomTI/AAAAAAAAAII/hCrRNUZWOto/S220/edo_transjpg.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_tXU2PrpKxHU/TLNzcQ76otI/AAAAAAAAAOQ/u-MTVJ3rhAM/s72-c/ACULIS-A-100x100.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://edoism.orcutt.org/2010/10/bigohoo-search-results-mashed-with.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0UCSXs-fSp7ImA9Wx5VGEk.&quot;"><id>tag:blogger.com,1999:blog-1930213017396645687.post-4871594428454135857</id><published>2010-10-11T06:50:00.004-06:00</published><updated>2010-10-11T19:01:08.555-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-10-11T19:01:08.555-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="kynetx" /><category scheme="http://www.blogger.com/atom/ns#" term="annotation" /><title>Kynetx Annotation Framework V 2.0 Basics</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_tXU2PrpKxHU/TKo_taGORyI/AAAAAAAAAOI/_LZqYi6u-ks/s1600/theme.logo.eb3fcf.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_tXU2PrpKxHU/TKo_taGORyI/AAAAAAAAAOI/_LZqYi6u-ks/s1600/theme.logo.eb3fcf.png" /&gt;&lt;/a&gt;&lt;/div&gt;The release of the &lt;a href="http://docs.kynetx.com/docs/NEW_Search_Annotation_V2.0"&gt;Kynetx Annotation V2.0 framework &lt;/a&gt;provides us with an extensible and feature rich API for the building website mashups. Out of the box the Annotation framework will enable you to develop mashups on &lt;a href="http://www.google.com/"&gt;Google&lt;/a&gt;, &lt;a href="http://search.aol.com/"&gt;AOL Search&lt;/a&gt;, &lt;a href="http://www.bing.com/"&gt;Bing&lt;/a&gt;, &lt;a href="http://search.yahoo.com/"&gt;Yahoo! Search&lt;/a&gt;, &lt;a href="http://www.hotbot.com/"&gt;HotBot&lt;/a&gt;, &lt;a href="http://ask.com/"&gt;Ask.com&lt;/a&gt;, &lt;a href="http://www.alltheweb.com/"&gt;AlltheWeb&lt;/a&gt;, &lt;a href="http://www.altavista.com/"&gt;AltaVista&lt;/a&gt;, &lt;a href="http://www.facebook.com/"&gt;Facebook &lt;/a&gt;and &lt;a href="http://www.linkedin.com/"&gt;LinkedIn&lt;/a&gt;. With just a bit on configuration the framework can eazily be extended to work on other websites not supported by the default configuration. Three basic patterns of annotation are now supported by the framework: local, remote and event.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
Below are working examples of each of the three basic annotation patterns. Links are provided to both the KRL source code at GitHub and browser extensions for you to install. Many thanks to Cid and the Kynetx Team for providing us with this awesome annotation framework!&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;&lt;b&gt;Local JavaScript Annotation&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Using local Javascript annotation you provide the annotation framework with a Javascript callback function that will be envoked after the data is collected from the web page. The Javascript callback function will be passed a reference to the item which is under consideration for annotation, a wrapper div element which you can use to for annotation, and the data collected from the web page which you can use to determine how to annotate.&lt;br /&gt;
&lt;br /&gt;
The Kynetx KRL source code for the &lt;a href="http://gist.github.com/617431"&gt;local JavaScript annotation &lt;/a&gt;example in the documentation is available from GitHub. You may also take the example for a test drive by download the browser extension for &lt;a href="http://www.aculis.net/assets/apps/AnnotateV2/Kynetx_Annotate_Local_Javascript.xpi"&gt;Firefox&lt;/a&gt;, &lt;a href="http://www.aculis.net/assets/apps/AnnotateV2/Kynetx_Annotate_Local_Javascript_Setup.exe"&gt;Internet Explorer &lt;/a&gt;or &lt;a href="http://www.aculis.net/assets/apps/AnnotateV2/Kynetx_Annotate_Local_Javascript.crx"&gt;Chrome&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;&lt;b&gt;Remote Annotation&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Remote annotation enables you to call a remote services to determine which items on the web page will be annotated. The remote service will be called using &lt;a href="http://ajaxian.com/archives/jsonp-json-with-padding"&gt;JSONP&lt;/a&gt;. The remote service will be passed a list of items, each will contain an item reference, the full URL of the item (e.g. http://live.gnome.org/Cheese), and the domain name (e.g. live.gnome.org). The remote service should return the list of items to be annotated, each with the item reference and any values to pass to the Javascript callback function as data parameters.&lt;br /&gt;
&lt;br /&gt;
The Kynetx KRL source code for the &lt;a href="http://gist.github.com/618542"&gt;remote annotation &lt;/a&gt;example in the documentation is available from GitHub. The source code for the &lt;a href="http://gist.github.com/618544"&gt;web service &lt;/a&gt;is also available from GitHub. You may also take the example for a test drive by download the browser extension for &lt;a href="http://www.aculis.net/assets/apps/AnnotateV2/Kynetx_Annotate_Remote.xpi"&gt;Firefox&lt;/a&gt;, &lt;a href="http://www.aculis.net/assets/apps/AnnotateV2/Kynetx_Annotate_Remote_Setup.exe"&gt;Internet Explorer &lt;/a&gt;or &lt;a href="http://www.aculis.net/assets/apps/AnnotateV2/Kynetx_Annotate_Remote.crx"&gt;Chrome&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;&lt;b&gt;Event Annotation&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
The Event annotation pattern is truly the most interesting and powerful of the three patterns. By using the Kynetx &lt;a href="http://docs.kynetx.com/docs/Raise_Event_Action_and_Runtime_API"&gt;Web Event Action &lt;/a&gt;the framework fires a rule back on the Kynetx Server, which can either directly annotate or provide data for the annotation to be performed by a local Javascript callback function. The rule is passed both an annotation reference and JSON structure which contains the data collected from the web page by the framework.&lt;br /&gt;
&lt;br /&gt;
The Kynetx KRL source code for the &lt;a href="http://gist.github.com/619320"&gt;event annotation &lt;/a&gt;example in the documentation is available from GitHub. You may also take the example for a test drive by download the browser extension for &lt;a href="http://www.aculis.net/assets/apps/AnnotateV2/Kynetx_Annotate_Event.xpi"&gt;Firefox&lt;/a&gt;, &lt;a href="http://www.aculis.net/assets/apps/AnnotateV2/Kynetx_Annotate_Event_Setup.exe"&gt;Internet Explorer &lt;/a&gt;or &lt;a href="http://www.aculis.net/assets/apps/AnnotateV2/Kynetx_Annotate_Event.crx"&gt;Chrome&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
It is also possible to directly add an annotation from within the event rule which is fired. So instead of making additions to the JSON data structure, simply call annotate:add_annotation. The Kynetx KRL source code for the &lt;a href="http://gist.github.com/621484"&gt;javascript annotation via event &lt;/a&gt;example in the documentation is available from GitHub. You may also take the example for a test drive by download the browser extension for &lt;a href="http://www.aculis.net/assets/apps/AnnotateV2/Kynetx_Annotate_Javascript_via_Event.xpi"&gt;Firefox&lt;/a&gt;, &lt;a href="http://www.aculis.net/assets/apps/AnnotateV2/Kynetx_Annotate_Javascript_via_Event_Setup.exe"&gt;Internet Explorer &lt;/a&gt;or &lt;a href="http://www.aculis.net/assets/apps/AnnotateV2/Kynetx_Annotate_Javascript_via_Event.crx"&gt;Chrome&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Enjoy!&lt;img src="http://feeds.feedburner.com/~r/edoism/~4/4OG4l8HL_1I" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://edoism.orcutt.org/feeds/4871594428454135857/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://edoism.orcutt.org/2010/10/kynetx-annotation-framework-v-20-basics.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/4871594428454135857?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1930213017396645687/posts/default/4871594428454135857?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/edoism/~3/4OG4l8HL_1I/kynetx-annotation-framework-v-20-basics.html" title="Kynetx Annotation Framework V 2.0 Basics" /><author><name>Ed Orcutt</name><uri>http://www.blogger.com/profile/01072069799127687951</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_tXU2PrpKxHU/SuDD5YwomTI/AAAAAAAAAII/hCrRNUZWOto/S220/edo_transjpg.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_tXU2PrpKxHU/TKo_taGORyI/AAAAAAAAAOI/_LZqYi6u-ks/s72-c/theme.logo.eb3fcf.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://edoism.orcutt.org/2010/10/kynetx-annotation-framework-v-20-basics.html</feedburner:origLink></entry></feed>
